Home
last modified time | relevance | path

Searched refs:xm (Results 1 – 25 of 144) sorted by relevance

123456

/petsc/src/dm/impls/da/
H A Ddagetarray.c45 PetscInt xs, ys, zs, xm, ym, zm, gxs, gys, gzs, gxm, gym, gzm, N, dim, dof; in DMDAVecGetArray() local
51 PetscCall(DMDAGetCorners(da, &xs, &ys, &zs, &xm, &ym, &zm)); in DMDAVecGetArray()
57 if (N == xm * ym * zm * dof) { in DMDAVecGetArray()
58 gxm = xm; in DMDAVecGetArray()
64 …not compatible with DMDA local sizes %" PetscInt_FMT " %" PetscInt_FMT, N, xm * ym * zm * dof, gxm… in DMDAVecGetArray()
94 PetscInt xs, ys, zs, xm, ym, zm, gxs, gys, gzs, gxm, gym, gzm, N, dim, dof; in DMDAVecRestoreArray() local
100 PetscCall(DMDAGetCorners(da, &xs, &ys, &zs, &xm, &ym, &zm)); in DMDAVecRestoreArray()
106 if (N == xm * ym * zm * dof) { in DMDAVecRestoreArray()
107 gxm = xm; in DMDAVecRestoreArray()
113 …not compatible with DMDA local sizes %" PetscInt_FMT " %" PetscInt_FMT, N, xm * ym * zm * dof, gxm… in DMDAVecRestoreArray()
[all …]
H A Dgrvtk.c76 rloc[1] = info.xm; in DMDAVTKWriteAll_VTS()
88 PetscInt xs = -1, xm = -1, ys = -1, ym = -1, zs = -1, zm = -1, nnodes = 0; in DMDAVTKWriteAll_VTS() local
92 xm = grloc[r][1]; in DMDAVTKWriteAll_VTS()
97 nnodes = xm * ym * zm; in DMDAVTKWriteAll_VTS()
100 …MT " %" PetscInt_FMT " %" PetscInt_FMT " %" PetscInt_FMT "\">\n", xs, xs + xm - 1, ys, ys + ym - 1… in DMDAVTKWriteAll_VTS()
151 PetscInt xs = -1, xm = -1, ys = -1, ym = -1, zs = -1, zm = -1, nnodes = 0; in DMDAVTKWriteAll_VTS() local
155 xm = grloc[r][1]; in DMDAVTKWriteAll_VTS()
160 nnodes = xm * ym * zm; in DMDAVTKWriteAll_VTS()
162 nnodes = info.xm * info.ym * info.zm; in DMDAVTKWriteAll_VTS()
181 for (i = 0; i < xm; i++) { in DMDAVTKWriteAll_VTS()
[all …]
H A Ddadd.c43 PetscInt xm = 1, ym = 1, zm = 1; in DMDACreatePatchIS() local
177 xm = me - ms; in DMDACreatePatchIS()
186 indices[idx] = l + dof * (base + si + xm * sj + xm * ym * sk); in DMDACreatePatchIS()
211 xm = me - ms; in DMDACreatePatchIS()
244 indices[idx] = l + dof * (base + si + xm * sj + xm * ym * sk); in DMDACreatePatchIS()
273 PetscInt xm = 1, ym = 1, zm = 1; in DMDASubDomainDA_Private() local
289 M = info.xm; in DMDASubDomainDA_Private()
333 xm = M / m + ((M % m) > i); in DMDASubDomainDA_Private()
335 xm = M / m + ((M % m) > i); in DMDASubDomainDA_Private()
338 xm = M / m + ((M % m) > i); in DMDASubDomainDA_Private()
[all …]
/petsc/src/dm/impls/da/ftn-custom/
H A Dzda1f90.c68 PetscInt xs, ys, zs, xm, ym, zm, gxs, gys, gzs, gxm, gym, gzm, N, dim, dof; in dmdavecgetarray1_() local
71 *ierr = DMDAGetCorners(*da, &xs, &ys, &zs, &xm, &ym, &zm); in dmdavecgetarray1_()
81 if (N == xm * ym * zm * dof) { in dmdavecgetarray1_()
82 gxm = xm; in dmdavecgetarray1_()
109 PetscInt xs, ys, zs, xm, ym, zm, gxs, gys, gzs, gxm, gym, gzm, N, dim, dof; in dmdavecgetarray2_() local
112 *ierr = DMDAGetCorners(*da, &xs, &ys, &zs, &xm, &ym, &zm); in dmdavecgetarray2_()
122 if (N == xm * ym * zm * dof) { in dmdavecgetarray2_()
123 gxm = xm; in dmdavecgetarray2_()
156 PetscInt xs, ys, zs, xm, ym, zm, gxs, gys, gzs, gxm, gym, gzm, N, dim, dof; in dmdavecgetarray3_() local
159 *ierr = DMDAGetCorners(*da, &xs, &ys, &zs, &xm, &ym, &zm); in dmdavecgetarray3_()
[all …]
/petsc/src/dm/tutorials/
H A Dex6.c40 PetscInt i, start, end, *ifrom, x, y, xm, ym; in main() local
57 PetscCall(DMDAGetCorners(da, &x, &y, NULL, &xm, &ym, NULL)); in main()
59 PetscCall(ISCreateStride(PETSC_COMM_SELF, xm, 1, 1, &to)); in main()
63 PetscCall(PetscMalloc1(xm, &ifrom)); in main()
64 for (i = x; i < x + xm; i++) ifrom[i - x] = M * i; in main()
66 PetscCall(AOApplicationToPetsc(ao, xm, ifrom)); in main()
68 PetscCall(ISCreateGeneral(PETSC_COMM_WORLD, xm, ifrom, PETSC_OWN_POINTER, &from)); in main()
79 PetscCall(ISCreateStride(PETSC_COMM_SELF, ym, xm + 2, xm + 2, &to)); in main()
/petsc/src/snes/tutorials/
H A Dex3.c86 PetscInt its, N = 5, i, maxit, maxf, xs, xm; in main() local
239 PetscCall(DMDAGetCorners(ctx.da, &xs, NULL, NULL, &xm, NULL, NULL)); in main()
251 for (i = xs; i < xs + xm; i++) { in main()
353 PetscInt i, M, xs, xm; in FormFunction() local
381 PetscCall(DMDAGetCorners(da, &xs, NULL, NULL, &xm, NULL, NULL)); in FormFunction()
392 xm--; in FormFunction()
394 if (xs + xm == M) { /* right boundary */ in FormFunction()
395 ff[xs + xm - 1] = xx[xs + xm - 1] - 1.0; in FormFunction()
396 xm--; in FormFunction()
403 …for (i = xs; i < xs + xm; i++) ff[i] = d * (xx[i - 1] - 2.0 * xx[i] + xx[i + 1]) + xx[i] * xx[i] -… in FormFunction()
[all …]
H A Dex3k.kokkos.cxx52 PetscInt i, M, xs, xm; in CpuFunction() local
62 PetscCall(DMDAGetCorners(da, &xs, NULL, NULL, &xm, NULL, NULL)); in CpuFunction()
68 xm--; in CpuFunction()
70 if (xs + xm == M) { /* right boundary */ in CpuFunction()
71 R[xs + xm - 1] = X[xs + xm - 1] - 1.0; in CpuFunction()
72 xm--; in CpuFunction()
75 for (i = xs; i < xs + xm; i++) R[i] = d * (X[i - 1] - 2.0 * X[i] + X[i + 1]) + X[i] * X[i] - F[i]; in CpuFunction()
155 PetscInt i, j[3], M, xs, xm; in FormJacobian() local
163 PetscCall(DMDAGetCorners(da, &xs, NULL, NULL, &xm, NULL, NULL)); in FormJacobian()
181 xm--; in FormJacobian()
[all …]
H A Dex55k.kokkos.cxx41 …PetscInt xs = info->xs, ys = info->ys, xm = info->xm, ym = info->ym, mx = info->mx, my = info->my; in FormFunctionLocalVec() local
61 …cy<Rank<2, Iterate::Right, Iterate::Right>>(exec, {ys, xs}, {ys + ym, xs + xm}), KOKKOS_LAMBDA(Pet… in FormFunctionLocalVec()
112 PetscCall(PetscLogFlops(11.0 * info->ym * info->xm)); in FormFunctionLocalVec()
118 …PetscInt xs = info->xs, ys = info->ys, xm = info->xm, ym = info->ym, mx = info->mx, my = info->my; in FormObjectiveLocalVec() local
140 …alVec", MDRangePolicy<Rank<2, Iterate::Right, Iterate::Right>>(exec, {ys, xs}, {ys + ym, xs + xm}), in FormObjectiveLocalVec()
168 PetscCall(PetscLogFlops(12.0 * info->ym * info->xm)); in FormObjectiveLocalVec()
176 …PetscInt xs = info->xs, ys = info->ys, xm = info->xm, ym = info->ym, mx = info->mx, my = info-… in FormJacobianLocalVec() local
190 hx = xm > 1 ? PetscRealPart(coords[ys][xs + 1].x) - PetscRealPart(coords[ys][xs].x) : 1.0; in FormJacobianLocalVec()
202 PetscCount ncoo = ((PetscCount)xm) * ((PetscCount)ym) * 5; in FormJacobianLocalVec()
209 for (i = xs; i < xs + xm; i++) { in FormJacobianLocalVec()
[all …]
/petsc/src/ts/tutorials/advection-diffusion-reaction/
H A Dex3.c158 PetscInt i, mstart, mend, xm, M; in InitialConditions() local
163 PetscCall(DMDAGetCorners(da, &mstart, 0, 0, &xm, 0, 0)); in InitialConditions()
166 mend = mstart + xm; in InitialConditions()
206 PetscInt i, mstart, mend, xm, M; in Solution() local
211 PetscCall(DMDAGetCorners(da, &mstart, 0, 0, &xm, 0, 0)); in Solution()
214 mend = mstart + xm; in Solution()
261 PetscInt i, idx[3], M, xm; in RHSMatrixHeat() local
268 PetscCall(DMDAGetCorners(da, &mstart, 0, 0, &xm, 0, 0)); in RHSMatrixHeat()
270 mend = mstart + xm; in RHSMatrixHeat()
311 PetscCall(DMDAGetCorners(da, &mstart, 0, 0, &xm, 0, 0)); in RHSMatrixHeat()
[all …]
H A Dex4.c139 PetscInt i, Mx, xs, xm; in IFunction() local
172 PetscCall(DMDAGetCorners(da, &xs, NULL, NULL, &xm, NULL, NULL)); in IFunction()
178 xm--; in IFunction()
180 if (xs + xm == Mx) { in IFunction()
183 xm--; in IFunction()
189 for (i = xs; i < xs + xm; i++) { in IFunction()
220 PetscInt i, xs, xm, Mx; in InitialConditions() local
237 PetscCall(DMDAGetCorners(da, &xs, NULL, NULL, &xm, NULL, NULL)); in InitialConditions()
242 for (i = xs; i < xs + xm; i++) { in InitialConditions()
H A Dreaction_diffusion.c31 PetscInt i, j, Mx, My, xs, ys, xm, ym; in RHSFunction() local
64 PetscCall(DMDAGetCorners(da, &xs, &ys, NULL, &xm, &ym, NULL)); in RHSFunction()
70 for (i = xs; i < xs + xm; i++) { in RHSFunction()
81 PetscCall(PetscLogFlops(16.0 * xm * ym)); in RHSFunction()
96 PetscInt i, j, Mx, My, xs, ys, xm, ym; in RHSJacobian() local
131 PetscCall(DMDAGetCorners(da, &xs, &ys, NULL, &xm, &ym, NULL)); in RHSJacobian()
152 for (i = xs; i < xs + xm; i++) { in RHSJacobian()
209 PetscCall(PetscLogFlops(19.0 * xm * ym)); in RHSJacobian()
239 PetscInt i, j, Mx, My, xs, ys, xm, ym; in IFunction() local
273 PetscCall(DMDAGetCorners(da, &xs, &ys, NULL, &xm, &ym, NULL)); in IFunction()
[all …]
/petsc/src/ts/tutorials/
H A Dex8.py11 xs, xm = self.da.getCorners()
13 return xs[0], xm[0], gxs[0], gxm[0]
16 (xs,xm,gxs,gxm) = self.getCorners()
23 lxs, lxe = xs, xs+xm
31 (xs,xm,gxs,gxm) = self.getCorners()
37 lxs, lxe = xs, xs+xm
H A Dextchemfield.c94 PetscInt steps, ncells, xs, xm, i; in main() local
178 PetscCall(DMDAGetCorners(user.dm, &xs, NULL, NULL, &xm, NULL, NULL)); in main()
179 for (i = xs; i < xs + xm; i++) PetscCall(MonitorCell(ts, &user, i)); in main()
248 PetscInt i, xs, xm, j, dof; in FormDiffusionFunction() local
260 PetscCall(DMDAGetCorners(dm, &xs, NULL, NULL, &xm, NULL, NULL)); in FormDiffusionFunction()
263 for (i = xs; i < xs + xm; i++) { in FormDiffusionFunction()
279 PetscInt i, xs, xm, j, dof; in FormDiffusionJacobian() local
286 PetscCall(DMDAGetCorners(dm, &xs, NULL, NULL, &xm, NULL, NULL)); in FormDiffusionJacobian()
292 for (i = xs; i < xs + xm; i++) { in FormDiffusionJacobian()
316 PetscInt i, xs, xm; in FormRHSFunction() local
[all …]
H A Dex32.c41 PetscInt lsize, M, xs, xm, i; in InitialConditions() local
53 PetscCall(DMDAGetCorners(da, &xs, 0, 0, &xm, 0, 0)); in InitialConditions()
55 for (i = xs; i < xs + xm; i++) { in InitialConditions()
103 PetscInt M, xs, xm, i; in IFunction() local
111 PetscCall(DMDAGetCorners(da, &xs, 0, 0, &xm, 0, 0)); in IFunction()
123 for (i = xs; i < xs + xm; i++) { in IFunction()
149 PetscInt M, xs, xm, i; in IJacobian() local
156 PetscCall(DMDAGetCorners(da, &xs, 0, 0, &xm, 0, 0)); in IJacobian()
160 for (i = xs; i < xs + xm; i++) { in IJacobian()
/petsc/src/dm/tests/
H A Dex2k.kokkos.cxx36 PetscInt xm, ym, zm, xs, ys, zs, gxm, gym, gzm, gxs, gys, gzs; in Update1() local
39 PetscCall(DMDAGetCorners(da, &xs, &ys, &zs, &xm, &ym, &zm)); in Update1()
45 …for (i = xs; i < xs + xm; i++) y1[k][j][i] = 6 * x1[k][j][i] - x1[k - 1][j][i] - x1[k][j - 1][i] -… in Update1()
59 PetscInt xm, ym, zm, xs, ys, zs, gxm, gym, gzm, gxs, gys, gzs; in Update2() local
62 PetscCall(DMDAGetCorners(da, &xs, &ys, &zs, &xm, &ym, &zm)); in Update2()
65 #define Y2(k, j, i) y2[(k - zs) * ym * xm + (j - ys) * xm + (i - xs)] in Update2()
70 …for (i = xs; i < xs + xm; i++) Y2(k, j, i) = 6 * X2(k, j, i) - X2(k - 1, j, i) - X2(k, j - 1, i) -… in Update2()
84 PetscInt xm, ym, zm, xs, ys, zs, gxm, gym, gzm, gxs, gys, gzs; in main() local
111 PetscCall(DMDAGetCorners(da, &xs, &ys, &zs, &xm, &ym, &zm)); in main()
146 …xecutionSpace, Rank<3, Iterate::Right, Iterate::Right>>({zs, ys, xs}, {zs + zm, ys + ym, xs + xm}), in main()
/petsc/src/ts/tutorials/phasefield/
H A Dheat.c153 PetscInt i, Mx, xs, xm; in FormFunction() local
185 PetscCall(DMDAGetCorners(da, &xs, NULL, NULL, &xm, NULL, NULL)); in FormFunction()
190 for (i = xs; i < xs + xm; i++) { in FormFunction()
207 PetscInt i, xs, xm, Mx, scale = 1, N; in FormInitialSolution() local
228 PetscCall(DMDAGetCorners(da, &xs, NULL, NULL, &xm, NULL, NULL)); in FormInitialSolution()
247 for (i = xs; i < xs + xm; i++) { in FormInitialSolution()
279 PetscInt Mx, i, xs, xm, cnt; in MyMonitor() local
296 PetscCall(DMDAGetCorners(da, &xs, NULL, NULL, &xm, NULL, NULL)); in MyMonitor()
316 xm = (xx[1] - xx[0]) / hx; in MyMonitor()
325 for (i = xs; i < xs + xm; i++) { in MyMonitor()
[all …]
/petsc/src/ksp/ksp/tutorials/
H A Dex44f.F9049 PetscInt xs, xm, i, mx
53 …PetscCall(DMDAGetCorners(da, xs, PETSC_NULL_INTEGER, PETSC_NULL_INTEGER, xm, PETSC_NULL_INTEGER, P…
56 do i = xs, xs + xm - 1
70 PetscInt xs, xm, i, mx
75 …PetscCall(DMDAGetCorners(da, xs, PETSC_NULL_INTEGER, PETSC_NULL_INTEGER, xm, PETSC_NULL_INTEGER, P…
77 do i = xs, xs + xm - 1
/petsc/src/ts/tutorials/autodiff/
H A Dadr_ex5adj_mf.cxx184 PetscInt i, j, xs, ys, xm, ym, Mx, My; in InitialConditions() local
202 PetscCall(DMDAGetCorners(da, &xs, &ys, NULL, &xm, &ym, NULL)); in InitialConditions()
209 for (i = xs; i < xs + xm; i++) { in InitialConditions()
228 PetscInt i, j, Mx, My, xs, ys, xm, ym; in InitializeLambda() local
236 PetscCall(DMDAGetCorners(da, &xs, &ys, NULL, &xm, &ym, NULL)); in InitializeLambda()
238 if (xs <= i && i < xs + xm && ys <= j && j < ys + ym) { in InitializeLambda()
251 PetscInt i, j, xs, ys, xm, ym; in IFunctionLocalPassive() local
263 xm = info->xm; in IFunctionLocalPassive()
269 for (i = xs; i < xs + xm; i++) { in IFunctionLocalPassive()
280 PetscCall(PetscLogFlops(16.0 * xm * ym)); in IFunctionLocalPassive()
[all …]
/petsc/src/tao/unconstrained/tutorials/
H A Dminsurf2.c166 PetscInt xs, xm, gxs, gxm, ys, ym, gys, gym; in FormFunction() local
177 PetscCall(DMDAGetCorners(user->dm, &xs, &ys, NULL, &xm, &ym, NULL)); in FormFunction()
189 for (i = xs; i < xs + xm; i++) { in FormFunction()
242 for (i = xs; i < xs + xm; i++) { in FormFunction()
248 if (xs + xm == mx) { /* right side */ in FormFunction()
256 for (i = xs; i < xs + xm; i++) { in FormFunction()
267 if (ys + ym == my && xs + xm == mx) { in FormFunction()
269 d2 = (user->top[xm + 1] - user->top[xm]) * rhx; in FormFunction()
300 PetscInt xs, xm, gxs, gxm, ys, ym, gys, gym; in FormFunctionGradient() local
312 PetscCall(DMDAGetCorners(user->dm, &xs, &ys, NULL, &xm, &ym, NULL)); in FormFunctionGradient()
[all …]
/petsc/src/ts/tutorials/multirate/
H A Dex8.c126 PetscInt i, j, k, dof, xs, xm, Mx; in FVSample_3WaySplit() local
133 PetscCall(DMDAGetCorners(da, &xs, 0, 0, &xm, 0, 0)); in FVSample_3WaySplit()
140 for (i = xs; i < xs + xm; i++) { in FVSample_3WaySplit()
223 PetscInt i, j, k, Mx, dof, xs, xm, sm = ctx->sm, mf = ctx->mf, fm = ctx->fm, ms = ctx->ms; in FVRHSFunction_3WaySplit() local
245 PetscCall(DMDAGetCorners(da, &xs, 0, 0, &xm, 0, 0)); in FVRHSFunction_3WaySplit()
251 for (i = Mx; i < xs + xm + 2; i++) { in FVRHSFunction_3WaySplit()
252 for (j = 0; j < dof; j++) x[i * dof + j] = x[(xs + xm - 1) * dof + j]; in FVRHSFunction_3WaySplit()
255 for (i = xs - 1; i < xs + xm + 1; i++) { in FVRHSFunction_3WaySplit()
286 for (i = xs; i < xs + xm + 1; i++) { in FVRHSFunction_3WaySplit()
300 if (i < xs + xm) { in FVRHSFunction_3WaySplit()
[all …]
H A Dex6.c133 PetscInt i, j, k, dof, xs, xm, Mx; in FVSample_2WaySplit() local
140 PetscCall(DMDAGetCorners(da, &xs, 0, 0, &xm, 0, 0)); in FVSample_2WaySplit()
145 for (i = xs; i < xs + xm; i++) { in FVSample_2WaySplit()
208 PetscInt i, j, k, Mx, dof, xs, xm, sf = ctx->sf, fs = ctx->fs; in FVRHSFunction_2WaySplit() local
229 PetscCall(DMDAGetCorners(da, &xs, 0, 0, &xm, 0, 0)); in FVRHSFunction_2WaySplit()
235 for (i = Mx; i < xs + xm + 2; i++) { in FVRHSFunction_2WaySplit()
236 for (j = 0; j < dof; j++) x[i * dof + j] = x[(xs + xm - 1) * dof + j]; in FVRHSFunction_2WaySplit()
239 for (i = xs - 1; i < xs + xm + 1; i++) { in FVRHSFunction_2WaySplit()
269 for (i = xs; i < xs + xm + 1; i++) { in FVRHSFunction_2WaySplit()
283 if (i < xs + xm) { in FVRHSFunction_2WaySplit()
[all …]
/petsc/src/binding/petsc4py/demo/legacy/wrap-swig/
H A DBratu3D.c24 PetscInt i,j,k,Mx,My,Mz,xs,ys,zs,xm,ym,zm; in FormInitGuess() local
55 PetscCall(DMDAGetCorners(da,&xs,&ys,&zs,&xm,&ym,&zm)); in FormInitGuess()
64 for (i=xs; i<xs+xm; i++) { in FormInitGuess()
84 PetscInt i,j,k,Mx,My,Mz,xs,ys,zs,xm,ym,zm; in FormFunction() local
120 PetscCall(DMDAGetCorners(da,&xs,&ys,&zs,&xm,&ym,&zm)); in FormFunction()
127 for (i=xs; i<xs+xm; i++) { in FormFunction()
155 PetscCall(PetscLogFlops(11.0*ym*xm)); in FormFunction()
161 PetscInt i,j,k,Mx,My,Mz,xs,ys,zs,xm,ym,zm; in FormJacobian() local
197 PetscCall(DMDAGetCorners(da,&xs,&ys,&zs,&xm,&ym,&zm)); in FormJacobian()
216 for (i=xs; i<xs+xm; i++) { in FormJacobian()
/petsc/src/binding/petsc4py/demo/legacy/wrap-cython/
H A DBratu3Dimpl.c24 PetscInt i,j,k,Mx,My,Mz,xs,ys,zs,xm,ym,zm; in FormInitGuess() local
56 PetscCall(DMDAGetCorners(da,&xs,&ys,&zs,&xm,&ym,&zm)); in FormInitGuess()
65 for (i=xs; i<xs+xm; i++) { in FormInitGuess()
85 PetscInt i,j,k,Mx,My,Mz,xs,ys,zs,xm,ym,zm; in FormFunction() local
124 PetscCall(DMDAGetCorners(da,&xs,&ys,&zs,&xm,&ym,&zm)); in FormFunction()
131 for (i=xs; i<xs+xm; i++) { in FormFunction()
159 PetscCall(PetscLogFlops(11.0*ym*xm)); in FormFunction()
165 PetscInt i,j,k,Mx,My,Mz,xs,ys,zs,xm,ym,zm; in FormJacobian() local
204 PetscCall(DMDAGetCorners(da,&xs,&ys,&zs,&xm,&ym,&zm)); in FormJacobian()
223 for (i=xs; i<xs+xm; i++) { in FormJacobian()
/petsc/src/tao/bound/tutorials/
H A Djbearing2.c175 PetscInt nx, ny, xs, xm, gxs, gxm, ys, ym, gys, gym; in ComputeB() local
191 PetscCall(DMDAGetCorners(user->dm, &xs, &ys, NULL, &xm, &ym, NULL)); in ComputeB()
196 for (i = xs; i < xs + xm; i++) { in ComputeB()
199 k = xm * (j - ys) + (i - xs); in ComputeB()
204 PetscCall(PetscLogFlops(5.0 * xm * ym + 3.0 * xm)); in ComputeB()
212 PetscInt col[5], row, nx, ny, xs, xm, gxs, gxm, ys, ym, gys, gym; in FormFunctionGradient() local
240 PetscCall(DMDAGetCorners(user->dm, &xs, &ys, NULL, &xm, &ym, NULL)); in FormFunctionGradient()
246 for (i = xs; i < xs + xm; i++) { in FormFunctionGradient()
299 row = (j - ys) * xm + (i - xs); in FormFunctionGradient()
314 PetscCall(PetscLogFlops((91 + 10.0 * ym) * xm)); in FormFunctionGradient()
[all …]
/petsc/src/tao/complementarity/tutorials/
H A Dblackscholes.c126 PetscInt xs, xm, gxs, gxm; in main() local
168 PetscCall(DMDAGetCorners(user.dm, &xs, NULL, NULL, &xm, NULL, NULL)); in main()
217 for (i = 0; i < xm; i++) x_array[i] = user.Vt1[i - gxs + xs]; in main()
262 PetscInt xs, xm; in ComputeVariableBounds() local
269 PetscCall(DMDAGetCorners(user->dm, &xs, NULL, NULL, &xm, NULL, NULL)); in ComputeVariableBounds()
272 for (i = 0; i < xm; i++) { in ComputeVariableBounds()
283 if (xs + xm == ms) { in ComputeVariableBounds()
285 xl_array[xm - 1] = 0; in ComputeVariableBounds()
311 PetscInt i, xs, xm, gxs, gxm; in FormConstraints() local
320 PetscCall(DMDAGetCorners(user->dm, &xs, NULL, NULL, &xm, NULL, NULL)); in FormConstraints()
[all …]

123456