Home
last modified time | relevance | path

Searched refs:xl (Results 1 – 25 of 85) sorted by relevance

1234

/petsc/src/sys/classes/draw/interface/
H A Ddviewp.c25 PetscErrorCode PetscDrawSetViewPort(PetscDraw draw, PetscReal xl, PetscReal yl, PetscReal xr, Petsc… in PetscDrawSetViewPort() argument
29xl >= 0.0 && xr <= 1.0 && yl >= 0.0 && yr <= 1.0 && xr > xl && yr > yl, PETSC_COMM_SELF, PETSC_ERR… in PetscDrawSetViewPort()
30 draw->port_xl = xl; in PetscDrawSetViewPort()
34 PetscTryTypeMethod(draw, setviewport, xl, yl, xr, yr); in PetscDrawSetViewPort()
62 PetscErrorCode PetscDrawGetViewPort(PetscDraw draw, PetscReal *xl, PetscReal *yl, PetscReal *xr, Pe… in PetscDrawGetViewPort() argument
66 PetscAssertPointer(xl, 2); in PetscDrawGetViewPort()
70 *xl = draw->port_xl; in PetscDrawGetViewPort()
95 PetscReal xl, xr, yl, yr, h; in PetscDrawSplitViewPort() local
108 xl = ((PetscReal)(rank % n)) * h; in PetscDrawSplitViewPort()
109 xr = xl + h; in PetscDrawSplitViewPort()
[all …]
H A Ddcoor.c23 PetscErrorCode PetscDrawSetCoordinates(PetscDraw draw, PetscReal xl, PetscReal yl, PetscReal xr, Pe… in PetscDrawSetCoordinates() argument
27 draw->coor_xl = xl; in PetscDrawSetCoordinates()
31 PetscTryTypeMethod(draw, setcoordinates, xl, yl, xr, yr); in PetscDrawSetCoordinates()
54 PetscErrorCode PetscDrawGetCoordinates(PetscDraw draw, PetscReal *xl, PetscReal *yl, PetscReal *xr,… in PetscDrawGetCoordinates() argument
58 PetscAssertPointer(xl, 2); in PetscDrawGetCoordinates()
62 *xl = draw->coor_xl; in PetscDrawGetCoordinates()
H A Ddline.c24 PetscErrorCode PetscDrawGetBoundingBox(PetscDraw draw, PetscReal *xl, PetscReal *yl, PetscReal *xr,… in PetscDrawGetBoundingBox() argument
28 if (xl) PetscAssertPointer(xl, 2); in PetscDrawGetBoundingBox()
32 if (xl) *xl = draw->boundbox_xl; in PetscDrawGetBoundingBox()
151 PetscErrorCode PetscDrawLine(PetscDraw draw, PetscReal xl, PetscReal yl, PetscReal xr, PetscReal yr… in PetscDrawLine() argument
155 PetscUseTypeMethod(draw, line, xl, yl, xr, yr, cl); in PetscDrawLine()
177 PetscErrorCode PetscDrawArrow(PetscDraw draw, PetscReal xl, PetscReal yl, PetscReal xr, PetscReal y… in PetscDrawArrow() argument
181 PetscUseTypeMethod(draw, arrow, xl, yl, xr, yr, cl); in PetscDrawArrow()
H A Ddmarker.c22 PetscErrorCode PetscDrawMarker(PetscDraw draw, PetscReal xl, PetscReal yl, int cl) in PetscDrawMarker() argument
29 PetscUseTypeMethod(draw, coordinatetopixel, xl, yl, &i, &j); in PetscDrawMarker()
34 } else PetscUseTypeMethod(draw, string, xl, yl, cl, "x"); in PetscDrawMarker()
38 PetscUseTypeMethod(draw, coordinatetopixel, xl, yl, &i, &j); in PetscDrawMarker()
43 } else PetscUseTypeMethod(draw, string, xl, yl, cl, "+"); in PetscDrawMarker()
47 PetscUseTypeMethod(draw, coordinatetopixel, xl, yl, &i, &j); in PetscDrawMarker()
54 } else PetscUseTypeMethod(draw, string, xl, yl, cl, "+"); in PetscDrawMarker()
55 } else PetscUseTypeMethod(draw, point, xl, yl, cl); in PetscDrawMarker()
H A Ddtext.c21 PetscErrorCode PetscDrawString(PetscDraw draw, PetscReal xl, PetscReal yl, int cl, const char text[… in PetscDrawString() argument
26 PetscUseTypeMethod(draw, string, xl, yl, cl, text); in PetscDrawString()
47 PetscErrorCode PetscDrawStringVertical(PetscDraw draw, PetscReal xl, PetscReal yl, int cl, const ch… in PetscDrawStringVertical() argument
56 if (draw->ops->stringvertical) PetscUseTypeMethod(draw, stringvertical, xl, yl, cl, text); in PetscDrawStringVertical()
59 …for (int i = 0; (chr[0] = text[i]); i++) PetscCall(PetscDrawString(draw, xl, yl - th * ((PetscReal… in PetscDrawStringVertical()
H A Ddpoint.c19 PetscErrorCode PetscDrawPoint(PetscDraw draw, PetscReal xl, PetscReal yl, int cl) in PetscDrawPoint() argument
23 PetscUseTypeMethod(draw, point, xl, yl, cl); in PetscDrawPoint()
/petsc/src/snes/impls/vi/
H A Dvi.c100 const PetscScalar *x, *xl, *xu, *f; in SNESMonitorVI() local
111 PetscCall(VecGetArrayRead(snes->xl, &xl)); in SNESMonitorVI()
118 …if ((PetscRealPart(x[i]) > PetscRealPart(xl[i]) + zerotolerance || (PetscRealPart(f[i]) <= 0.0)) &… in SNESMonitorVI()
119 …else if (PetscRealPart(x[i]) <= PetscRealPart(xl[i]) + zerotolerance && PetscRealPart(f[i]) > 0.0)… in SNESMonitorVI()
125 if (PetscRealPart(x[i]) <= PetscRealPart(xl[i]) + zerotolerance) act_bound[0]++; in SNESMonitorVI()
129 PetscCall(VecRestoreArrayRead(snes->xl, &xl)); in SNESMonitorVI()
237 const PetscScalar *xl, *xu; in SNESVIProjectOntoBounds() local
244 PetscCall(VecGetArrayRead(snes->xl, &xl)); in SNESVIProjectOntoBounds()
248 if (PetscRealPart(x[i]) < PetscRealPart(xl[i])) x[i] = xl[i]; in SNESVIProjectOntoBounds()
252 PetscCall(VecRestoreArrayRead(snes->xl, &xl)); in SNESVIProjectOntoBounds()
[all …]
/petsc/src/ksp/ksp/tutorials/
H A Dex54f.F90259 subroutine thfx2d(ev, xl, shp, dd, ndm, ndf, nel, dir) argument
262 PetscReal ev(2), xl(ndm, nel), shp(3, *), dir
268 xx = xx + shp(3, i)*xl(1, i)
269 yy = yy + shp(3, i)*xl(2, i)
292 subroutine shp2dquad(s, t, xl, shp, xsj, ndm) argument
312 PetscReal tm, xl(ndm, 4), shp(3, 4)
329 xo = xl(1, 1) - xl(1, 2) + xl(1, 3) - xl(1, 4)
330 xs = -xl(1, 1) + xl(1, 2) + xl(1, 3) - xl(1, 4) + xo*t
331 xt = -xl(1, 1) - xl(1, 2) + xl(1, 3) + xl(1, 4) + xo*s
332 yo = xl(2, 1) - xl(2, 2) + xl(2, 3) - xl(2, 4)
[all …]
/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
42 PetscCall(PetscDrawGetCoordinates(draw, &xl, &yl, &xr, &yr)); in PetscDrawZoom()
43 xmin = xl; in PetscDrawZoom()
45 w = xr - xl; in PetscDrawZoom()
67 xl = scale * (xl + w - xc) + xc - w * scale; in PetscDrawZoom()
74 PetscCall(PetscDrawSetCoordinates(draw, xl, yl, xr, yr)); in PetscDrawZoom()
H A Dlgc.c510 PetscReal xl, yl, xr, yr, tw, th; in PetscDrawLGDraw() local
513 PetscCall(PetscDrawAxisGetLimits(lg->axis, &xl, &xr, &yl, &yr)); in PetscDrawLGDraw()
521 xl = xr - ((PetscReal)len + 7) * tw; in PetscDrawLGDraw()
523 xl = xl + 1.5 * tw; in PetscDrawLGDraw()
524 xr = xl + ((PetscReal)len + 7) * tw; in PetscDrawLGDraw()
528 PetscCall(PetscDrawLine(draw, xl, yl, xr, yl, PETSC_DRAW_BLACK)); in PetscDrawLGDraw()
530 PetscCall(PetscDrawLine(draw, xr, yr, xl, yr, PETSC_DRAW_BLACK)); in PetscDrawLGDraw()
531 PetscCall(PetscDrawLine(draw, xl, yr, xl, yl, PETSC_DRAW_BLACK)); in PetscDrawLGDraw()
534 …PetscCall(PetscDrawLine(draw, xl + 1 * tw, yr - (i + 1) * th, xl + 5 * tw, yr - (i + 1) * th, cl)); in PetscDrawLGDraw()
535 …PetscCall(PetscDrawString(draw, xl + 6 * tw, yr - (i + 1.5) * th, PETSC_DRAW_BLACK, lg->legend[i])… in PetscDrawLGDraw()
/petsc/src/dm/tutorials/
H A Dex11f90.F9013 PetscInt m, n, p, dof, s, i, j, k, xs, xl
38 …PetscCallA(DMDAGetCorners(ada, xs, PETSC_NULL_INTEGER, PETSC_NULL_INTEGER, xl, PETSC_NULL_INTEGER,…
40 do i = xs, xs + xl - 1
53 PetscCallA(DMDAGetCorners(ada, xs, ys, PETSC_NULL_INTEGER, xl, yl, PETSC_NULL_INTEGER, ierr))
55 do i = xs, xs + xl - 1
76 PetscCallA(DMDAGetCorners(ada, xs, ys, zs, xl, yl, zl, ierr))
78 do i = xs, xs + xl - 1
99 …PetscCallA(DMDAGetCorners(ada, xs, PETSC_NULL_INTEGER, PETSC_NULL_INTEGER, xl, PETSC_NULL_INTEGER,…
101 do i = xs, xs + xl - 1
126 PetscCallA(DMDAGetCorners(ada, xs, ys, PETSC_NULL_INTEGER, xl, yl, PETSC_NULL_INTEGER, ierr))
[all …]
/petsc/src/dm/interface/
H A Ddmcoordinates.c431 if (!dm->coordinates[0].x && dm->coordinates[0].xl) { in DMGetCoordinates()
437 … PetscCall(DMLocalToGlobalBegin(cdm, dm->coordinates[0].xl, INSERT_VALUES, dm->coordinates[0].x)); in DMGetCoordinates()
438 PetscCall(DMLocalToGlobalEnd(cdm, dm->coordinates[0].xl, INSERT_VALUES, dm->coordinates[0].x)); in DMGetCoordinates()
470 PetscCall(VecDestroy(&dm->coordinates[0].xl)); in DMSetCoordinates()
502 if (!dm->coordinates[1].x && dm->coordinates[1].xl) { in DMGetCellCoordinates()
508 … PetscCall(DMLocalToGlobalBegin(cdm, dm->coordinates[1].xl, INSERT_VALUES, dm->coordinates[1].x)); in DMGetCellCoordinates()
509 PetscCall(DMLocalToGlobalEnd(cdm, dm->coordinates[1].xl, INSERT_VALUES, dm->coordinates[1].x)); in DMGetCellCoordinates()
541 PetscCall(VecDestroy(&dm->coordinates[1].xl)); in DMSetCellCoordinates()
561 if (!dm->coordinates[0].xl && dm->coordinates[0].x) { in DMGetCoordinatesLocalSetUp()
566 PetscCall(DMCreateLocalVector(cdm, &dm->coordinates[0].xl)); in DMGetCoordinatesLocalSetUp()
[all …]
/petsc/src/snes/tutorials/
H A Dex3k.kokkos.cxx53 Vec xl; in CpuFunction() local
56 PetscCall(DMGetLocalVector(da, &xl)); in CpuFunction()
57 PetscCall(DMGlobalToLocal(da, x, INSERT_VALUES, xl)); in CpuFunction()
58 PetscCall(DMDAVecGetArray(da, xl, &X)); in CpuFunction()
77 PetscCall(DMDAVecRestoreArray(da, xl, &X)); in CpuFunction()
80 PetscCall(DMRestoreLocalVector(da, &xl)); in CpuFunction()
95 Vec xl; in KokkosFunction() local
100 PetscCall(DMGetLocalVector(da, &xl)); in KokkosFunction()
101 PetscCall(DMGlobalToLocal(da, x, INSERT_VALUES, xl)); in KokkosFunction()
104 PetscCall(DMDAVecGetKokkosOffsetView(da, xl, &X)); /* read only */ in KokkosFunction()
[all …]
H A Dex4.c119 PetscScalar f2, f4, d1, d2, d3, d4, xc, xl, xr, xt, xb; in FormObjectiveLocal() local
130 xl = xr = xb = xt = xc; in FormObjectiveLocal()
133 xl = user->left[j + 1]; in FormObjectiveLocal()
134 } else xl = x[j][i - 1]; in FormObjectiveLocal()
148 d1 = (xc - xl); 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
230 xlt = xrb = xl = xr = xb = xt = xc; in FormFunctionLocal()
233 xl = user->left[j + 1]; in FormFunctionLocal()
235 } else xl = x[j][i - 1]; in FormFunctionLocal()
255 d1 = (xc - xl); in FormFunctionLocal()
[all …]
H A Dex58.c120 PetscErrorCode FormBounds(SNES snes, Vec xl, Vec xu) in FormBounds() argument
126 PetscCall(VecSet(xl, ctx->lb)); in FormBounds()
149 …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
181 xlt = xrb = xl = xr = xb = xt = xc; in FormGradient()
184 xl = ctx->left[j + 1]; in FormGradient()
186 } else xl = x[j][i - 1]; in FormGradient()
206 d1 = (xc - xl); in FormGradient()
212 d7 = (xlt - xl); 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
312 xlt = xrb = xl = xr = xb = xt = xc; in FormJacobian()
[all …]
/petsc/src/sys/classes/draw/impls/tikz/
H A Dtikz.c86 static PetscErrorCode PetscDrawLine_TikZ(PetscDraw draw, PetscReal xl, PetscReal yl, PetscReal xr, … in PetscDrawLine_TikZ() argument
92 …in->fd, "\\draw [%s] (%g,%g) --(%g,%g);\n", TikZColorMap(cl), XTRANS(draw, xl), YTRANS(draw, yl), … in PetscDrawLine_TikZ()
96 static PetscErrorCode PetscDrawRectangle_TikZ(PetscDraw draw, PetscReal xl, PetscReal yl, PetscReal… in PetscDrawRectangle_TikZ() argument
102 …g) rectangle (%g,%g);\n", TikZColorMap(c1), TikZColorMap(c4), XTRANS(draw, xl), YTRANS(draw, yl), … in PetscDrawRectangle_TikZ()
129 static PetscErrorCode PetscDrawString_TikZ(PetscDraw draw, PetscReal xl, PetscReal yl, int cl, cons… in PetscDrawString_TikZ() argument
135 …node [above right, %s] at (%g,%g) {%s};\n", TikZColorMap(cl), XTRANS(draw, xl), YTRANS(draw, yl), … in PetscDrawString_TikZ()
139 static PetscErrorCode PetscDrawStringVertical_TikZ(PetscDraw draw, PetscReal xl, PetscReal yl, int … in PetscDrawStringVertical_TikZ() argument
150 …\\node [rotate=90, %s] at (%g,%g) {%s};\n", TikZColorMap(cl), XTRANS(draw, xl), YTRANS(draw, yl), … in PetscDrawStringVertical_TikZ()
157 static PetscErrorCode PetscDrawStringBoxed_TikZ(PetscDraw draw, PetscReal xl, PetscReal yl, int cl,… in PetscDrawStringBoxed_TikZ() argument
164 …node [rectangle, draw, align=center, inner sep=1ex] {%s};\n", XTRANS(draw, xl), YTRANS(draw, yl), … in PetscDrawStringBoxed_TikZ()
/petsc/src/tao/complementarity/tutorials/
H A Dminsurf1.c40 Vec xl, xu; /* Bounds on the variables */ in main() local
92 PetscCall(VecDuplicate(x, &xl)); in main()
94 PetscCall(VecSet(xl, lb)); in main()
96 PetscCall(TaoSetVariableBounds(tao, xl, xu)); in main()
109 PetscCall(VecDestroy(&xl)); in main()
142 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
161 xlt = xrb = xl = xr = xb = xt = xc; in FormConstraints()
164 xl = user->left[j + 1]; in FormConstraints()
167 xl = x[row - 1]; in FormConstraints()
194 d1 = (xc - xl); in FormConstraints()
[all …]
/petsc/src/binding/petsc4py/test/
H A Dtest_tao.py190 xl = PETSc.Vec().create(tao.getComm())
191 xl.setType('standard')
192 xl.setSizes(2)
193 xl.set(0.0)
198 tao.setVariableBounds((xl, xu))
219 xl = PETSc.Vec().create(tao.getComm())
220 xl.setType('standard')
221 xl.setSizes(2)
222 xl.set(0.0)
227 tao.setVariableBounds((xl, xu))
/petsc/src/vec/vec/tutorials/
H A Dex3f.F9022 integer4 xl, yl, w, h
63 xl = 0
67 …PetscCallA(PetscViewerDrawOpen(PETSC_COMM_WORLD, PETSC_NULL_CHARACTER, PETSC_NULL_CHARACTER, xl, y…
/petsc/src/tao/bound/utils/
H A Disutil.c192 const PetscScalar *xl, *xu, *x, *g; in TaoEstimateActiveBounds() local
242 PetscCall(VecGetArrayRead(XL, &xl)); in TaoEstimateActiveBounds()
253 if (xl[i] == xu[i]) { in TaoEstimateActiveBounds()
259 } else if (xl[i] > PETSC_NINFINITY && x[i] <= xl[i] + *bound_tol && g[i] > zero) { in TaoEstimateActiveBounds()
279 PetscCall(VecRestoreArrayRead(XL, &xl)); in TaoEstimateActiveBounds()
409 const PetscScalar *x, *xl, *xu; in TaoBoundSolution() local
435 PetscCall(VecGetArrayRead(XL, &xl)); in TaoBoundSolution()
440 if (xl[i] > PETSC_NINFINITY && x[i] <= xl[i] + bound_tol) { in TaoBoundSolution()
441 xout[i] = xl[i]; in TaoBoundSolution()
450 PetscCall(VecRestoreArrayRead(XL, &xl)); in TaoBoundSolution()
/petsc/src/ts/tests/
H A Dex4.c277 PetscReal dx, dy, a, epsilon, xc, xl, xr, yl, yr; in RHSJacobian() local
289 xl = 0.5 * a / dx + epsilon / (dx * dx); in RHSJacobian()
304 v[0] = 2.0 * xl; in RHSJacobian()
314 v[0] = xl; in RHSJacobian()
339 v[1] = 2.0 * xl; in RHSJacobian()
351 v[1] = xl; in RHSJacobian()
375 v[1] = 2.0 * xl; in RHSJacobian()
384 v[0] = xl; in RHSJacobian()
406 PetscReal xc, xl, xr, yl, yr; in RHSFunction() local
426 xl = 0.5 * a / dx + epsilon / (dx * dx); in RHSFunction()
[all …]
/petsc/src/ts/tutorials/
H A Dex21.c79 Vec xl, xu; /* Lower and upper bounds on variables */ in main() local
132 PetscCall(VecDuplicate(u, &xl)); in main()
134 PetscCall(SetBounds(xl, xu, ul, uh, &appctx)); in main()
186 PetscCall(TSVISetVariableBounds(ts, xl, xu)); in main()
209 PetscCall(VecDestroy(&xl)); in main()
298 PetscErrorCode SetBounds(Vec xl, Vec xu, PetscScalar ul, PetscScalar uh, AppCtx *appctx) in SetBounds() argument
305 PetscCall(VecSet(xl, ul)); in SetBounds()
307 PetscCall(VecGetLocalSize(xl, &localsize)); in SetBounds()
308 PetscCall(VecGetArray(xl, &l)); in SetBounds()
321 PetscCall(VecRestoreArray(xl, &l)); in SetBounds()
/petsc/src/snes/tests/
H A Dex12f.F9013 Vec xl
38 PetscCall(DMGlobalToLocalBegin(ctx%da, x, INSERT_VALUES, ctx%xl, ierr))
39 PetscCall(DMGlobalToLocalEnd(ctx%da, x, INSERT_VALUES, ctx%xl, ierr))
41 PetscCall(VecGetLocalSize(ctx%xl, n, ierr))
47 PetscCall(VecGetArrayRead(ctx%xl, vxx, ierr))
85 PetscCall(VecRestoreArrayRead(ctx%xl, vxx, ierr))
225 PetscCallA(DMCreateLocalVector(ctx%da, ctx%xl, ierr))
275 PetscCallA(VecDestroy(ctx%xl, ierr))
/petsc/src/mat/impls/lrc/
H A Dlrc.c10 Vec xl, yl; /* auxiliary sequential vectors for matmult operation */ member
38 Vec yl, xl; in MatMult_LRC_kernel() local
43 xl = transpose ? Na->yl : Na->xl; in MatMult_LRC_kernel()
44 yl = transpose ? Na->xl : Na->yl; in MatMult_LRC_kernel()
50 PetscCall(VecGetLocalVectorRead(x, xl)); in MatMult_LRC_kernel()
51 PetscCall(MatMultHermitianTranspose(Vloc, xl, Na->work1)); in MatMult_LRC_kernel()
52 PetscCall(VecRestoreLocalVectorRead(x, xl)); in MatMult_LRC_kernel()
111 PetscCall(VecDestroy(&Na->xl)); in MatDestroy_LRC()
286 PetscCall(MatCreateVecs(Vloc, NULL, &Na->xl)); in MatSetUp_LRC()
/petsc/src/tao/bound/tutorials/
H A Dplate2.c53 Vec x, xl, xu; /* solution vector and bounds*/ in main() local
107 PetscCall(VecDuplicate(x, &xl)); in main()
145 PetscCall(MSA_Plate(xl, xu, (void *)&user)); in main()
146 PetscCall(TaoSetVariableBounds(tao, xl, xu)); in main()
161 PetscCall(VecDestroy(&xl)); in main()
207 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
238 xlt = xrb = xl = xr = xb = xt = xc; in FormFunctionGradient()
241 xl = left[j - ys + 1]; in FormFunctionGradient()
244 xl = x[row - 1]; in FormFunctionGradient()
271 d1 = (xc - xl); in FormFunctionGradient()
[all …]

1234