Home
last modified time | relevance | path

Searched refs:uR (Results 1 – 13 of 13) sorted by relevance

/petsc/src/ts/tutorials/
H A Dex9.c290 …n_Advect(void *vctx, PetscInt m, const PetscScalar *uL, const PetscScalar *uR, PetscScalar *flux, … in PhysicsRiemann_Advect() argument
297 flux[0] = PetscMax(0, speed) * uL[0] + PetscMin(0, speed) * uR[0]; in PhysicsRiemann_Advect()
426 …rs_Exact(void *vctx, PetscInt m, const PetscScalar *uL, const PetscScalar *uR, PetscScalar *flux, … in PhysicsRiemann_Burgers_Exact() argument
429 if (uL[0] < uR[0]) { /* rarefaction */ in PhysicsRiemann_Burgers_Exact()
430 flux[0] = (uL[0] * uR[0] < 0) ? 0 /* sonic rarefaction */ in PhysicsRiemann_Burgers_Exact()
431 : 0.5 * PetscMin(PetscSqr(uL[0]), PetscSqr(uR[0])); in PhysicsRiemann_Burgers_Exact()
433 flux[0] = 0.5 * PetscMax(PetscSqr(uL[0]), PetscSqr(uR[0])); in PhysicsRiemann_Burgers_Exact()
435 *maxspeed = (PetscAbs(uL[0]) > PetscAbs(uR[0])) ? uL[0] : uR[0]; in PhysicsRiemann_Burgers_Exact()
439 …gers_Roe(void *vctx, PetscInt m, const PetscScalar *uL, const PetscScalar *uR, PetscScalar *flux, … in PhysicsRiemann_Burgers_Roe() argument
444 speed = 0.5 * (uL[0] + uR[0]); in PhysicsRiemann_Burgers_Roe()
[all …]
H A Dex11.h176 const SWNode *uL = (const SWNode *)xL, *uR = (const SWNode *)xR; in PhysicsRiemann_SW_Rusanov() local
180 const SWNode *uR = &uRreal.swnode; in PhysicsRiemann_SW_Rusanov() local
194 if (uL->h < 0 || uR->h < 0) { in PhysicsRiemann_SW_Rusanov()
211 ierr = SWFlux(phys, nn, uR, &fR.swnode); in PhysicsRiemann_SW_Rusanov()
218 cR = PetscSqrtReal(sw->gravity * uR->h); /* gravity wave speed */ in PhysicsRiemann_SW_Rusanov()
219 …(PetscAbsReal(Dot2Real(uL->uh, nn) / uL->h) + cL, PetscAbsReal(Dot2Real(uR->uh, nn) / uR->h) + cR); in PhysicsRiemann_SW_Rusanov()
276 const SWNode *uL = (const SWNode *)xL, *uR = (const SWNode *)xR; in PhysicsRiemann_SW_HLL() local
280 const SWNode *uR = &uRreal.swnode; in PhysicsRiemann_SW_HLL() local
293 if (uL->h <= 0 || uR->h <= 0) { in PhysicsRiemann_SW_HLL()
308 ierr = SWFlux(phys, nn, uR, &fR.swnode); in PhysicsRiemann_SW_HLL()
[all …]
H A Dex18.c286 …tscReal *qp, const PetscReal *n, const PetscScalar *uL, const PetscScalar *uR, PetscInt numConstan… in riemann_advection() argument
291 flux[0] = (wn > 0 ? uL[dim] : uR[dim]) * wn; in riemann_advection()
294 …tscReal *qp, const PetscReal *n, const PetscScalar *uL, const PetscScalar *uR, PetscInt numConstan… in riemann_coupled_advection() argument
299 flux[0] = (wn > 0 ? uL[dim] : uR[dim]) * wn; in riemann_coupled_advection()
303 flux[0] = 0.5 * ((uL[dim] + uR[dim]) + (uL[dim] - uR[dim]) * tanh(1.0e5 * wn)) * wn; in riemann_coupled_advection()
/petsc/src/ts/tutorials/multirate/
H A Dex8.c31 …n_Advect(void *vctx, PetscInt m, const PetscScalar *uL, const PetscScalar *uR, PetscScalar *flux, … in PhysicsRiemann_Advect() argument
38 flux[0] = PetscMax(0, speed) * uL[0] + PetscMin(0, speed) * uR[0]; in PhysicsRiemann_Advect()
288 PetscScalar *uL, *uR; in FVRHSFunction_3WaySplit() local
290 uR = &ctx->uLR[dof]; in FVRHSFunction_3WaySplit()
294 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxs / 2; in FVRHSFunction_3WaySplit()
296 PetscCall((*ctx->physics2.riemann2)(ctx->physics2.user, dof, uL, uR, ctx->flux, &maxspeed)); in FVRHSFunction_3WaySplit()
306 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxm / 2; in FVRHSFunction_3WaySplit()
308 PetscCall((*ctx->physics2.riemann2)(ctx->physics2.user, dof, uL, uR, ctx->flux, &maxspeed)); in FVRHSFunction_3WaySplit()
318 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxs / 2; in FVRHSFunction_3WaySplit()
320 PetscCall((*ctx->physics2.riemann2)(ctx->physics2.user, dof, uL, uR, ctx->flux, &maxspeed)); in FVRHSFunction_3WaySplit()
[all …]
H A Dex6.c38 …n_Advect(void *vctx, PetscInt m, const PetscScalar *uL, const PetscScalar *uR, PetscScalar *flux, … in PhysicsRiemann_Advect() argument
45 flux[0] = PetscMax(0, speed) * uL[0] + PetscMin(0, speed) * uR[0]; in PhysicsRiemann_Advect()
271 PetscScalar *uL, *uR; in FVRHSFunction_2WaySplit() local
273 uR = &ctx->uLR[dof]; in FVRHSFunction_2WaySplit()
277 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxs / 2; in FVRHSFunction_2WaySplit()
279 PetscCall((*ctx->physics2.riemann2)(ctx->physics2.user, dof, uL, uR, ctx->flux, &maxspeed)); in FVRHSFunction_2WaySplit()
289 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxf / 2; in FVRHSFunction_2WaySplit()
291 PetscCall((*ctx->physics2.riemann2)(ctx->physics2.user, dof, uL, uR, ctx->flux, &maxspeed)); in FVRHSFunction_2WaySplit()
301 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxf / 2; in FVRHSFunction_2WaySplit()
303 PetscCall((*ctx->physics2.riemann2)(ctx->physics2.user, dof, uL, uR, ctx->flux, &maxspeed)); in FVRHSFunction_2WaySplit()
[all …]
H A Dex4.c57 …n_Advect(void *vctx, PetscInt m, const PetscScalar *uL, const PetscScalar *uR, PetscScalar *flux, … in PhysicsRiemann_Advect() argument
64 flux[0] = PetscMax(0, speed) * uL[0] + PetscMin(0, speed) * uR[0]; in PhysicsRiemann_Advect()
159 …ow_Exact(void *vctx, PetscInt m, const PetscScalar *uL, const PetscScalar *uR, PetscScalar *flux, … in PhysicsRiemann_Shallow_Exact() argument
165 } L = {uL[0], uL[1] / uL[0]}, R = {uR[0], uR[1] / uR[0]}, star; in PhysicsRiemann_Shallow_Exact()
223 ShallowFlux(phys, uR, flux); in PhysicsRiemann_Shallow_Exact()
233 …_Rusanov(void *vctx, PetscInt m, const PetscScalar *uL, const PetscScalar *uR, PetscScalar *flux, … in PhysicsRiemann_Shallow_Rusanov() argument
239 } L = {uL[0], uL[1] / uL[0]}, R = {uR[0], uR[1] / uR[0]}; in PhysicsRiemann_Shallow_Rusanov()
252 ShallowFlux(phys, uR, fR); in PhysicsRiemann_Shallow_Rusanov()
256 flux[1] = 0.5 * (fL[1] + fR[1]) + 0.5 * s * (uL[1] - uR[1]); in PhysicsRiemann_Shallow_Rusanov()
640 PetscScalar *uL, *uR; in FVRHSFunction_2WaySplit() local
[all …]
H A Dex5.c46 …n_Advect(void *vctx, PetscInt m, const PetscScalar *uL, const PetscScalar *uR, PetscScalar *flux, … in PhysicsRiemann_Advect() argument
54 …0] + speed[1]) / 2.0) * uL[0] + PetscMin(0, (speed[0] + speed[1]) / 2.0) * uR[0]; /* if condition … in PhysicsRiemann_Advect()
55 …else if (x < 0) flux[0] = PetscMax(0, speed[0]) * uL[0] + PetscMin(0, speed[0]) * uR[0]; … in PhysicsRiemann_Advect()
56 else flux[0] = PetscMax(0, speed[1]) * uL[0] + PetscMin(0, speed[1]) * uR[0]; in PhysicsRiemann_Advect()
252 PetscScalar *uL, *uR; in FVRHSFunctionslow() local
255 uR = &ctx->uLR[dof]; in FVRHSFunctionslow()
258 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hx / 2; in FVRHSFunctionslow()
260 …PetscCall((*ctx->physics.riemann)(ctx->physics.user, dof, uL, uR, ctx->flux, &maxspeed, ctx->xmin … in FVRHSFunctionslow()
271 uR = &ctx->uLR[dof]; in FVRHSFunctionslow()
274 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hx / 2; in FVRHSFunctionslow()
[all …]
H A Dfinitevolume1d.c586 PetscScalar *uL, *uR; in FVRHSFunction() local
588 uR = &ctx->uLR[dof]; in FVRHSFunction()
591 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hx / 2; in FVRHSFunction()
593 …PetscCall((*ctx->physics.riemann)(ctx->physics.user, dof, uL, uR, ctx->flux, &maxspeed, ctx->xmin … in FVRHSFunction()
/petsc/src/dm/dt/interface/ftn-custom/
H A Dzdsf.c14 …scReal x[], const PetscReal n[], const PetscScalar uL[], const PetscScalar uR[], PetscInt numConst… in ourriemannsolver() argument
16 …scReal x[], const PetscReal n[], const PetscScalar uL[], const PetscScalar uR[], const PetscInt *n… in ourriemannsolver()
19 if (func) (*func)(&dim, &Nf, x, n, uL, uR, &numConstants, constants, flux, _ctx); in ourriemannsolver()
/petsc/src/dm/impls/plex/ftn-custom/
H A Dzplexfemf90.c76 PetscScalar *uL, *uR; in dmplexgetfacefields_() local
79 …elds(*dm, *fStart, *fEnd, *locX, *locX_t, *faceGeometry, *cellGeometry, *locGrad, Nface, &uL, &uR); in dmplexgetfacefields_()
87 …*ierr = F90Array1dCreate((void *)uR, MPIU_SCALAR, 1, numFaces * totDim, uRPtr PETSC_F90_2PTR_PARAM… in dmplexgetfacefields_()
93 PetscScalar *uL, *uR; in dmplexrestorefacefields_() local
97 *ierr = F90Array1dAccess(uRPtr, MPIU_SCALAR, (void **)&uR PETSC_F90_2PTR_PARAM(uRPtrd)); in dmplexrestorefacefields_()
99 …eFaceFields(*dm, *fStart, *fEnd, *locX, NULL, *faceGeometry, *cellGeometry, NULL, Nface, &uL, &uR); in dmplexrestorefacefields_()
/petsc/include/
H A Dpetscdstypes.h263 …scReal x[], const PetscReal n[], const PetscScalar uL[], const PetscScalar uR[], PetscInt numConst…
/petsc/src/dm/dt/fv/interface/
H A Dfv.c1731 …scFVFaceGeom *fgeom, PetscReal *neighborVol, PetscScalar uL[], PetscScalar uR[], PetscScalar fluxL… in PetscFVIntegrateRHSFunction() argument
1735 …PetscTryTypeMethod(fvm, integraterhsfunction, prob, field, Nf, fgeom, neighborVol, uL, uR, fluxL, … in PetscFVIntegrateRHSFunction()
1907 …scFVFaceGeom *fgeom, PetscReal *neighborVol, PetscScalar uL[], PetscScalar uR[], PetscScalar fluxL… in PetscFVIntegrateRHSFunction_Upwind() argument
1925 …(*riemann)(dim, pdim, fgeom[f].centroid, fgeom[f].normal, &uL[f * Nc], &uR[f * Nc], numConstants, … in PetscFVIntegrateRHSFunction_Upwind()
2189 …scFVFaceGeom *fgeom, PetscReal *neighborVol, PetscScalar uL[], PetscScalar uR[], PetscScalar fluxL… in PetscFVIntegrateRHSFunction_LeastSquares() argument
2207 …(*riemann)(dim, pdim, fgeom[f].centroid, fgeom[f].normal, &uL[f * Nc], &uR[f * Nc], numConstants, … in PetscFVIntegrateRHSFunction_LeastSquares()
/petsc/src/dm/impls/plex/
H A Dplexfem.c4090 …eometry, Vec cellGeometry, PeOp Vec locGrad, PetscInt *Nface, PetscScalar *uL[], PetscScalar *uR[]) in DMPlexGetFaceFields() argument
4108 PetscAssertPointer(uR, 11); in DMPlexGetFaceFields()
4140 PetscCall(DMGetWorkArray(dm, numFaces * Nc, MPIU_SCALAR, uR)); in DMPlexGetFaceFields()
4147 PetscScalar *uLl = *uL, *uRl = *uR; in DMPlexGetFaceFields()
4254 …eometry, Vec cellGeometry, PeOp Vec locGrad, PetscInt *Nface, PetscScalar *uL[], PetscScalar *uR[]) in DMPlexRestoreFaceFields() argument
4258 PetscCall(DMRestoreWorkArray(dm, 0, MPIU_SCALAR, uR)); in DMPlexRestoreFaceFields()
4401 PetscScalar *u = NULL, *u_t, *a, *uL = NULL, *uR = NULL; in DMPlexComputeResidual_Patch_Internal() local
4533 PetscCall(PetscFVIntegrateRHSFunction(fv, prob, f, Ne, fgeom, vol, uL, uR, fluxL, fluxR)); in DMPlexComputeResidual_Patch_Internal()
5191 PetscScalar *u = NULL, *u_t, *a, *uL, *uR; in DMPlexComputeResidualByKey() local
5294 …eFields(dm, fS, fE, locX, locX_t, faceGeometryFVM, cellGeometryFVM, locGrad, &numFaces, &uL, &uR)); in DMPlexComputeResidualByKey()
[all …]