Home
last modified time | relevance | path

Searched refs:xg (Results 1 – 6 of 6) sorted by relevance

/petsc/src/tao/unconstrained/tutorials/ !
H A Dadjointreads.m14 %xg - the grid
21 % plot(xg,obj,'k-','Markersize',10,'Linewidth',2); drawnow
23 % plot(xg,fwd,'b-','Markersize',10); drawnow
24 % plot(xg,Init_ts,'r*-','Markersize',10); drawnow
25 % plot(xg,Grad,'bs','Markersize',10); drawnow
26 % plot(xg,ic,'g-','LineWidth',2,'Markersize',12);
30 % plot(xg,init)
32 % plot(xg,fin,'ro-')
35 % plot(xg,Init_adj,'k*-','Markersize',10); drawnow
37 % plot(xg,Grad,'go-','Markersize',10); drawnow
[all …]
H A Dburgers_spectral.c297 const PetscScalar *xg; in InitialConditions() local
302 PetscCall(DMDAVecGetArrayRead(appctx->da, appctx->SEMop.grid, (void *)&xg)); in InitialConditions()
304 … * PetscSinScalar(PETSC_PI * xg[i]) / (2.0 + PetscCosScalar(PETSC_PI * xg[i])) + 0.25 * PetscExpRe… in InitialConditions()
306 PetscCall(DMDAVecRestoreArrayRead(appctx->da, appctx->SEMop.grid, (void *)&xg)); in InitialConditions()
325 const PetscScalar *xg; in TrueSolution() local
330 PetscCall(DMDAVecGetArrayRead(appctx->da, appctx->SEMop.grid, (void *)&xg)); in TrueSolution()
332 …pctx->param.mu * PETSC_PI * PetscSinScalar(PETSC_PI * xg[i]) / (2.0 + PetscCosScalar(PETSC_PI * xg in TrueSolution()
334 PetscCall(DMDAVecRestoreArrayRead(appctx->da, appctx->SEMop.grid, (void *)&xg)); in TrueSolution()
350 const PetscScalar *xg; in ComputeObjective() local
355 PetscCall(DMDAVecGetArrayRead(appctx->da, appctx->SEMop.grid, (void *)&xg)); in ComputeObjective()
[all …]
H A Dspectraladjointassimilation.c321 const PetscScalar *xg; in InitialConditions() local
330 PetscCall(DMDAVecGetArrayRead(appctx->da, appctx->SEMop.grid, (void *)&xg)); in InitialConditions()
336 s[i] += val * PetscSinScalar(2 * (j + 1) * PETSC_PI * xg[i]); in InitialConditions()
341 PetscCall(DMDAVecRestoreArrayRead(appctx->da, appctx->SEMop.grid, (void *)&xg)); in InitialConditions()
363 const PetscScalar *xg; in TrueSolution() local
369 PetscCall(DMDAVecGetArrayRead(appctx->da, appctx->SEMop.grid, (void *)&xg)); in TrueSolution()
373 …eff; j++) s[i] += appctx->solutioncoefficients[j] * PetscSinScalar(2 * (j + 1) * PETSC_PI * xg[i]); in TrueSolution()
376 PetscCall(DMDAVecRestoreArrayRead(appctx->da, appctx->SEMop.grid, (void *)&xg)); in TrueSolution()
395 const PetscScalar *xg; in ComputeReference() local
400 PetscCall(DMDAVecGetArrayRead(appctx->da, appctx->SEMop.grid, (void *)&xg)); in ComputeReference()
[all …]
/petsc/src/vec/is/sf/tests/ !
H A Dex9.c177 Vec x, xg, yg; in main() local
219 PetscCall(VecCreateMPICUDAWithArray(parentcomm, 1, n, N, xvalue, &xg)); in main()
223 PetscCall(VecCreateMPIWithArray(parentcomm, 1, n, N, xvalue, &xg)); in main()
236 PetscCall(VecGetOwnershipRange(xg, &low, &high)); /* low, high are global indices of xg */ in main()
239 PetscCall(VecScatterCreate(xg, ix, yg, iy, &vscat)); in main()
242 PetscCall(VecScatterBegin(vscat, xg, yg, INSERT_VALUES, SCATTER_FORWARD)); in main()
243 PetscCall(VecScatterEnd(vscat, xg, yg, INSERT_VALUES, SCATTER_FORWARD)); in main()
256 PetscCall(VecDestroy(&xg)); in main()
263 Vec y, xg, yg; in main() local
284 PetscCall(VecCreateMPICUDAWithArray(parentcomm, 1 /*bs*/, 0 /*n*/, N, NULL /*array*/, &xg)); in main()
[all …]
/petsc/src/dm/impls/da/ !
H A Dgr1.c151 const PetscScalar *array, *xg; in VecView_MPI_Draw_DA1d() local
192 PetscCall(VecGetArrayRead(xcoor, &xg)); in VecView_MPI_Draw_DA1d()
196 if (rank == 0) xmin = PetscRealPart(xg[0]); in VecView_MPI_Draw_DA1d()
197 if (rank == size - 1) xmax = PetscRealPart(xg[n - 1]); in VecView_MPI_Draw_DA1d()
249 PetscCallMPI(MPI_Send((void *)&xg[n - 1], 1, MPIU_REAL, rank + 1, tag, comm)); in VecView_MPI_Draw_DA1d()
258 …PetscCall(PetscDrawLine(draw, xgtmp, tmp, PetscRealPart(xg[0]), PetscRealPart(array[j]), PETSC_DRA… in VecView_MPI_Draw_DA1d()
262 …tscCall(PetscDrawLine(draw, PetscRealPart(xg[i - 1]), PetscRealPart(array[j + dof * (i - 1)]), Pet… in VecView_MPI_Draw_DA1d()
263 …if (showmarkers) PetscCall(PetscDrawMarker(draw, PetscRealPart(xg[i - 1]), PetscRealPart(array[j +… in VecView_MPI_Draw_DA1d()
266 …if (showmarkers) PetscCall(PetscDrawMarker(draw, PetscRealPart(xg[n - 1]), PetscRealPart(array[j +… in VecView_MPI_Draw_DA1d()
280 PetscCall(VecRestoreArrayRead(xcoor, &xg)); in VecView_MPI_Draw_DA1d()
/petsc/src/ts/tutorials/ !
H A Dex50.c259 const PetscScalar *xg; in TrueSolution() local
264 PetscCall(DMDAVecGetArrayRead(appctx->da, appctx->SEMop.grid, (void *)&xg)); in TrueSolution()
267 …tscSinScalar(PETSC_PI * xg[i]) * PetscExpReal(-appctx->param.mu * PETSC_PI * PETSC_PI * t) / (2.0 … in TrueSolution()
270 PetscCall(DMDAVecRestoreArrayRead(appctx->da, appctx->SEMop.grid, (void *)&xg)); in TrueSolution()