Functions | Variables

reconstruction/lr_states_ppm.c File Reference

Third order (piecewise parabolic) spatial reconstruction using characteristic interpolation 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 ** dWm = NULL
static Real ** Wim1h = NULL

Detailed Description

Third order (piecewise parabolic) spatial reconstruction using characteristic interpolation in the primitive variables.

PURPOSE: Third order (piecewise parabolic) spatial reconstruction using characteristic interpolation 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}

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 18),

REFERENCE: P. Colella & P. Woodward, "The piecewise parabolic method (PPM) for gas-dynamical simulations", JCP, 54, 174 (1984).

CONTAINS PUBLIC FUNCTIONS:

Definition in file lr_states_ppm.c.


Function Documentation

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:

  • 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.

Output Arguments: Wl,Wr = L/R-states of PRIMITIVE variables at interfaces over [il:iu+1]

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-3:iu+3]

Output Arguments:

  • Wl,Wr = L/R-states of PRIMITIVE variables at interfaces over [il:iu+1]

Output Arguments:

  • Wl,Wr = L/R-states of PRIMITIVE variables at interfaces over [il:iu+1]

Definition at line 67 of file lr_states_ppm.c.

References Bz(), d(), dWm, esys_prim_adb_hyd(), esys_prim_adb_mhd(), esys_prim_iso_hyd(), esys_prim_iso_mhd(), Gamma, n, pW, GridS::r, r, GridS::ri, ri, Prim1DS::Vx, and Wim1h.

Here is the call graph for this function:

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 714 of file lr_states_ppm.c.

References dWm, free_2d_array(), pW, and Wim1h.

Here is the call graph for this function:

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 670 of file lr_states_ppm.c.

References ath_error(), calloc_2d_array(), MeshS::Domain, MeshS::DomainsPerLevel, dWm, DomainS::Grid, lr_states_destruct(), MeshS::NLevels, GridS::Nx, pW, and Wim1h.

Here is the call graph for this function:


Variable Documentation

Real ** dWm = NULL [static]

Definition at line 48 of file lr_states_ppm.c.

Referenced by lr_states(), lr_states_destruct(), and lr_states_init().

Real** pW = NULL [static]

Definition at line 48 of file lr_states_ppm.c.

Referenced by lr_states(), lr_states_destruct(), and lr_states_init().

Real ** Wim1h = NULL [static]

Definition at line 48 of file lr_states_ppm.c.

Referenced by lr_states(), lr_states_destruct(), and lr_states_init().