Lines Matching refs:flux

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()
235 for (j = 0; j < dof; j++) f[i * dof + j] += ctx->flux[j] / hf; in FVRHSFunction()
246 PetscCall((*ctx->physics.flux)(ctx->physics.user, u, ctx->flux, &maxspeed)); in FVRHSFunction()
248 for (j = 0; j < dof; j++) f[(i - 1) * dof + j] -= ctx->flux[j] / hf; in FVRHSFunction()
251 for (j = 0; j < dof; j++) f[i * dof + j] += ctx->flux[j] / hf; in FVRHSFunction()
262 PetscCall((*ctx->physics.flux)(ctx->physics.user, u, ctx->flux, &maxspeed)); in FVRHSFunction()
264 for (j = 0; j < dof; j++) f[(i - 1) * dof + j] -= ctx->flux[j] / hf; in FVRHSFunction()
267 for (j = 0; j < dof; j++) f[i * dof + j] += ctx->flux[j] / hf; in FVRHSFunction()
278 PetscCall((*ctx->physics.flux)(ctx->physics.user, u, ctx->flux, &maxspeed)); in FVRHSFunction()
280 for (j = 0; j < dof; j++) f[(i - 1) * dof + j] -= ctx->flux[j] / hf; in FVRHSFunction()
283 for (j = 0; j < dof; j++) f[i * dof + j] += ctx->flux[j] / hs; in FVRHSFunction()
294 PetscCall((*ctx->physics.flux)(ctx->physics.user, u, ctx->flux, &maxspeed)); in FVRHSFunction()
296 for (j = 0; j < dof; j++) f[(i - 1) * dof + j] -= ctx->flux[j] / hs; in FVRHSFunction()
299 for (j = 0; j < dof; j++) f[i * dof + j] += ctx->flux[j] / hs; in FVRHSFunction()
362 PetscCall((*ctx->physics.flux)(ctx->physics.user, u, ctx->flux, &maxspeed)); in FVRHSFunctionslow()
364 for (j = 0; j < dof; j++) f[(islow - 1) * dof + j] -= ctx->flux[j] / hs; in FVRHSFunctionslow()
367 for (j = 0; j < dof; j++) f[islow * dof + j] += ctx->flux[j] / hs; in FVRHSFunctionslow()
379 PetscCall((*ctx->physics.flux)(ctx->physics.user, u, ctx->flux, &maxspeed)); in FVRHSFunctionslow()
381 for (j = 0; j < dof; j++) f[(islow - 1) * dof + j] -= ctx->flux[j] / hs; in FVRHSFunctionslow()
392 PetscCall((*ctx->physics.flux)(ctx->physics.user, u, ctx->flux, &maxspeed)); in FVRHSFunctionslow()
394 for (j = 0; j < dof; j++) f[islow * dof + j] += ctx->flux[j] / hs; in FVRHSFunctionslow()
406 PetscCall((*ctx->physics.flux)(ctx->physics.user, u, ctx->flux, &maxspeed)); in FVRHSFunctionslow()
408 for (j = 0; j < dof; j++) f[(islow - 1) * dof + j] -= ctx->flux[j] / hs; in FVRHSFunctionslow()
411 for (j = 0; j < dof; j++) f[islow * dof + j] += ctx->flux[j] / hs; in FVRHSFunctionslow()
423 PetscCall((*ctx->physics.flux)(ctx->physics.user, u, ctx->flux, &maxspeed)); in FVRHSFunctionslow()
425 for (j = 0; j < dof; j++) f[(islow - 1) * dof + j] -= ctx->flux[j] / hs; in FVRHSFunctionslow()
428 for (j = 0; j < dof; j++) f[islow * dof + j] += ctx->flux[j] / hs; in FVRHSFunctionslow()
484 PetscCall((*ctx->physics.flux)(ctx->physics.user, u, ctx->flux, &maxspeed)); in FVRHSFunctionfast()
486 for (j = 0; j < dof; j++) f[ifast * dof + j] += ctx->flux[j] / hf; in FVRHSFunctionfast()
498 PetscCall((*ctx->physics.flux)(ctx->physics.user, u, ctx->flux, &maxspeed)); in FVRHSFunctionfast()
500 for (j = 0; j < dof; j++) f[(ifast - 1) * dof + j] -= ctx->flux[j] / hf; in FVRHSFunctionfast()
503 for (j = 0; j < dof; j++) f[ifast * dof + j] += ctx->flux[j] / hf; in FVRHSFunctionfast()
515 PetscCall((*ctx->physics.flux)(ctx->physics.user, u, ctx->flux, &maxspeed)); in FVRHSFunctionfast()
517 for (j = 0; j < dof; j++) f[(ifast - 1) * dof + j] -= ctx->flux[j] / hf; in FVRHSFunctionfast()
520 for (j = 0; j < dof; j++) f[ifast * dof + j] += ctx->flux[j] / hf; in FVRHSFunctionfast()
532 PetscCall((*ctx->physics.flux)(ctx->physics.user, u, ctx->flux, &maxspeed)); in FVRHSFunctionfast()
534 for (j = 0; j < dof; j++) f[(ifast - 1) * dof + j] -= ctx->flux[j] / hf; in FVRHSFunctionfast()
720 PetscCall(PetscMalloc3(dof, &ctx.u, dof, &ctx.flux, dof, &ctx.speeds)); in main()
852 PetscCall(PetscFree3(ctx.u, ctx.flux, ctx.speeds)); in main()