Home
last modified time | relevance | path

Searched refs:xc (Results 1 – 25 of 28) sorted by relevance

12

/petsc/src/sys/classes/draw/utils/
H A Dzoom.c20 PetscReal dpause, xc, yc, scale = 1.0, w, h, xr, xl, yr, yl, xmin, xmax, ymin, ymax; in PetscDrawZoom() local
41 PetscCall(PetscDrawGetMouseButton(draw, &button, &xc, &yc, NULL, NULL)); in PetscDrawZoom()
67 xl = scale * (xl + w - xc) + xc - w * scale; in PetscDrawZoom()
68 xr = scale * (xr - w - xc) + xc + w * scale; in PetscDrawZoom()
79 PetscCall(PetscDrawGetMouseButton(draw, &button, &xc, &yc, NULL, NULL)); in PetscDrawZoom()
/petsc/src/ts/tests/
H A Dex4.c277 PetscReal dx, dy, a, epsilon, xc, xl, xr, yl, yr; in RHSJacobian() local
288 xc = -2.0 * epsilon * (1.0 / (dx * dx) + 1.0 / (dy * dy)); in RHSJacobian()
295 v[0] = xc; in RHSJacobian()
305 v[1] = xc; in RHSJacobian()
315 v[1] = xc; in RHSJacobian()
327 v[0] = xc; in RHSJacobian()
338 v[0] = xc; in RHSJacobian()
350 v[0] = xc; in RHSJacobian()
365 v[0] = xc; in RHSJacobian()
374 v[0] = xc; in RHSJacobian()
[all …]
/petsc/src/ksp/ksp/tutorials/
H A Dex43-solcx.h8 PetscReal sum1, sum2, sum3, sum4, sum5, sum6, x, z, xc; in evaluate_solCx() local
59 xc = _x_c; in evaluate_solCx()
80 t9 = ZA * xc; in evaluate_solCx()
81 t12 = PetscExpReal(xc * n * 0.3141592654e1); in evaluate_solCx()
96 t34 = t1 * xc; in evaluate_solCx()
107 t48 = 0.3141592654e1 * xc; in evaluate_solCx()
109 t53 = xc * xc; in evaluate_solCx()
128 t89 = xc * t2; in evaluate_solCx()
144 t128 = t24 * xc; in evaluate_solCx()
148 t138 = t6 * xc; in evaluate_solCx()
[all …]
H A Dex68.c61 PetscReal norm, xc, yc; in main() local
114 xc = (PetscReal)n; in main()
116 PetscCall(PetscDrawLGAddPoint(lg, &xc, &yc)); in main()
H A Dex69.c98 PetscReal norm, xc, yc, h; in main() local
200 xc = (PetscReal)n; in main()
202 PetscCall(PetscDrawLGAddPoint(lg, &xc, &yc)); in main()
H A Dex73.c432 PetscErrorCode DMShellDAFieldScatter_Forward(DM dmf, Vec x, DM dmc, Vec xc) in DMShellDAFieldScatter_Forward() argument
458 if (xc) { in DMShellDAFieldScatter_Forward()
460 PetscCall(VecGetOwnershipRange(xc, &st, &ed)); in DMShellDAFieldScatter_Forward()
462 PetscCall(VecGetArray(xc, &LA_xred)); in DMShellDAFieldScatter_Forward()
464 PetscCall(VecRestoreArray(xc, &LA_xred)); in DMShellDAFieldScatter_Forward()
505 PetscErrorCode DMFieldScatter_ShellDA(DM dmf_shell, Vec x, ScatterMode mode, DM dmc_shell, Vec xc) in DMFieldScatter_ShellDA() argument
513 PetscCall(DMShellDAFieldScatter_Forward(dmf, x, dmc, xc)); in DMFieldScatter_ShellDA()
515 PetscCall(DMShellDAFieldScatter_Reverse(dmf, x, dmc, xc)); in DMFieldScatter_ShellDA()
/petsc/src/snes/tutorials/
H A Dex4.c119 PetscScalar f2, f4, d1, d2, d3, d4, xc, xl, xr, xt, xb; in FormObjectiveLocal() local
129 xc = x[j][i]; in FormObjectiveLocal()
130 xl = xr = xb = xt = xc; in FormObjectiveLocal()
148 d1 = (xc - xl); in FormObjectiveLocal()
149 d2 = (xc - xr); in FormObjectiveLocal()
150 d3 = (xc - xt); in FormObjectiveLocal()
151 d4 = (xc - xb); in FormObjectiveLocal()
217 PetscScalar f1, f2, f3, f4, f5, f6, d1, d2, d3, d4, d5, d6, d7, d8, xc, xl, xr, xt, xb, xlt, xrb; in FormFunctionLocal() local
229 xc = x[j][i]; in FormFunctionLocal()
230 xlt = xrb = xl = xr = xb = xt = xc; in FormFunctionLocal()
[all …]
H A Dex69.c37 PetscReal xc; /* The location of viscosity jump */ member
722 static PetscErrorCode SolCxSolution(const PetscReal pos[], PetscReal m, PetscInt n, PetscReal xc, P… in SolCxSolution() argument
783 t9 = ZA * xc; in SolCxSolution()
784 t12 = PetscExpReal(xc * nz * 0.3141592654e1); in SolCxSolution()
799 t34 = t1 * xc; in SolCxSolution()
810 t48 = 0.3141592654e1 * xc; in SolCxSolution()
812 t53 = xc * xc; in SolCxSolution()
831 t89 = xc * t2; in SolCxSolution()
847 t128 = t24 * xc; in SolCxSolution()
851 t138 = t6 * xc; in SolCxSolution()
[all …]
H A Dex58.c149 …PetscScalar f1, f2, f3, f4, f5, f6, d1, d2, d3, d4, d5, d6, d7, d8, xc, xl, xr, xt, xb, xlt, xrb; in FormGradient() local
180 xc = x[j][i]; in FormGradient()
181 xlt = xrb = xl = xr = xb = xt = xc; in FormGradient()
206 d1 = (xc - xl); in FormGradient()
207 d2 = (xc - xr); in FormGradient()
208 d3 = (xc - xt); in FormGradient()
209 d4 = (xc - xb); in FormGradient()
277 …PetscScalar f1, f2, f3, f4, f5, f6, d1, d2, d3, d4, d5, d6, d7, d8, xc, xl, xr, xt, xb, xlt, xrb; in FormJacobian() local
311 xc = x[j][i]; in FormJacobian()
312 xlt = xrb = xl = xr = xb = xt = xc; in FormJacobian()
[all …]
/petsc/src/tao/bound/tutorials/
H A Dplate2f.F9076 PetscReal xc, xl, xr, xt, xb, xlt, xrb
115 xc = x_v(1 + row)
116 xt = xc
117 xb = xc
118 xr = xc
119 xl = xc
120 xrb = xc
121 xlt = xc
159 d1 = xc - xl
160 d2 = xc - xr
[all …]
H A Dplate2.c207 PetscReal f1, f2, f3, f4, f5, f6, d1, d2, d3, d4, d5, d6, d7, d8, xc, xl, xr, xt, xb, xlt, xrb; in FormFunctionGradient() local
237 xc = x[row]; in FormFunctionGradient()
238 xlt = xrb = xl = xr = xb = xt = xc; in FormFunctionGradient()
271 d1 = (xc - xl); in FormFunctionGradient()
272 d2 = (xc - xr); in FormFunctionGradient()
273 d3 = (xc - xt); in FormFunctionGradient()
274 d4 = (xc - xb); in FormFunctionGradient()
423 PetscReal f1, f2, f3, f4, f5, f6, d1, d2, d3, d4, d5, d6, d7, d8, xc, xl, xr, xt, xb, xlt, xrb; in FormHessian() local
459 xc = x[row]; in FormHessian()
460 xlt = xrb = xl = xr = xb = xt = xc; in FormHessian()
[all …]
/petsc/src/tao/complementarity/tutorials/
H A Dminsurf1.c142 PetscReal f1, f2, f3, f4, f5, f6, d1, d2, d3, d4, d5, d6, d7, d8, xc, xl, xr, xt, xb, xlt, xrb; in FormConstraints() local
160 xc = x[row]; in FormConstraints()
161 xlt = xrb = xl = xr = xb = xt = xc; in FormConstraints()
194 d1 = (xc - xl); in FormConstraints()
195 d2 = (xc - xr); in FormConstraints()
196 d3 = (xc - xt); in FormConstraints()
197 d4 = (xc - xb); in FormConstraints()
264 …PetscReal f1, f2, f3, f4, f5, f6, d1, d2, d3, d4, d5, d6, d7, d8, xc, xl, xr, xt, xb, xlt… in FormJacobian() local
284 xc = x[row]; in FormJacobian()
285 xlt = xrb = xl = xr = xb = xt = xc; in FormJacobian()
[all …]
/petsc/src/sys/classes/draw/impls/image/
H A Ddrawimage.h84 static inline void PetscImageDrawEllipse(PetscImage img, int xc, int yc, int w, int h, int c) in PetscImageDrawEllipse() argument
89 PetscImageDrawLine(img, xc + x, yc + y, xc - x, yc + y, c); in PetscImageDrawEllipse()
90 PetscImageDrawLine(img, xc + x, yc - y, xc - x, yc - y, c); in PetscImageDrawEllipse()
98 PetscImageDrawLine(img, xc + x, yc + y, xc - x, yc + y, c); in PetscImageDrawEllipse()
99 PetscImageDrawLine(img, xc + x, yc - y, xc - x, yc - y, c); in PetscImageDrawEllipse()
H A Ddrawimage.c189 int xc = XTRANS(draw, img, x), w = XTRANS(draw, img, x + a / 2) + 0 - xc; in PetscDrawEllipse_Image() local
192 PetscImageDrawEllipse(img, xc, yc, w, h, c); in PetscDrawEllipse_Image()
/petsc/src/tao/unconstrained/tutorials/
H A Dminsurf1.c131 …PetscReal f1, f2, f3, f4, f5, f6, d1, d2, d3, d4, d5, d6, d7, d8, xc, xl, xr, xt, xb, xlt… in FormFunctionGradient() local
147 xc = x[row]; in FormFunctionGradient()
148 xlt = xrb = xl = xr = xb = xt = xc; in FormFunctionGradient()
180 d1 = (xc - xl); in FormFunctionGradient()
181 d2 = (xc - xr); in FormFunctionGradient()
182 d3 = (xc - xt); in FormFunctionGradient()
183 d4 = (xc - xb); in FormFunctionGradient()
310 …PetscReal f1, f2, f3, f4, f5, f6, d1, d2, d3, d4, d5, d6, d7, d8, xc, xl, xr, xt, xb, xlt… in QuadraticH() local
330 xc = x[row]; in QuadraticH()
331 xlt = xrb = xl = xr = xb = xt = xc; in QuadraticH()
[all …]
H A Dminsurf2.c170 PetscReal f2, f4, d1, d2, d3, d4, xc, xl, xr, xt, xb; in FormFunction() local
190 xc = x[j][i]; in FormFunction()
216 d1 = (xc - xl); in FormFunction()
217 d2 = (xc - xr); in FormFunction()
218 d3 = (xc - xt); in FormFunction()
219 d4 = (xc - xb); in FormFunction()
304 PetscReal f1, f2, f3, f4, f5, f6, d1, d2, d3, d4, d5, d6, d7, d8, xc, xl, xr, xt, xb, xlt, xrb; in FormFunctionGradient() local
326 xc = x[j][i]; in FormFunctionGradient()
327 xlt = xrb = xl = xr = xb = xt = xc; in FormFunctionGradient()
360 d1 = (xc - xl); in FormFunctionGradient()
[all …]
/petsc/src/sys/classes/draw/interface/
H A Ddtext.c81 PetscErrorCode PetscDrawStringCentered(PetscDraw draw, PetscReal xc, PetscReal yl, int cl, const ch… in PetscDrawStringCentered() argument
92 xc = xc - ((PetscReal)len) * tw / 2; in PetscDrawStringCentered()
93 PetscCall(PetscDrawString(draw, xc, yl, cl, text)); in PetscDrawStringCentered()
/petsc/src/dm/impls/stag/
H A Dstagmulti.c24 PetscErrorCode DMStagRestrictSimple(DM dmf, Vec xf, DM dmc, Vec xc) in DMStagRestrictSimple() argument
50 PetscCall(VecGetLocalSize(xc, &size_local)); in DMStagRestrictSimple()
56 PetscCall(DMStagRestrictSimple_1d(dmf, xf, dmc, xc)); in DMStagRestrictSimple()
59 PetscCall(DMStagRestrictSimple_2d(dmf, xf, dmc, xc)); in DMStagRestrictSimple()
62 PetscCall(DMStagRestrictSimple_3d(dmf, xf, dmc, xc)); in DMStagRestrictSimple()
995 PetscInt xc, mc, nExtraxc, i, d, ii, count; in DMStagPopulateRestriction1d_Internal() local
1017 PetscCall(DMStagGetCorners(dmc, &xc, NULL, NULL, &mc, NULL, NULL, &nExtraxc, NULL, NULL)); in DMStagPopulateRestriction1d_Internal()
1020 for (i = xc; i < xc + mc + nExtraxc; ++i) { in DMStagPopulateRestriction1d_Internal()
1042 for (i = xc; i < xc + mc; ++i) { in DMStagPopulateRestriction1d_Internal()
1067 PetscInt xc, yc, mc, nc, nExtraxc, nExtrayc, i, j, d, ii, jj, count; in DMStagPopulateRestriction2d_Internal() local
[all …]
H A Dstag1d.c54 PetscInt xc, mc, nExtraxc, i, d; in DMStagRestrictSimple_1d() local
65 PetscCall(DMStagGetCorners(dmc, &xc, NULL, NULL, &mc, NULL, NULL, &nExtraxc, NULL, NULL)); in DMStagRestrictSimple_1d()
75 for (i = xc; i < xc + mc + nExtraxc; ++i) arrc[i][ileftc + d] = arrf[factorx * i][ileftf + d]; in DMStagRestrictSimple_1d()
78 for (i = xc; i < xc + mc; ++i) { in DMStagRestrictSimple_1d()
H A Dstag2d.c60 PetscInt xc, yc, mc, nc, nExtraxc, nExtrayc, i, j, d; in DMStagRestrictSimple_2d() local
72 PetscCall(DMStagGetCorners(dmc, &xc, &yc, NULL, &mc, &nc, NULL, &nExtraxc, &nExtrayc, NULL)); in DMStagRestrictSimple_2d()
87 for (i = xc; i < xc + mc + nExtraxc; ++i) { in DMStagRestrictSimple_2d()
95 for (i = xc; i < xc + mc + nExtraxc; ++i) { in DMStagRestrictSimple_2d()
104 for (i = xc; i < xc + mc; ++i) { in DMStagRestrictSimple_2d()
113 for (i = xc; i < xc + mc; ++i) { in DMStagRestrictSimple_2d()
H A Dstag3d.c67 PetscInt xc, yc, zc, mc, nc, pc, nExtraxc, nExtrayc, nExtrazc, i, j, k, d; in DMStagRestrictSimple_3d() local
81 PetscCall(DMStagGetCorners(dmc, &xc, &yc, &zc, &mc, &nc, &pc, &nExtraxc, &nExtrayc, &nExtrazc)); in DMStagRestrictSimple_3d()
105 for (i = xc; i < xc + mc + nExtraxc; ++i) { in DMStagRestrictSimple_3d()
114 for (i = xc; i < xc + mc; ++i) { in DMStagRestrictSimple_3d()
124 for (i = xc; i < xc + mc + nExtraxc; ++i) { in DMStagRestrictSimple_3d()
134 for (i = xc; i < xc + mc + nExtraxc; ++i) { in DMStagRestrictSimple_3d()
144 for (i = xc; i < xc + mc; ++i) { in DMStagRestrictSimple_3d()
156 for (i = xc; i < xc + mc; ++i) { in DMStagRestrictSimple_3d()
168 for (i = xc; i < xc + mc + nExtraxc; ++i) { in DMStagRestrictSimple_3d()
180 for (i = xc; i < xc + mc; ++i) { in DMStagRestrictSimple_3d()
/petsc/src/ts/tutorials/
H A Dextchemfield.c383 PetscScalar **x, *xc; in FormInitialSolution() local
401 PetscCall(DMDAGetCoordinateArray(dm, &xc)); in FormInitialSolution()
404 …x[i][0] = 1.0 + .05 * PetscSinScalar(2. * PETSC_PI * xc[i]); /* Non-dimensionalized by user->Tini … in FormInitialSolution()
413 PetscCall(DMDARestoreCoordinateArray(dm, &xc)); in FormInitialSolution()
464 PetscReal temp, *xc; in MonitorCell() local
468 PetscCall(DMDAGetCoordinateArray(user->dm, &xc)); in MonitorCell()
469 …temp = 1.0 + .05 * PetscSinScalar(2. * PETSC_PI * xc[cell]); /* Non-dimensionalized by user->Tini … in MonitorCell()
470 PetscCall(DMDARestoreCoordinateArray(user->dm, &xc)); in MonitorCell()
H A Dex18.c837 PetscScalar *xc; in SetInitialConditionFVM() local
840 PetscCall(DMPlexPointGlobalFieldRef(dm, c, field, x, &xc)); in SetInitialConditionFVM()
841 if (xc) PetscCall((*func)(dim, 0.0, cg->centroid, Nf, xc, ctx)); in SetInitialConditionFVM()
/petsc/src/dm/impls/da/
H A Ddacorn.c373 PetscErrorCode DMDAGetCoordinateArray(DM dm, void *xc) in DMDAGetCoordinateArray() argument
382 PetscCall(DMDAVecGetArray(cdm, x, xc)); in DMDAGetCoordinateArray()
399 PetscErrorCode DMDARestoreCoordinateArray(DM dm, void *xc) in DMDARestoreCoordinateArray() argument
408 PetscCall(DMDAVecRestoreArray(cdm, x, xc)); in DMDARestoreCoordinateArray()
/petsc/
H A D.gitignore94 *.xc*

12