Lines Matching refs:xmin

73 static inline PetscReal RangeMod(PetscReal a, PetscReal xmin, PetscReal xmax)  in RangeMod()  argument
75 PetscReal range = xmax - xmin; in RangeMod()
76 return xmin + PetscFmodReal(range + PetscFmodReal(a, range), range); in RangeMod()
221 PetscReal xmin, xmax; member
313 …icsSample_Advect(void *vctx, PetscInt initial, FVBCType bctype, PetscReal xmin, PetscReal xmax, Pe… in PhysicsSample_Advect() argument
324 x0 = RangeMod(x - a * t, xmin, xmax); in PhysicsSample_Advect()
388 …csSample_Burgers(void *vctx, PetscInt initial, FVBCType bctype, PetscReal xmin, PetscReal xmax, Pe… in PhysicsSample_Burgers() argument
414 u[0] = 0.7 + 0.3 * PetscSinReal(2 * PETSC_PI * ((x - xmin) / (xmax - xmin))); in PhysicsSample_Burgers()
529 …csSample_Traffic(void *vctx, PetscInt initial, FVBCType bctype, PetscReal xmin, PetscReal xmax, Pe… in PhysicsSample_Traffic() argument
546 u[0] = 0.7 + 0.3 * PetscSinReal(2 * PETSC_PI * ((x - xmin) / (xmax - xmin))); in PhysicsSample_Traffic()
687 …sSample_Acoustics_Initial(AcousticsCtx *phys, PetscInt initial, PetscReal xmin, PetscReal xmax, Pe… in PhysicsSample_Acoustics_Initial() argument
692 u[0] = (PetscAbs((x - xmin) / (xmax - xmin) - 0.2) < 0.1) ? 1 : 0.5; in PhysicsSample_Acoustics_Initial()
693 u[1] = (PetscAbs((x - xmin) / (xmax - xmin) - 0.7) < 0.1) ? 1 : -0.5; in PhysicsSample_Acoustics_Initial()
696 u[0] = PetscCosReal(3 * 2 * PETSC_PI * x / (xmax - xmin)); in PhysicsSample_Acoustics_Initial()
697 … u[1] = PetscExpReal(-PetscSqr(x - (xmax + xmin) / 2) / (2 * PetscSqr(0.2 * (xmax - xmin)))) - 0.5; in PhysicsSample_Acoustics_Initial()
705 …Sample_Acoustics(void *vctx, PetscInt initial, FVBCType bctype, PetscReal xmin, PetscReal xmax, Pe… in PhysicsSample_Acoustics() argument
719 x0a = RangeMod(x + c * t, xmin, xmax); in PhysicsSample_Acoustics()
720 x0b = RangeMod(x - c * t, xmin, xmax); in PhysicsSample_Acoustics()
725 PetscCall(PhysicsSample_Acoustics_Initial(phys, initial, xmin, xmax, x0a, u0a)); in PhysicsSample_Acoustics()
726 PetscCall(PhysicsSample_Acoustics_Initial(phys, initial, xmin, xmax, x0b, u0b)); in PhysicsSample_Acoustics()
802 …icsSample_IsoGas(void *vctx, PetscInt initial, FVBCType bctype, PetscReal xmin, PetscReal xmax, Pe… in PhysicsSample_IsoGas() argument
1173 hx = (ctx->xmax - ctx->xmin) / Mx; in FVRHSFunction()
1288 hx = (ctx->xmax - ctx->xmin) / dainfo.mx; in FVIJacobian()
1321 const PetscReal h = (ctx->xmax - ctx->xmin) / Mx, xi = ctx->xmin + h / 2 + i * h; in FVSample()
1327 …PetscCall((*ctx->physics.sample)(ctx->physics.user, ctx->initial, ctx->bctype, ctx->xmin, ctx->xma… in FVSample()
1338 PetscReal xmin, xmax; in SolutionStatsView() local
1363 PetscCall(VecMin(X, &imin, &xmin)); in SolutionStatsView()
1366 …scInt_FMT " and %" PetscInt_FMT ", mean %8.5f, ||x||_TV %8.5f\n", (double)xmin, (double)xmax, imin… in SolutionStatsView()
1437 ctx.xmin = -1; in main()
1440 PetscCall(PetscOptionsReal("-xmin", "X min", "", ctx.xmin, &ctx.xmin, NULL)); in main()
1476 …ll(DMDASetUniformCoordinates(da, ctx.xmin + 0.5 * (ctx.xmax - ctx.xmin) / Mx, ctx.xmax + 0.5 * (ct… in main()