Functions | Variables

reconstruction/lr_states_plm.c File Reference

Second order (piecewise linear) 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

Detailed Description

Second order (piecewise linear) spatial reconstruction using characteristic interpolation in the primitive variables.

PURPOSE: Second order (piecewise linear) 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 8),

CONTAINS PUBLIC FUNCTIONS:

Definition in file lr_states_plm.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 62 of file lr_states_plm.c.

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 419 of file lr_states_plm.c.

References pW.

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 381 of file lr_states_plm.c.

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

Here is the call graph for this function:


Variable Documentation

Real** pW = NULL [static]

Definition at line 44 of file lr_states_plm.c.

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