Second order (piecewise linear) spatial reconstruction in the primitive variables. More...
Go to the source code of this file.
Functions | |
void | lr_states (const GridS *pG, const Prim1DS W[], const Real Bxc[], const Real dt, const Real dx, const int il, const int iu, Prim1DS Wl[], Prim1DS Wr[], const int dir) |
Computes L/R states Input Arguments: W = PRIMITIVE variables at cell centers along 1-D slice Bxc = B in direction of slice at cell center dtodx = dt/dx il,iu = lower and upper indices of zone centers in slice W and Bxc must be initialized over [il-2:iu+2]. | |
void | lr_states_init (MeshS *pM) |
NoOp for first order, but included for compatibility with integrator (needed for 2nd and 3rd order). | |
void | lr_states_destruct (void) |
NoOp for first order, but included for compatibility with integrator (needed for 2nd and 3rd order). | |
Variables | |
static Real ** | pW = NULL |
static Real ** | vel = NULL |
Second order (piecewise linear) spatial reconstruction in the primitive variables.
PURPOSE: Second order (piecewise linear) spatial reconstruction in the primitive variables. With the CTU integrator, a time-evolution (characteristic tracing) step is used to interpolate interface values to the half time level {n+1/2}.
Limiting is performed in the primitive (rather than characteristic) variables. When used with the VL integrator, an eigenvalue decomposition is NOT needed.
NOTATION:
The L- and R-states at the left-interface in each cell are indexed i.
Internally, in this routine, Wlv and Wrv are the reconstructed values on the left-and right-side of cell center. Thus (see Step 8),
CONTAINS PUBLIC FUNCTIONS:
Definition in file lr_states_prim2.c.
void lr_states | ( | const GridS * | pG, | |
const Prim1DS | W[], | |||
const Real | Bxc[], | |||
const Real | dt, | |||
const Real | dx, | |||
const int | il, | |||
const int | iu, | |||
Prim1DS | Wl[], | |||
Prim1DS | Wr[], | |||
const int | dir | |||
) |
Computes L/R states Input Arguments: W = PRIMITIVE variables at cell centers along 1-D slice Bxc = B in direction of slice at cell center dtodx = dt/dx il,iu = lower and upper indices of zone centers in slice W and Bxc must be initialized over [il-2:iu+2].
Computes L/R states Input Arguments:
Computes L/R states.
Output Arguments: Wl,Wr = L/R-states of PRIMITIVE variables at interfaces over [il:iu+1]
Input Arguments:
Output Arguments:
Output Arguments:
Definition at line 66 of file lr_states_prim2.c.
References Bz(), d(), dWm, esys_prim_adb_hyd(), esys_prim_adb_mhd(), esys_prim_iso_hyd(), esys_prim_iso_mhd(), Gamma, n, pW, vel, and Prim1DS::Vx.
void lr_states_destruct | ( | void | ) |
NoOp for first order, but included for compatibility with integrator (needed for 2nd and 3rd order).
Free memory used by work arrays.
Definition at line 357 of file lr_states_prim2.c.
References free_2d_array(), pW, and vel.
void lr_states_init | ( | MeshS * | pM | ) |
NoOp for first order, but included for compatibility with integrator (needed for 2nd and 3rd order).
Allocate enough memory for work arrays.
Definition at line 315 of file lr_states_prim2.c.
References ath_error(), calloc_2d_array(), MeshS::Domain, MeshS::DomainsPerLevel, DomainS::Grid, lr_states_destruct(), MeshS::NLevels, GridS::Nx, pW, and vel.
Definition at line 45 of file lr_states_prim2.c.
Referenced by lr_states(), lr_states_destruct(), and lr_states_init().
Definition at line 47 of file lr_states_prim2.c.
Referenced by lr_states(), lr_states_destruct(), lr_states_init(), ParticleVel(), and ParticleVelocity().