Compute time-centered interface states using characteristic tracing. More...
#include "pluto.h"
Macros | |
#define | REF_STATE 2 |
Functions | |
void | CharTracingStep (const State_1D *state, int beg, int end, Grid *grid) |
Advance 1-D left and right interface states, previously computed with any of the States functions, to the half time level (n+1/2) by extrapolating characteristic variables. This is done using an upwind selection rule that discards waves not reaching the interface in dt/2.
References:
#define REF_STATE 2 |
Flag to control the choice of the reference state in the upwind selection rule. Set REF_STATE to 1,2,3 to use cell centered value (1), interpolated states (2) or fastest wave (3, the usual PPM prescription).
Compute interface states using characteristic tracing step.
[in] | state | pointer to a State_1D structure |
[in] | beg | initial index of computation |
[in] | end | final index of computation |
[in] | grid | pointer to an array of Grid structures |
Tasks are numbered below.
1) Compute eigenvectors and eigenvalues if not yet defined.
2) Obtain characteristic variable increments dwp and dwm.
3) Initialize vp and vm to the reference state. Since this is somewhat arbitrary we use the value of REF_STATE to select one of the following cases:
Passive scalars use always REF_STATE == 2.
4) Compute left and right states in primitive variables. This step also depends on the value of REF_STATE and include:
5) Add source term to L/R states
6) Repeat construction for passive scalars