Home
last modified time | relevance | path

Searched refs:Mx (Results 1 – 25 of 47) sorted by relevance

12

/petsc/src/ts/tutorials/advection-diffusion-reaction/
H A Dex4.c139 PetscInt i, Mx, xs, xm; in IFunction() local
148 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNOR… in IFunction()
150 hx = 1.0 / (PetscReal)(Mx - 1); in IFunction()
180 if (xs + xm == Mx) { in IFunction()
181 f[Mx - 1].rho = udot[Mx - 1].rho; /* u[Mx-1].rho - 1.0; */ in IFunction()
182 f[Mx - 1].c = udot[Mx - 1].c; /* u[Mx-1].c - 0.0; */ in IFunction()
220 PetscInt i, xs, xm, Mx; in InitialConditions() local
225 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNOR… in InitialConditions()
227 hx = 1.0 / (PetscReal)(Mx - 1); in InitialConditions()
244 if (i < Mx - 1) u[i].rho = 0.0; in InitialConditions()
H A Dex5adj_mf.c38 PetscInt i, j, Mx, My, xs, ys, xm, ym; in InitializeLambda() local
42 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, &My, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_… in InitializeLambda()
44 i = (PetscInt)(x * (Mx - 1)); in InitializeLambda()
63 PetscInt i, j, Mx, My, xs, ys, xm, ym; in MyRHSMatMultTranspose() local
74 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, &My, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_… in MyRHSMatMultTranspose()
75 hx = 2.50 / (PetscReal)Mx; in MyRHSMatMultTranspose()
122 PetscInt i, j, Mx, My, xs, ys, xm, ym; in MyIMatMultTranspose() local
133 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, &My, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_… in MyIMatMultTranspose()
134 hx = 2.50 / (PetscReal)Mx; in MyIMatMultTranspose()
183 PetscInt i, j, Mx, My, xs, ys, xm, ym; in MyIMatMult() local
[all …]
H A Dex5opt_ic.c82 PetscInt i, j, xs, ys, xm, ym, Mx, My; in InitialConditions() local
87 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, &My, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_… in InitialConditions()
89 hx = 2.5 / (PetscReal)Mx; in InitialConditions()
114 PetscInt i, j, xs, ys, xm, ym, Mx, My; in PerturbedInitialConditions() local
119 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, &My, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_… in PerturbedInitialConditions()
121 hx = 2.5 / (PetscReal)Mx; in PerturbedInitialConditions()
146 PetscInt i, j, xs, ys, xm, ym, Mx, My; in PerturbedInitialConditions2() local
151 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, &My, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_… in PerturbedInitialConditions2()
153 hx = 2.5 / (PetscReal)Mx; in PerturbedInitialConditions2()
179 PetscInt i, j, xs, ys, xm, ym, Mx, My; in PerturbedInitialConditions3() local
[all …]
H A Dex5adj.c22 PetscInt i, j, Mx, My, xs, ys, xm, ym; in InitializeLambda() local
26 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, &My, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_… in InitializeLambda()
28 i = (PetscInt)(x * (Mx - 1)); in InitializeLambda()
155 PetscInt i, j, xs, ys, xm, ym, Mx, My; in InitialConditions() local
160 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, &My, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_… in InitialConditions()
162 hx = 2.5 / (PetscReal)Mx; in InitialConditions()
H A Dreaction_diffusion.c31 PetscInt i, j, Mx, My, xs, ys, xm, ym; in RHSFunction() local
40 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, &My, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_… in RHSFunction()
41 hx = 2.50 / (PetscReal)Mx; in RHSFunction()
96 PetscInt i, j, Mx, My, xs, ys, xm, ym; in RHSJacobian() local
107 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, &My, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_… in RHSJacobian()
109 hx = 2.50 / (PetscReal)Mx; in RHSJacobian()
239 PetscInt i, j, Mx, My, xs, ys, xm, ym; in IFunction() local
248 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, &My, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_… in IFunction()
249 hx = 2.50 / (PetscReal)Mx; in IFunction()
306 PetscInt i, j, Mx, My, xs, ys, xm, ym; in IJacobian() local
[all …]
/petsc/src/dm/impls/da/
H A Ddainterp.c41 PetscInt i, i_start, m_f, Mx; in DMCreateInterpolation_DA_1D_Q1() local
53 …PetscCall(DMDAGetInfo(dac, NULL, &Mx, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &bx, NULL, NULL, N… in DMCreateInterpolation_DA_1D_Q1()
56 ratio = mx / Mx; in DMCreateInterpolation_DA_1D_Q1()
57 …io * Mx == mx, PETSC_COMM_SELF, PETSC_ERR_ARG_INCOMP, "Ratio between levels: mx/Mx must be intege… in DMCreateInterpolation_DA_1D_Q1()
59 ratio = (mx - 1) / (Mx - 1); in DMCreateInterpolation_DA_1D_Q1()
60Mx - 1) == mx - 1, PETSC_COMM_SELF, PETSC_ERR_ARG_INCOMP, "Ratio between levels: (mx - 1)/(Mx - 1)… in DMCreateInterpolation_DA_1D_Q1()
82 PetscCall(MatSetSizes(mat, m_f, m_c, mx, Mx)); in DMCreateInterpolation_DA_1D_Q1()
172 PetscInt i, i_start, m_f, Mx; in DMCreateInterpolation_DA_1D_Q0() local
184 …PetscCall(DMDAGetInfo(dac, NULL, &Mx, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &bx, NULL, NULL, N… in DMCreateInterpolation_DA_1D_Q0()
187 …PetscCheck(Mx, PETSC_COMM_SELF, PETSC_ERR_ARG_INCOMP, "Number of x coarse grid points %" PetscInt_… in DMCreateInterpolation_DA_1D_Q0()
[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
29 …PetscCall(DMDAGetInfo(da,PETSC_IGNORE,&Mx,&My,&Mz,PETSC_IGNORE,PETSC_IGNORE,PETSC_IGNORE,PETSC_IGN… in FormInitGuess()
31 hx = 1.0/(PetscReal)(Mx-1); in FormInitGuess()
65 if (i == 0 || j == 0 || k == 0 || i == Mx-1 || j == My-1 || k == Mz-1) { in FormInitGuess()
69 x[k][j][i] = temp1*sqrt(PetscMin((PetscReal)(PetscMin(i,Mx-i-1))*hx,tempj)); in FormInitGuess()
84 PetscInt i,j,k,Mx,My,Mz,xs,ys,zs,xm,ym,zm; in FormFunction() local
90 …PetscCall(DMDAGetInfo(da,PETSC_IGNORE,&Mx,&My,&Mz,PETSC_IGNORE,PETSC_IGNORE,PETSC_IGNORE,PETSC_IGN… in FormFunction()
92 hx = 1.0/(PetscReal)(Mx-1); in FormFunction()
128 if (i == 0 || j == 0 || k == 0 || i == Mx-1 || j == My-1 || k == Mz-1) { in FormFunction()
161 PetscInt i,j,k,Mx,My,Mz,xs,ys,zs,xm,ym,zm; in FormJacobian() local
[all …]
/petsc/src/ts/tutorials/
H A Dex17.c160 PetscInt i, Mx, xs, xm; in FormIFunction() local
168 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNOR… in FormIFunction()
170 hx = 1.0 / (PetscReal)(Mx - 1); in FormIFunction()
193 if (i == 0 || i == Mx - 1) f[i] = u[i]; /* F = U */ in FormIFunction()
197 else if (i == Mx - 1) f[i] = u[i] - u[i - 1]; in FormIFunction()
216 PetscInt i, rstart, rend, Mx; in FormIJacobian() local
227 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNOR… in FormIJacobian()
228 hx = 1.0 / (PetscReal)(Mx - 1); in FormIJacobian()
233 if (user->boundary == 0 && (i == 0 || i == Mx - 1)) { in FormIJacobian()
241 } else if (user->boundary > 0 && i == Mx - 1) { /* Right Neumann */ in FormIJacobian()
[all …]
H A Dex15.c159 PetscInt i, j, Mx, My, xs, ys, xm, ym; in FormIFunction() local
166 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, &My, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_… in FormIFunction()
168 hx = 1.0 / (PetscReal)(Mx - 1); in FormIFunction()
195 if (i == 0 || j == 0 || i == Mx - 1 || j == My - 1) { in FormIFunction()
201 } else if (i == Mx - 1 && j == 0) { /* SE corner */ in FormIFunction()
205 } else if (i == Mx - 1 && j == My - 1) { /* NE corner */ in FormIFunction()
209 } else if (i == Mx - 1) { /* Right */ in FormIFunction()
248 PetscInt i, j, Mx, My, xs, ys, xm, ym, nc; in FormIJacobian() local
255 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, &My, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_… in FormIJacobian()
258 hx = 1.0 / (PetscReal)(Mx - 1); in FormIJacobian()
[all …]
H A Dex7.c127 PetscInt i, j, Mx, My, xs, ys, xm, ym; in FormFunction() local
135 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, &My, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_… in FormFunction()
137 hx = 1.0 / (PetscReal)(Mx - 1); in FormFunction()
167 if (i == 0 || j == 0 || i == Mx - 1 || j == My - 1) { in FormFunction()
192 PetscInt i, j, xs, ys, xm, ym, Mx, My; in FormInitialSolution() local
197 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, &My, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_… in FormInitialSolution()
199 hx = 1.0 / (PetscReal)(Mx - 1); in FormInitialSolution()
H A Dex12.c134 PetscInt i, j, Mx, My, xs, ys, xm, ym; in FormFunction() local
141 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, &My, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_… in FormFunction()
143 hx = 1.0 / (PetscReal)(Mx - 1); in FormFunction()
175 if (i == 0 || j == 0 || i == Mx - 1 || j == My - 1) { in FormFunction()
202 PetscInt i, j, xs, ys, xm, ym, Mx, My; in FormInitialSolution() local
207 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, &My, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_… in FormInitialSolution()
209 hx = 1.0 / (PetscReal)(Mx - 1); in FormInitialSolution()
H A Dex13.c120 PetscInt i, j, Mx, My, xs, ys, xm, ym; in RHSFunction() local
128 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, &My, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_… in RHSFunction()
130 hx = 1.0 / (PetscReal)(Mx - 1); in RHSFunction()
154 if (i == 0 || j == 0 || i == Mx - 1 || j == My - 1) { in RHSFunction()
246 PetscInt i, j, xs, ys, xm, ym, Mx, My; in FormInitialSolution() local
251 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, &My, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_… in FormInitialSolution()
253 hx = 1.0 / (PetscReal)(Mx - 1); in FormInitialSolution()
H A Dex29.c169 PetscInt i, j, Mx, My, xs, ys, xm, ym; in FormInitialGuess() local
174 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, &My, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_… in FormInitialGuess()
181 x0 = 10.0 * (i - 0.5 * (Mx - 1)) / (Mx - 1); in FormInitialGuess()
182 x1 = 10.0 * (j - 0.5 * (Mx - 1)) / (My - 1); in FormInitialGuess()
193 PetscInt i, j, Mx, My, xs, ys, xm, ym; in FormDiffusionCoefficient() local
198 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, &My, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_… in FormDiffusionCoefficient()
210 x0 = 10.0 * (i - 0.5 * (Mx - 1)) / (Mx - 1); in FormDiffusionCoefficient()
/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
29 …PetscCall(DMDAGetInfo(da,PETSC_IGNORE,&Mx,&My,&Mz,PETSC_IGNORE,PETSC_IGNORE,PETSC_IGNORE,PETSC_IGN… in FormInitGuess()
32 hx = 1.0/(PetscReal)(Mx-1); in FormInitGuess()
66 if (i == 0 || j == 0 || k == 0 || i == Mx-1 || j == My-1 || k == Mz-1) { in FormInitGuess()
70 x[k][j][i] = temp1*sqrt(PetscMin((PetscReal)(PetscMin(i,Mx-i-1))*hx,tempj)); in FormInitGuess()
85 PetscInt i,j,k,Mx,My,Mz,xs,ys,zs,xm,ym,zm; in FormFunction() local
91 …PetscCall(DMDAGetInfo(da,PETSC_IGNORE,&Mx,&My,&Mz,PETSC_IGNORE,PETSC_IGNORE,PETSC_IGNORE,PETSC_IGN… in FormFunction()
93 hx = 1.0/(PetscReal)(Mx-1); in FormFunction()
132 if (i == 0 || j == 0 || k == 0 || i == Mx-1 || j == My-1 || k == Mz-1) { in FormFunction()
165 PetscInt i,j,k,Mx,My,Mz,xs,ys,zs,xm,ym,zm; in FormJacobian() local
[all …]
/petsc/src/ts/tutorials/phasefield/
H A Dbiharmonic2.c48 PetscInt steps, Mx; in main() local
87 PetscCall(DMDAGetInfo(da, 0, &Mx, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)); in main()
88 dt = 1.0 / (10. * ctx.kappa * Mx * Mx * Mx * Mx); in main()
186 PetscInt i, Mx, xs, xm; in FormFunction() local
196 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNOR… in FormFunction()
198 hx = 1.0 / (PetscReal)Mx; in FormFunction()
261 PetscInt i, xs, xm, Mx, xgs, xgm; in FormInitialSolution() local
267 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNOR… in FormInitialSolution()
269 hx = 1.0 / (PetscReal)Mx; in FormInitialSolution()
H A Dbiharmonic3.c48 PetscInt steps, Mx; in main() local
85 PetscCall(DMDAGetInfo(da, 0, &Mx, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)); in main()
86 dt = 1.0 / (10. * ctx.kappa * Mx * Mx * Mx * Mx); in main()
185 PetscInt i, Mx, xs, xm; in FormFunction() local
196 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNOR… in FormFunction()
198 hx = 1.0 / (PetscReal)Mx; in FormFunction()
271 PetscInt i, xs, xm, Mx, xgs, xgm; in FormInitialSolution() local
277 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNOR… in FormInitialSolution()
279 hx = 1.0 / (PetscReal)Mx; in FormInitialSolution()
H A Dheat.c46 PetscInt steps, Mx; in main() local
72 PetscCall(DMDAGetInfo(da, 0, &Mx, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)); in main()
73 dt = 1.0 / (ctx.kappa * Mx * Mx); in main()
153 PetscInt i, Mx, xs, xm; in FormFunction() local
162 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNOR… in FormFunction()
164 hx = 1.0 / (PetscReal)Mx; in FormFunction()
207 PetscInt i, xs, xm, Mx, scale = 1, N; in FormInitialSolution() local
216 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNOR… in FormInitialSolution()
218 hx = 1.0 / (PetscReal)Mx; in FormInitialSolution()
240 scale = N / Mx; in FormInitialSolution()
[all …]
H A Dpotentials.c10 PetscInt Mx = 100, i; in main() local
11 PetscReal x, hx = .1 / Mx, pause, xx[3], yy[3]; in main()
34 for (i = 0; i < Mx; i++) { in main()
54 for (i = 0; i < Mx; i++) { in main()
/petsc/src/dm/tutorials/
H A Dex22.c34 PetscInt Mx = 4, My = 4, Mz = 4; /* Dimensions for 3D DMDA */ in main() local
60 …PetscCall(PetscOptionsRangeInt("-Mx", "dimension along x-axis", "ex22.c", Mx, &Mx, NULL, 0, PETSC_… in main()
69 …PetscCheck(gp <= Mx, PETSC_COMM_WORLD, PETSC_ERR_USER_INPUT, "grid point along sliceaxis is larger… in main()
79 …, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, DMDA_STENCIL_STAR, Mx, My, Mz, PETSC_DECID… in main()
96 …for (i = ixs; i < ixs + ixm; i++) vecdata3d[k][j][i] = ((i - Mx / 2.0) * (j + Mx / 2.0)) + k * 100; in main()
115 upper.i = Mx; in main()
122 upper.i = Mx; in main()
155 M1 = Mx; in main()
161 M1 = Mx; in main()
/petsc/src/snes/tutorials/
H A Dex47cu.cu78 PetscInt i, Mx, xs, xm, xstartshift, xendshift, fstart, lsize; in ComputeFunction() local
88 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNOR… in ComputeFunction()
89 hx = 1.0 / (PetscReal)(Mx - 1); in ComputeFunction()
116 thrust::constant_iterator<int>(Mx), in ComputeFunction()
125 thrust::constant_iterator<int>(Mx), in ComputeFunction()
141 if (i == 0 || i == Mx - 1) ff[i] = xx[i] / hx; in ComputeFunction()
153 PetscInt i, Mx, xm, xs; in ComputeJacobian() local
158 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNOR… in ComputeJacobian()
159 hx = 1.0 / (PetscReal)(Mx - 1); in ComputeJacobian()
167 if (i == 0 || i == Mx - 1) { in ComputeJacobian()
H A Dex14.c204 PetscInt i, j, k, Mx, My, Mz, xs, ys, zs, xm, ym, zm; in FormInitialGuess() local
209 …PetscCall(DMDAGetInfo(user->da, PETSC_IGNORE, &Mx, &My, &Mz, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGN… in FormInitialGuess()
212 hx = 1.0 / (PetscReal)(Mx - 1); in FormInitialGuess()
242 if (i == 0 || j == 0 || k == 0 || i == Mx - 1 || j == My - 1 || k == Mz - 1) { in FormInitialGuess()
246 … x[k][j][i] = temp1 * PetscSqrtReal(PetscMin((PetscReal)(PetscMin(i, Mx - i - 1)) * hx, tempj)); in FormInitialGuess()
273 PetscInt i, j, k, Mx, My, Mz, xs, ys, zs, xm, ym, zm; in FormFunctionLocal() local
280 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, &My, &Mz, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, P… in FormFunctionLocal()
283 hx = 1.0 / (PetscReal)(Mx - 1); in FormFunctionLocal()
308 if (i == 0 || j == 0 || k == 0 || i == Mx - 1 || j == My - 1 || k == Mz - 1) { in FormFunctionLocal()
387 PetscInt i, j, k, Mx, My, Mz; in FormJacobian() local
[all …]
/petsc/src/ts/tutorials/multirate/
H A Dex7.c172 PetscInt i, j, Mx, dof, xs, xm, sf = ctx->sf, fs = ctx->fs; in FVRHSFunction() local
181 …PetscCall(DMDAGetInfo(da, 0, &Mx, 0, 0, 0, 0, 0, &dof, 0, 0, 0, 0, 0)); /* Mx is the number of cen… in FVRHSFunction()
182 hs = (ctx->xmax - ctx->xmin) / 2.0 * (ctx->hratio + 1.0) / Mx; in FVRHSFunction()
183 hf = (ctx->xmax - ctx->xmin) / 2.0 * (1.0 + 1.0 / ctx->hratio) / Mx; in FVRHSFunction()
196 for (i = Mx; i < xs + xm + 2; i++) { in FVRHSFunction()
321 PetscInt i, j, Mx, dof, xs, xm, islow = 0, sf = ctx->sf, fs = ctx->fs; in FVRHSFunctionslow() local
330 …PetscCall(DMDAGetInfo(da, 0, &Mx, 0, 0, 0, 0, 0, &dof, 0, 0, 0, 0, 0)); /* Mx is the number of cen… in FVRHSFunctionslow()
331 hs = (ctx->xmax - ctx->xmin) / 2.0 * (ctx->hratio + 1.0) / Mx; in FVRHSFunctionslow()
332 hf = (ctx->xmax - ctx->xmin) / 2.0 * (1.0 + 1.0 / ctx->hratio) / Mx; in FVRHSFunctionslow()
345 for (i = Mx; i < xs + xm + 2; i++) { in FVRHSFunctionslow()
[all …]
H A Dex4.c477 PetscInt i, j, k, dof, xs, xm, Mx; in FVSample_2WaySplit() local
483 PetscCall(DMDAGetInfo(da, 0, &Mx, 0, 0, 0, 0, 0, &dof, 0, 0, 0, 0, 0)); in FVSample_2WaySplit()
527 PetscInt i, Mx; in SolutionErrorNorms_2WaySplit() local
532 PetscCall(VecGetSize(X, &Mx)); in SolutionErrorNorms_2WaySplit()
539 for (i = 0; i < Mx; i++) { in SolutionErrorNorms_2WaySplit()
552 PetscInt i, j, k, Mx, dof, xs, xm, sf = ctx->sf, fs = ctx->fs; in FVRHSFunction_2WaySplit() local
561 …PetscCall(DMDAGetInfo(da, 0, &Mx, 0, 0, 0, 0, 0, &dof, 0, 0, 0, 0, 0)); /* Mx is the number of cen… in FVRHSFunction_2WaySplit()
578 for (i = Mx; i < xs + xm + 2; i++) { in FVRHSFunction_2WaySplit()
596 if (xs + xm == Mx) { /* Right Boundary */ in FVRHSFunction_2WaySplit()
600 …for (i = Mx; i < Mx + 2; i++) x[i * dof + j] = 2.0 * ctx->ub[dof + j] - x[(2 * Mx - (i + 1)) * dof… in FVRHSFunction_2WaySplit()
[all …]
H A Dex5.c190 PetscInt i, j, k, Mx, dof, xs, xm, len_slow; in FVRHSFunctionslow() local
199 PetscCall(DMDAGetInfo(da, 0, &Mx, 0, 0, 0, 0, 0, &dof, 0, 0, 0, 0, 0)); in FVRHSFunctionslow()
200 hx = (ctx->xmax - ctx->xmin) / Mx; in FVRHSFunctionslow()
214 for (i = Mx; i < xs + xm + 2; i++) { in FVRHSFunctionslow()
295 PetscInt i, j, k, Mx, dof, xs, xm, len_slow; in FVRHSFunctionfast() local
304 PetscCall(DMDAGetInfo(da, 0, &Mx, 0, 0, 0, 0, 0, &dof, 0, 0, 0, 0, 0)); in FVRHSFunctionfast()
305 hx = (ctx->xmax - ctx->xmin) / Mx; in FVRHSFunctionfast()
319 for (i = Mx; i < xs + xm + 2; i++) { in FVRHSFunctionfast()
396 PetscInt i, j, k, Mx, dof, xs, xm, len_slow1, len_slow2; in FVRHSFunctionslow2() local
405 PetscCall(DMDAGetInfo(da, 0, &Mx, 0, 0, 0, 0, 0, &dof, 0, 0, 0, 0, 0)); in FVRHSFunctionslow2()
[all …]
/petsc/src/ts/tests/
H A Dex24.c20 PetscInt i, j, Mx, My, xs, ys, xm, ym; in RHSJacobian() local
31 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, &My, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_… in RHSJacobian()
33 hx = 2.50 / (PetscReal)Mx; in RHSJacobian()
142 PetscInt i, j, xs, ys, xm, ym, Mx, My; in InitialConditions() local
147 …PetscCall(DMDAGetInfo(da, PETSC_IGNORE, &Mx, &My, PETSC_IGNORE, PETSC_IGNORE, PETSC_IGNORE, PETSC_… in InitialConditions()
149 hx = 2.5 / (PetscReal)Mx; in InitialConditions()

12