| /petsc/src/ts/tutorials/multirate/ |
| H A D | ex7.c | 45 PetscErrorCode (*flux)(void *, const PetscScalar *, PetscScalar *, PetscReal *); member 58 …PetscScalar *flux; /* Flux across interface … member 87 static PetscErrorCode PhysicsFlux_Advect(void *vctx, const PetscScalar *u, PetscScalar *flux, Petsc… in PhysicsFlux_Advect() argument 94 flux[0] = speed * u[0]; in PhysicsFlux_Advect() 153 ctx->physics.flux = PhysicsFlux_Advect; in PhysicsCreate_Advect() 213 PetscCall((*ctx->physics.flux)(ctx->physics.user, u, ctx->flux, &maxspeed)); in FVRHSFunction() 216 for (j = 0; j < dof; j++) f[(i - 1) * dof + j] -= ctx->flux[j] / hs; in FVRHSFunction() 219 for (j = 0; j < dof; j++) f[i * dof + j] += ctx->flux[j] / hs; in FVRHSFunction() 230 PetscCall((*ctx->physics.flux)(ctx->physics.user, u, ctx->flux, &maxspeed)); in FVRHSFunction() 232 for (j = 0; j < dof; j++) f[(i - 1) * dof + j] -= ctx->flux[j] / hs; in FVRHSFunction() [all …]
|
| H A D | ex8.c | 31 …x, PetscInt m, const PetscScalar *uL, const PetscScalar *uR, PetscScalar *flux, PetscReal *maxspee… in PhysicsRiemann_Advect() argument 38 flux[0] = PetscMax(0, speed) * uL[0] + PetscMin(0, speed) * uR[0]; in PhysicsRiemann_Advect() 296 PetscCall((*ctx->physics2.riemann2)(ctx->physics2.user, dof, uL, uR, ctx->flux, &maxspeed)); in FVRHSFunction_3WaySplit() 298 for (j = 0; j < dof; j++) f[(i - 1) * dof + j] -= ctx->flux[j] / hxs; in FVRHSFunction_3WaySplit() 301 for (j = 0; j < dof; j++) f[i * dof + j] += ctx->flux[j] / hxs; in FVRHSFunction_3WaySplit() 308 PetscCall((*ctx->physics2.riemann2)(ctx->physics2.user, dof, uL, uR, ctx->flux, &maxspeed)); in FVRHSFunction_3WaySplit() 310 for (j = 0; j < dof; j++) f[(i - 1) * dof + j] -= ctx->flux[j] / hxs; in FVRHSFunction_3WaySplit() 313 for (j = 0; j < dof; j++) f[i * dof + j] += ctx->flux[j] / hxm; in FVRHSFunction_3WaySplit() 320 PetscCall((*ctx->physics2.riemann2)(ctx->physics2.user, dof, uL, uR, ctx->flux, &maxspeed)); in FVRHSFunction_3WaySplit() 322 for (j = 0; j < dof; j++) f[(i - 1) * dof + j] -= ctx->flux[j] / hxm; in FVRHSFunction_3WaySplit() [all …]
|
| H A D | ex6.c | 38 …x, PetscInt m, const PetscScalar *uL, const PetscScalar *uR, PetscScalar *flux, PetscReal *maxspee… in PhysicsRiemann_Advect() argument 45 flux[0] = PetscMax(0, speed) * uL[0] + PetscMin(0, speed) * uR[0]; in PhysicsRiemann_Advect() 279 PetscCall((*ctx->physics2.riemann2)(ctx->physics2.user, dof, uL, uR, ctx->flux, &maxspeed)); in FVRHSFunction_2WaySplit() 281 for (j = 0; j < dof; j++) f[(i - 1) * dof + j] -= ctx->flux[j] / hxs; in FVRHSFunction_2WaySplit() 284 for (j = 0; j < dof; j++) f[i * dof + j] += ctx->flux[j] / hxs; in FVRHSFunction_2WaySplit() 291 PetscCall((*ctx->physics2.riemann2)(ctx->physics2.user, dof, uL, uR, ctx->flux, &maxspeed)); in FVRHSFunction_2WaySplit() 293 for (j = 0; j < dof; j++) f[(i - 1) * dof + j] -= ctx->flux[j] / hxs; in FVRHSFunction_2WaySplit() 296 for (j = 0; j < dof; j++) f[i * dof + j] += ctx->flux[j] / hxf; in FVRHSFunction_2WaySplit() 303 PetscCall((*ctx->physics2.riemann2)(ctx->physics2.user, dof, uL, uR, ctx->flux, &maxspeed)); in FVRHSFunction_2WaySplit() 305 for (j = 0; j < dof; j++) f[(i - 1) * dof + j] -= ctx->flux[j] / hxf; in FVRHSFunction_2WaySplit() [all …]
|
| H A D | ex4.c | 57 …x, PetscInt m, const PetscScalar *uL, const PetscScalar *uR, PetscScalar *flux, PetscReal *maxspee… in PhysicsRiemann_Advect() argument 64 flux[0] = PetscMax(0, speed) * uL[0] + PetscMin(0, speed) * uR[0]; in PhysicsRiemann_Advect() 159 …x, PetscInt m, const PetscScalar *uL, const PetscScalar *uR, PetscScalar *flux, PetscReal *maxspee… in PhysicsRiemann_Shallow_Exact() argument 212 ShallowFlux(phys, ufan, flux); in PhysicsRiemann_Shallow_Exact() 217 ShallowFlux(phys, ufan, flux); in PhysicsRiemann_Shallow_Exact() 220 ShallowFlux(phys, uL, flux); in PhysicsRiemann_Shallow_Exact() 223 ShallowFlux(phys, uR, flux); in PhysicsRiemann_Shallow_Exact() 227 ShallowFlux(phys, ustar, flux); in PhysicsRiemann_Shallow_Exact() 233 …x, PetscInt m, const PetscScalar *uL, const PetscScalar *uR, PetscScalar *flux, PetscReal *maxspee… in PhysicsRiemann_Shallow_Rusanov() argument 255 flux[0] = 0.5 * (fL[0] + fR[0]) + 0.5 * s * (L.h - R.h); in PhysicsRiemann_Shallow_Rusanov() [all …]
|
| H A D | ex5.c | 46 …x, PetscInt m, const PetscScalar *uL, const PetscScalar *uR, PetscScalar *flux, PetscReal *maxspee… in PhysicsRiemann_Advect() argument 54 …flux[0] = PetscMax(0, (speed[0] + speed[1]) / 2.0) * uL[0] + PetscMin(0, (speed[0] + speed[1]) / 2… 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() 260 …PetscCall((*ctx->physics.riemann)(ctx->physics.user, dof, uL, uR, ctx->flux, &maxspeed, ctx->xmin … in FVRHSFunctionslow() 263 for (j = 0; j < dof; j++) f[(i - 1) * dof + j] -= ctx->flux[j] / hx; in FVRHSFunctionslow() 266 for (j = 0; j < dof; j++) f[i * dof + j] += ctx->flux[j] / hx; in FVRHSFunctionslow() 276 …PetscCall((*ctx->physics.riemann)(ctx->physics.user, dof, uL, uR, ctx->flux, &maxspeed, ctx->xmin … in FVRHSFunctionslow() 279 for (j = 0; j < dof; j++) f[(i - 1) * dof + j] -= ctx->flux[j] / hx; in FVRHSFunctionslow() 363 …PetscCall((*ctx->physics.riemann)(ctx->physics.user, dof, uL, uR, ctx->flux, &maxspeed, ctx->xmin … in FVRHSFunctionfast() [all …]
|
| /petsc/src/dm/dt/interface/ftn-custom/ |
| H A D | zdsf.c | 14 …calar uR[], PetscInt numConstants, const PetscScalar constants[], PetscScalar flux[], PetscCtx ctx) in ourriemannsolver() argument 16 …[], const PetscInt *numConstants, const PetscScalar constants[], PetscScalar flux[], PetscCtx ctx); in ourriemannsolver() 19 if (func) (*func)(&dim, &Nf, x, n, uL, uR, &numConstants, constants, flux, _ctx); in ourriemannsolver()
|
| /petsc/src/ts/tutorials/ |
| H A D | ex9.c | 216 PetscScalar *flux; /* Flux across interface */ member 290 …x, PetscInt m, const PetscScalar *uL, const PetscScalar *uR, PetscScalar *flux, PetscReal *maxspee… in PhysicsRiemann_Advect() argument 297 flux[0] = PetscMax(0, speed) * uL[0] + PetscMin(0, speed) * uR[0]; in PhysicsRiemann_Advect() 426 …x, PetscInt m, const PetscScalar *uL, const PetscScalar *uR, PetscScalar *flux, PetscReal *maxspee… in PhysicsRiemann_Burgers_Exact() argument 430 flux[0] = (uL[0] * uR[0] < 0) ? 0 /* sonic rarefaction */ in PhysicsRiemann_Burgers_Exact() 433 flux[0] = 0.5 * PetscMax(PetscSqr(uL[0]), PetscSqr(uR[0])); in PhysicsRiemann_Burgers_Exact() 439 …x, PetscInt m, const PetscScalar *uL, const PetscScalar *uR, PetscScalar *flux, PetscReal *maxspee… in PhysicsRiemann_Burgers_Roe() argument 445 flux[0] = 0.25 * (PetscSqr(uL[0]) + PetscSqr(uR[0])) - 0.5 * PetscAbs(speed) * (uR[0] - uL[0]); in PhysicsRiemann_Burgers_Roe() 446 if (uL[0] <= 0 && 0 <= uR[0]) flux[0] = 0; /* Entropy fix for sonic rarefaction */ in PhysicsRiemann_Burgers_Roe() 451 …x, PetscInt m, const PetscScalar *uL, const PetscScalar *uR, PetscScalar *flux, PetscReal *maxspee… in PhysicsRiemann_Burgers_LxF() argument [all …]
|
| H A D | ex11.h | 170 …cScalar *xR, PetscInt numConstants, const PetscScalar constants[], PetscScalar *flux, Physics phys) in PhysicsRiemann_SW_Rusanov() argument 197 for (i = 0; i < 1 + dim; ++i) flux[i] = zero / zero; in PhysicsRiemann_SW_Rusanov() 220 …for (i = 0; i < 1 + dim; i++) flux[i] = (0.5 * (fL.vals[i] + fR.vals[i]) + 0.5 * speed * (xL[i] - … in PhysicsRiemann_SW_Rusanov() 223 for (PetscInt j = 0; j < 3; ++j) PetscPrintf(PETSC_COMM_SELF, " | %g |\n", flux[j]); in PhysicsRiemann_SW_Rusanov() 244 CeedScalar flux[3]; in PhysicsRiemann_SW_Rusanov_CEED() local 254 PhysicsRiemann_SW_Rusanov(DIM, DIM + 1, NULL, n, qL, qR, 0, NULL, flux, &phys); in PhysicsRiemann_SW_Rusanov_CEED() 256 cL[i + Q * j] = -flux[j] / geom[i + Q * 2]; in PhysicsRiemann_SW_Rusanov_CEED() 257 cR[i + Q * j] = flux[j] / geom[i + Q * 3]; in PhysicsRiemann_SW_Rusanov_CEED() 270 …cScalar *xR, PetscInt numConstants, const PetscScalar constants[], PetscScalar *flux, Physics phys) in PhysicsRiemann_SW_HLL() argument 295 for (i = 0; i < 1 + dim; i++) flux[i] = zero; in PhysicsRiemann_SW_HLL() [all …]
|
| H A D | ex18.c | 286 …cScalar *uR, PetscInt numConstants, const PetscScalar constants[], PetscScalar *flux, PetscCtx ctx) in riemann_advection() argument 291 flux[0] = (wn > 0 ? uL[dim] : uR[dim]) * wn; in riemann_advection() 294 …cScalar *uR, PetscInt numConstants, const PetscScalar constants[], PetscScalar *flux, PetscCtx ctx) 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/snes/tutorials/output/ |
| H A D | ex27_2d_p2_rt0p0_sensor.out | 2 type: flux
|
| H A D | ex27_2d_p2_rt0p0_byhand_sensor.out | 7 Flux error norm = 30.4546 Exact flux error norm = 31.2045
|
| H A D | ex27_2d_p2_rt0p0_byhand_trig.out | 7 Flux error norm = 7.38794 Exact flux error norm = 7.63833
|
| H A D | ex27_2d_p2_rt0p0_quadratic.out | 2 type: flux
|
| H A D | ex27_2d_p2_rt0p0_byhand_quadratic.out | 7 Flux error norm = 2.52113e-09 Exact flux error norm = 1.46701e-09
|
| H A D | ex27_2d_p2_rt0p0_trig.out | 2 type: flux
|
| H A D | ex27_2d_p2_rt0p0_a2_sensor.out | 14 type: flux
|
| /petsc/src/snes/tutorials/ |
| H A D | ex27.c | 223 PetscScalar flux; in f0_quadratic_bd_primal() local 225 PetscCallAbort(PETSC_COMM_SELF, quadratic_q(dim, t, x, dim, &flux, NULL)); in f0_quadratic_bd_primal() 226 for (PetscInt d = 0; d < dim; ++d) f0[d] = -k * flux * n[d]; in f0_quadratic_bd_primal() 232 PetscScalar flux; in f0_trig_bd_primal() local 234 PetscCallAbort(PETSC_COMM_SELF, trig_q(dim, t, x, dim, &flux, NULL)); in f0_trig_bd_primal() 235 for (PetscInt d = 0; d < dim; ++d) f0[d] = -k * flux * n[d]; in f0_trig_bd_primal() 241 PetscScalar flux[2]; in f0_sensor_bd_primal() local 243 PetscCallAbort(PETSC_COMM_SELF, sensor_q(dim, t, x, dim, flux, NULL)); in f0_sensor_bd_primal() 244 for (PetscInt d = 0; d < dim; ++d) f0[d] = -k * flux[d] * n[d]; in f0_sensor_bd_primal()
|
| /petsc/doc/miscellaneous/ |
| H A D | applications_publications.md | 51 …- [Turbulence analysis of an experimental flux-rope plasma](https://iopscience.iop.org/0741-3335/5… 55 [Self-organization during spherical torus formation by flux rope merging in the Mega
|
| /petsc/include/ |
| H A D | petscdstypes.h | 263 …alar uR[], PetscInt numConstants, const PetscScalar constants[], PetscScalar flux[], PetscCtx ctx);
|
| /petsc/src/dm/dt/fv/interface/ |
| H A D | fv.c | 1911 PetscScalar *flux = fvm->fluxWork; in PetscFVIntegrateRHSFunction_Upwind() local 1925 …fgeom[f].centroid, fgeom[f].normal, &uL[f * Nc], &uR[f * Nc], numConstants, constants, flux, rctx); in PetscFVIntegrateRHSFunction_Upwind() 1927 fluxL[f * totDim + off + d] = flux[d] / neighborVol[f * 2 + 0]; in PetscFVIntegrateRHSFunction_Upwind() 1928 fluxR[f * totDim + off + d] = flux[d] / neighborVol[f * 2 + 1]; in PetscFVIntegrateRHSFunction_Upwind() 2193 PetscScalar *flux = fvm->fluxWork; in PetscFVIntegrateRHSFunction_LeastSquares() local 2207 …fgeom[f].centroid, fgeom[f].normal, &uL[f * Nc], &uR[f * Nc], numConstants, constants, flux, rctx); in PetscFVIntegrateRHSFunction_LeastSquares() 2209 fluxL[f * totDim + off + d] = flux[d] / neighborVol[f * 2 + 0]; in PetscFVIntegrateRHSFunction_LeastSquares() 2210 fluxR[f * totDim + off + d] = flux[d] / neighborVol[f * 2 + 1]; in PetscFVIntegrateRHSFunction_LeastSquares()
|
| /petsc/src/dm/impls/plex/tests/ |
| H A D | ex73.c | 80 static void flux(PetscInt dim, PetscInt Nf, PetscInt NfAux, const PetscInt uOff[], const PetscInt u… in flux() function 224 PetscBdPointFn *funcs[] = {zero_bd, flux}; in main()
|
| /petsc/src/ts/tests/ |
| H A D | ex5.c | 348 …PetscScalar airtemp, PetscScalar emma, PetscScalar fract, PetscScalar cloudTemp, PetscScalar *flux) in calcfluxs() argument 351 …*flux = SIG * ((EMMSFC * emma * PetscPowScalarInt(airtemp, 4)) + (EMMSFC * fract * (1 - emma) * Pe… in calcfluxs() 355 …(PetscScalar sfctemp, PetscScalar airtemp, PetscScalar emma, PetscScalar *flux) /* this function i… in calcfluxa() argument 360 …*flux = SIG * (-emm * (PetscPowScalarInt(airtemp, 4))); /* calculates flux usinge Stefan-Boltzmann… in calcfluxa()
|
| /petsc/src/ksp/ksp/tutorials/output/ |
| H A D | ex71_bddc_elast_4lev.out | 46 Algebraic computation of no-net-flux: 0 159 Algebraic computation of no-net-flux: 0 278 Algebraic computation of no-net-flux: 0
|
| H A D | ex71_bddc_elast_3lev.out | 46 Algebraic computation of no-net-flux: 0 159 Algebraic computation of no-net-flux: 0
|
| H A D | ex59_bddc_fetidp_ml_2.out | 46 Algebraic computation of no-net-flux: 0 157 Algebraic computation of no-net-flux: 0
|