| /petsc/src/sys/classes/draw/utils/ |
| H A D | hists.c | 16 PetscReal xmin, xmax; member 74 h->xmax = PETSC_MIN_REAL; in PetscDrawHGCreate() 136 hist->xmax = PETSC_MIN_REAL; in PetscDrawHGReset() 209 if (!hist->numValues && (hist->xmin == PETSC_MAX_REAL) && (hist->xmax == PETSC_MIN_REAL)) { in PetscDrawHGAddValue() 211 hist->xmax = value; in PetscDrawHGAddValue() 215 if (value > hist->xmax) hist->xmax = value; in PetscDrawHGAddValue() 220 …if (value > hist->xmax) hist->xmax = value + 0.001 * (value - hist->xmin) / (PetscReal)hist->numBi… in PetscDrawHGAddValue() 223 hist->xmax = hist->xmax + 0.001 * (hist->xmax - hist->xmin) / (PetscReal)hist->numBins; in PetscDrawHGAddValue() 227 …if (value > hist->xmax) hist->xmax = value + 0.001 * (hist->xmax - hist->xmin) / (PetscReal)hist->… in PetscDrawHGAddValue() 277 if (!hist->numValues && (hist->xmin == PETSC_MAX_REAL) && (hist->xmax == PETSC_MIN_REAL)) { in PetscDrawHGAddWeightedValue() [all …]
|
| H A D | lgc.c | 75 PetscReal xmin, xmax, ymin, ymax; in PetscDrawLGSPDraw() local 93 xmax = PetscMax(lg->xmax, sp->xmax); in PetscDrawLGSPDraw() 95 PetscCall(PetscDrawAxisSetLimits(lg->axis, xmin, xmax, ymin, ymax)); in PetscDrawLGSPDraw() 166 lg->xmax = -1.e20; in PetscDrawLGCreate() 364 (lg)->xmax = x_max; in PetscDrawLGSetLimits() 388 lg->xmax = -1.e20; in PetscDrawLGReset() 469 PetscReal xmin, xmax, ymin, ymax; in PetscDrawLGDraw() local 485 xmax = lg->xmax; in PetscDrawLGDraw() 493 PetscCall(PetscDrawAxisSetLimits(lg->axis, xmin, xmax, ymin, ymax)); in PetscDrawLGDraw() 580 PetscReal xmin = lg->xmin, xmax = lg->xmax, ymin = lg->ymin, ymax = lg->ymax; in PetscDrawLGView() local [all …]
|
| H A D | lg.c | 41 if (x > lg->xmax) lg->xmax = x; in PetscDrawLGAddCommonPoint() 97 if (xx > lg->xmax) lg->xmax = xx; in PetscDrawLGAddPoint() 158 if (x[i] > lg->xmax) lg->xmax = x[i]; in PetscDrawLGAddPoints()
|
| H A D | dscatter.c | 56 sp->xmax = (PetscReal)-1.e20; in PetscDrawSPCreate() 137 sp->xmax = (PetscReal)-1.e20; in PetscDrawSPReset() 212 if (x[i] > sp->xmax) sp->xmax = x[i]; in PetscDrawSPAddPoint() 270 if (x[i] > sp->xmax) sp->xmax = x[i]; in PetscDrawSPAddPoints() 324 if (x[i] > sp->xmax) sp->xmax = x[i]; in PetscDrawSPAddPointColorized() 373 PetscReal upper[2] = {sp->xmax, sp->ymax}, gupper[2]; in PetscDrawSPDraw() 440 sp->xmax = x_max; in PetscDrawSPSetLimits()
|
| H A D | zoom.c | 20 PetscReal dpause, xc, yc, scale = 1.0, w, h, xr, xl, yr, yl, xmin, xmax, ymin, ymax; in PetscDrawZoom() local 44 xmax = xr; in PetscDrawZoom() 81 PetscCall(PetscDrawSetCoordinates(draw, xmin, ymin, xmax, ymax)); in PetscDrawZoom()
|
| /petsc/src/dm/impls/da/ |
| H A D | gr1.c | 25 PetscErrorCode DMDASetUniformCoordinates(DM da, PetscReal xmin, PetscReal xmax, PetscReal ymin, Pet… in DMDASetUniformCoordinates() argument 40 …tscCheck(xmax >= xmin, PetscObjectComm((PetscObject)da), PETSC_ERR_ARG_INCOMP, "xmax must be large… in DMDASetUniformCoordinates() 48 if (bx == DM_BOUNDARY_PERIODIC) hx = (xmax - xmin) / M; in DMDASetUniformCoordinates() 49 else hx = (xmax - xmin) / (M - 1); in DMDASetUniformCoordinates() 54 if (bx == DM_BOUNDARY_PERIODIC) hx = (xmax - xmin) / (M); in DMDASetUniformCoordinates() 55 else hx = (xmax - xmin) / (M - 1); in DMDASetUniformCoordinates() 68 if (bx == DM_BOUNDARY_PERIODIC) hx = (xmax - xmin) / (M); in DMDASetUniformCoordinates() 69 else hx = (xmax - xmin) / (M - 1); in DMDASetUniformCoordinates() 93 PetscReal L[3] = {xmax - xmin, ymax - ymin, zmax - zmin}; in DMDASetUniformCoordinates() 150 PetscReal min, max, xmin = 0.0, xmax = 0.0, tmp = 0.0, xgtmp = 0.0; in VecView_MPI_Draw_DA1d() local [all …]
|
| H A D | da1.c | 62 double ymin = -1, ymax = 1, xmin = -1, xmax = dd->M, x; in DMView_DA_1d() local 73 PetscCall(PetscDrawSetCoordinates(draw, xmin, ymin, xmax, ymax)); in DMView_DA_1d() 83 xmax = dd->M - 1; in DMView_DA_1d() 84 PetscCall(PetscDrawLine(draw, xmin, ymin, xmax, ymin, PETSC_DRAW_BLACK)); in DMView_DA_1d() 85 PetscCall(PetscDrawLine(draw, xmin, ymax, xmax, ymax, PETSC_DRAW_BLACK)); in DMView_DA_1d() 96 xmax = (dd->xe / dd->w) - 1; in DMView_DA_1d() 97 PetscCall(PetscDrawLine(draw, xmin, ymin, xmax, ymin, PETSC_DRAW_RED)); in DMView_DA_1d() 99 PetscCall(PetscDrawLine(draw, xmin, ymax, xmax, ymax, PETSC_DRAW_RED)); in DMView_DA_1d() 100 PetscCall(PetscDrawLine(draw, xmax, ymin, xmax, ymax, PETSC_DRAW_RED)); in DMView_DA_1d() 103 for (x = xmin; x <= xmax; x++) { in DMView_DA_1d()
|
| H A D | da2.c | 58 double xmin = -1 * dd->s - 1, xmax = dd->M + dd->s; in DMView_DA_2d() local 71 PetscCall(PetscDrawSetCoordinates(draw, xmin, ymin, xmax, ymax)); in DMView_DA_2d() 80 xmax = dd->M - 1; in DMView_DA_2d() 81 …for (ymin = 0; ymin < dd->N; ymin++) PetscCall(PetscDrawLine(draw, xmin, ymin, xmax, ymin, PETSC_D… in DMView_DA_2d() 90 xmax = (dd->xe - 1) / dd->w; in DMView_DA_2d() 93 PetscCall(PetscDrawLine(draw, xmin, ymin, xmax, ymin, PETSC_DRAW_RED)); in DMView_DA_2d() 95 PetscCall(PetscDrawLine(draw, xmin, ymax, xmax, ymax, PETSC_DRAW_RED)); in DMView_DA_2d() 96 PetscCall(PetscDrawLine(draw, xmax, ymin, xmax, ymax, PETSC_DRAW_RED)); in DMView_DA_2d() 100 for (x = xmin; x <= xmax; x++) { in DMView_DA_2d() 114 xmax = dd->Xe; in DMView_DA_2d() [all …]
|
| /petsc/src/ts/tutorials/multirate/ |
| H A D | ex5.c | 34 static inline PetscReal RangeMod(PetscReal a, PetscReal xmin, PetscReal xmax) in RangeMod() argument 36 PetscReal range = xmax - xmin; in RangeMod() 46 …tscScalar *uR, PetscScalar *flux, PetscReal *maxspeed, PetscReal x, PetscReal xmin, PetscReal xmax) in PhysicsRiemann_Advect() argument 53 if (x == 0 || x == xmin || x == xmax) in PhysicsRiemann_Advect() 73 …(void *vctx, PetscInt initial, FVBCType bctype, PetscReal xmin, PetscReal xmax, PetscReal t, Petsc… in PhysicsSample_Advect() argument 85 x0 = RangeMod(x - a[0] * t, xmin, xmax); in PhysicsSample_Advect() 124 x0 = RangeMod(x - a[1] * t, xmin, xmax); in PhysicsSample_Advect() 200 hx = (ctx->xmax - ctx->xmin) / Mx; in FVRHSFunctionslow() 260 …)(ctx->physics.user, dof, uL, uR, ctx->flux, &maxspeed, ctx->xmin + hx * i, ctx->xmin, ctx->xmax)); in FVRHSFunctionslow() 276 …)(ctx->physics.user, dof, uL, uR, ctx->flux, &maxspeed, ctx->xmin + hx * i, ctx->xmin, ctx->xmax)); in FVRHSFunctionslow() [all …]
|
| H A D | ex7.c | 29 static inline PetscReal RangeMod(PetscReal a, PetscReal xmin, PetscReal xmax) in RangeMod() argument 31 PetscReal range = xmax - xmin; in RangeMod() 64 PetscReal xmin, xmax; member 99 …(void *vctx, PetscInt initial, FVBCType bctype, PetscReal xmin, PetscReal xmax, PetscReal t, Petsc… in PhysicsSample_Advect() argument 110 x0 = RangeMod(x - a * t, xmin, xmax); in PhysicsSample_Advect() 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() 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() 453 hs = (ctx->xmax - ctx->xmin) / 2.0 * (ctx->hratio + 1.0) / Mx; in FVRHSFunctionfast() [all …]
|
| H A D | ex8.c | 20 static inline PetscReal RangeMod(PetscReal a, PetscReal xmin, PetscReal xmax) in RangeMod() argument 22 PetscReal range = xmax - xmin; in RangeMod() 54 …(void *vctx, PetscInt initial, FVBCType bctype, PetscReal xmin, PetscReal xmax, PetscReal t, Petsc… in PhysicsSample_Advect() argument 65 x0 = RangeMod(x - a * t, xmin, xmax); in PhysicsSample_Advect() 137 hs = (ctx->xmax - ctx->xmin) / 8.0 / ctx->sm; in FVSample_3WaySplit() 138 hm = (ctx->xmax - ctx->xmin) / 4.0 / (ctx->mf - ctx->sm); in FVSample_3WaySplit() 139 hf = (ctx->xmax - ctx->xmin) / 4.0 / (ctx->fm - ctx->mf); in FVSample_3WaySplit() 147 …sics2.sample2)(ctx->physics2.user, ctx->initial, ctx->bctype, ctx->xmin, ctx->xmax, time, xj, uj)); in FVSample_3WaySplit() 156 …sics2.sample2)(ctx->physics2.user, ctx->initial, ctx->bctype, ctx->xmin, ctx->xmax, time, xj, uj)); in FVSample_3WaySplit() 165 …sics2.sample2)(ctx->physics2.user, ctx->initial, ctx->bctype, ctx->xmin, ctx->xmax, time, xj, uj)); in FVSample_3WaySplit() [all …]
|
| H A D | ex6.c | 27 static inline PetscReal RangeMod(PetscReal a, PetscReal xmin, PetscReal xmax) in RangeMod() argument 29 PetscReal range = xmax - xmin; in RangeMod() 61 …(void *vctx, PetscInt initial, FVBCType bctype, PetscReal xmin, PetscReal xmax, PetscReal t, Petsc… in PhysicsSample_Advect() argument 72 x0 = RangeMod(x - a * t, xmin, xmax); in PhysicsSample_Advect() 143 hs = (ctx->xmax - ctx->xmin) * 3.0 / 8.0 / ctx->sf; in FVSample_2WaySplit() 144 hf = (ctx->xmax - ctx->xmin) / 4.0 / (ctx->fs - ctx->sf); in FVSample_2WaySplit() 152 …sics2.sample2)(ctx->physics2.user, ctx->initial, ctx->bctype, ctx->xmin, ctx->xmax, time, xj, uj)); in FVSample_2WaySplit() 161 …sics2.sample2)(ctx->physics2.user, ctx->initial, ctx->bctype, ctx->xmin, ctx->xmax, time, xj, uj)); in FVSample_2WaySplit() 170 …sics2.sample2)(ctx->physics2.user, ctx->initial, ctx->bctype, ctx->xmin, ctx->xmax, time, xj, uj)); in FVSample_2WaySplit() 191 hs = (ctx->xmax - ctx->xmin) * 3.0 / 8.0 / ctx->sf; in SolutionErrorNorms_2WaySplit() [all …]
|
| H A D | ex4.c | 43 static inline PetscReal RangeMod(PetscReal a, PetscReal xmin, PetscReal xmax) in RangeMod() argument 45 PetscReal range = xmax - xmin; in RangeMod() 80 …(void *vctx, PetscInt initial, FVBCType bctype, PetscReal xmin, PetscReal xmax, PetscReal t, Petsc… in PhysicsSample_Advect() argument 91 x0 = RangeMod(x - a * t, xmin, xmax); in PhysicsSample_Advect() 301 …(void *vctx, PetscInt initial, FVBCType bctype, PetscReal xmin, PetscReal xmax, PetscReal t, Petsc… in PhysicsSample_Shallow() argument 487 hs = (ctx->xmax - ctx->xmin) * 3.0 / 8.0 / ctx->sf; in FVSample_2WaySplit() 488 hf = (ctx->xmax - ctx->xmin) / 4.0 / (ctx->fs - ctx->sf); in FVSample_2WaySplit() 496 …sics2.sample2)(ctx->physics2.user, ctx->initial, ctx->bctype, ctx->xmin, ctx->xmax, time, xj, uj)); in FVSample_2WaySplit() 505 …sics2.sample2)(ctx->physics2.user, ctx->initial, ctx->bctype, ctx->xmin, ctx->xmax, time, xj, uj)); in FVSample_2WaySplit() 514 …sics2.sample2)(ctx->physics2.user, ctx->initial, ctx->bctype, ctx->xmin, ctx->xmax, time, xj, uj)); in FVSample_2WaySplit() [all …]
|
| /petsc/src/ts/tutorials/ |
| H A D | ex74.c | 37 PetscReal xmin, xmax; /* domain bounds */ member 58 ctxt.xmax = 1.0; in main() 66 PetscCall(PetscOptionsReal("-xmax", "xmax", "<1.0>", ctxt.xmax, &ctxt.xmax, NULL)); in main() 124 dx = (ctxt->xmax - ctxt->xmin) / ((PetscReal)ctxt->imax); in ExactSolution() 151 dx = (user->xmax - user->xmin) / ((PetscReal)user->imax); in RHSJacobian()
|
| H A D | ex9.c | 73 static inline PetscReal RangeMod(PetscReal a, PetscReal xmin, PetscReal xmax) in RangeMod() argument 75 PetscReal range = xmax - xmin; in RangeMod() 221 PetscReal xmin, xmax; member 313 …(void *vctx, PetscInt initial, FVBCType bctype, PetscReal xmin, PetscReal xmax, PetscReal t, Petsc… in PhysicsSample_Advect() argument 324 x0 = RangeMod(x - a * t, xmin, xmax); in PhysicsSample_Advect() 388 …(void *vctx, PetscInt initial, FVBCType bctype, PetscReal xmin, PetscReal xmax, PetscReal t, Petsc… in PhysicsSample_Burgers() argument 414 u[0] = 0.7 + 0.3 * PetscSinReal(2 * PETSC_PI * ((x - xmin) / (xmax - xmin))); in PhysicsSample_Burgers() 529 …(void *vctx, PetscInt initial, FVBCType bctype, PetscReal xmin, PetscReal xmax, PetscReal t, Petsc… in PhysicsSample_Traffic() argument 546 u[0] = 0.7 + 0.3 * PetscSinReal(2 * PETSC_PI * ((x - xmin) / (xmax - xmin))); in PhysicsSample_Traffic() 687 …s_Initial(AcousticsCtx *phys, PetscInt initial, PetscReal xmin, PetscReal xmax, PetscReal x, Petsc… in PhysicsSample_Acoustics_Initial() argument [all …]
|
| H A D | ex53.c | 59 PetscReal xmax[3]; /* Upper right top corner of bounding box */ member 406 PetscReal L = user->xmax[1] - user->xmin[1]; /* m */ in terzaghi_initial_u() 448 PetscReal L = user->xmax[1] - user->xmin[1]; /* m */ in terzaghi_2d_u() 485 PetscReal L = user->xmax[1] - user->xmin[1]; /* m */ in terzaghi_2d_eps() 522 PetscReal L = user->xmax[1] - user->xmin[1]; /* m */ in terzaghi_2d_p() 560 PetscReal L = user->xmax[1] - user->xmin[1]; /* m */ in terzaghi_2d_u_t() 597 PetscReal L = user->xmax[1] - user->xmin[1]; /* m */ in terzaghi_2d_eps_t() 631 PetscReal L = user->xmax[1] - user->xmin[1]; /* m */ in terzaghi_2d_p_t() 646 PetscReal L = user->xmax[1] - user->xmin[1]; /* m */ in terzaghi_2d_p_t() 682 PetscReal a = 0.5 * (user->xmax[0] - user->xmin[0]); /* m */ in mandel_drainage_pressure() [all …]
|
| /petsc/src/ts/interface/ |
| H A D | tseig.c | 11 PetscReal xmin, xmax, ymin, ymax; member 75 (*ctx)->xmax = 1.1; in TSMonitorSPEigCtxCreate() 136 PetscReal xmin, xmax, ymin, ymax; in TSMonitorSPEig() local 139 PetscCall(PetscDrawSPSetLimits(drawsp, ctx->xmin, ctx->xmax, ctx->ymin, ctx->ymax)); in TSMonitorSPEig() 165 PetscCall(PetscDrawAxisGetLimits(axis, &xmin, &xmax, &ymin, &ymax)); in TSMonitorSPEig() 166 …PetscCall(PetscDrawIndicatorFunction(draw, xmin, xmax, ymin, ymax, PETSC_DRAW_CYAN, (PetscErrorCod… in TSMonitorSPEig()
|
| /petsc/src/ksp/ksp/interface/ |
| H A D | eige.c | 255 PetscReal xmin, xmax, ymin, ymax, *xloc, *yloc, *value, px0, py0, rscale, iscale; in KSPPlotEigenContours_Private() local 268 xmax = r[0]; in KSPPlotEigenContours_Private() 273 xmax = PetscMax(xmax, r[i]); in KSPPlotEigenContours_Private() 278 for (i = 0; i < M; i++) xloc[i] = xmin - 0.1 * (xmax - xmin) + 1.2 * (xmax - xmin) * i / (M - 1); in KSPPlotEigenContours_Private() 303 PetscCall(PetscDrawAxisSetLimits(drawaxis, xmin, xmax, ymin, ymax)); in KSPPlotEigenContours_Private()
|
| /petsc/src/dm/impls/network/ |
| H A D | networkmonitor.c | 119 …cInt nodes, PetscInt start, PetscInt blocksize, PetscReal xmin, PetscReal xmax, PetscReal ymin, Pe… in DMNetworkMonitorAdd() argument 152 …xmin != (PetscReal)PETSC_DECIDE && xmax != (PetscReal)PETSC_DECIDE) PetscCall(PetscDrawAxisSetLimi… in DMNetworkMonitorAdd()
|
| /petsc/src/sys/classes/draw/interface/ |
| H A D | drect.c | 22 PetscErrorCode PetscDrawIndicatorFunction(PetscDraw draw, PetscReal xmin, PetscReal xmax, PetscReal… in PetscDrawIndicatorFunction() argument 34 PetscCall(PetscDrawCoordinateToPixel(draw, xmax, ymax, &xend, ¥d)); in PetscDrawIndicatorFunction()
|
| /petsc/src/ksp/ksp/tutorials/ |
| H A D | ex74.c | 71 PetscReal xmin, xmax; /* domain bounds */ member 102 ctxt.xmax = 1.0; in main() 112 PetscCall(PetscOptionsReal("-xmax", "xmax", "<1.0>", ctxt.xmax, &ctxt.xmax, NULL)); in main() 259 dx = (ctxt->xmax - ctxt->xmin) / ((PetscReal)ctxt->imax); in ExactSolution() 323 dx = (user->xmax - user->xmin) / ((PetscReal)user->imax); in Assemble_AdvDiff()
|
| /petsc/src/sys/classes/draw/impls/x/ |
| H A D | xops.c | 19 int xa, ya, xb, yb, xmax = XiWin->w - 1, ymax = XiWin->h - 1; in PetscDrawSetViewport_X() local 23 xa = (int)(xl * (PetscReal)xmax); in PetscDrawSetViewport_X() 25 xb = (int)(xr * (PetscReal)xmax); in PetscDrawSetViewport_X() 290 int xmax = XiWin->w - 1, ymax = XiWin->h - 1; in PetscDrawClear_X() local 306 int xa = (int)(xl * xmax), ya = ymax - (int)(yr * ymax); in PetscDrawClear_X() 307 int xb = (int)(xr * xmax), yb = ymax - (int)(yl * ymax); in PetscDrawClear_X() 679 static int xavailable = 0, yavailable = 0, ybottom = 0, xmax = 0, ymax = 0; in PetscDrawCreate_X() local 693 if (!xmax) { in PetscDrawCreate_X() 694 PetscCall(PetscDrawXGetDisplaySize_Private(draw->display, &xmax, &ymax, &has_display)); in PetscDrawCreate_X() 722 w = draw->w = (xmax - 10); in PetscDrawCreate_X() [all …]
|
| /petsc/src/ts/tutorials/power_grid/ |
| H A D | petscopt_ex6 | 18 -xmax 10
|
| H A D | petscopt_ex8 | 15 #-xmax 0.4
|
| /petsc/src/sys/classes/draw/impls/image/ |
| H A D | drawimage.h | 111 const int xmin = img->clip[0], xmax = img->clip[2] - 1; in PetscImageDrawTriangle() local 121 if (x_1 > xmax && x_2 > xmax && x_3 > xmax) return; in PetscImageDrawTriangle()
|