PLUTO
|
Reconstruction coefficients header file. More...
Go to the source code of this file.
Classes | |
struct | PLM_COEFFS |
Macros | |
#define | UNIFORM_CARTESIAN_GRID YES |
#define | CHECK_MONOTONICITY NO |
Limiter macros. | |
The following macros define a few limiter functions that can be used for piecewise linear reconstruction. Each limiter has the form Usually | |
#define | SET_FL_LIMITER(dv, dvp, dvm, cp, cm) dv = 0.0 |
#define | SET_MM_LIMITER(dv, dvp, dvm, cp, cm) dv = (dvp*dvm > 0.0 ? ABS_MIN(dvp, dvm): 0.0) |
#define | SET_VA_LIMITER(dv, dvp, dvm, cp, cm) |
#define | SET_UM_LIMITER(dv, dvp, dvm, cp, cm) |
#define | SET_GM_LIMITER(dv, dvp, dvm, cp, cm) |
#define | SET_OS_LIMITER(dv, dvp, dvm, cp, cm) |
#define | SET_VL_LIMITER(dv, dvp, dvm, cp, cm) dv = (dvp*dvm > 0.0 ? 2.0*dvp*dvm/(dvp + dvm) :0.0) |
#define | SET_MC_LIMITER(dv, dvp, dvm, cp, cm) |
Typedefs | |
typedef struct PLM_COEFFS | PLM_Coeffs |
Functions | |
void | PLM_CoefficientsSet (Grid *grid) |
void | PLM_CoefficientsGet (PLM_Coeffs *, int) |
Reconstruction coefficients header file.
Define some useful macros for the computation of slope limiters in the piecewise linear method.
The macro UNIFORM_CARTESIAN_GRID can be set to YES to enable faster computation when the grid is uniform and Cartesian. In the general case (non-uniform and/or non-Cartesian), set it to NO.
References
Definition in file plm_coeffs.h.
#define CHECK_MONOTONICITY NO |
Definition at line 31 of file plm_coeffs.h.
#define SET_FL_LIMITER | ( | dv, | |
dvp, | |||
dvm, | |||
cp, | |||
cm | |||
) | dv = 0.0 |
Set flat (zero slope) reconstruction (also non-uniform).
Definition at line 72 of file plm_coeffs.h.
#define SET_GM_LIMITER | ( | dv, | |
dvp, | |||
dvm, | |||
cp, | |||
cm | |||
) |
Generalised minmod limiter
Definition at line 96 of file plm_coeffs.h.
#define SET_MC_LIMITER | ( | dv, | |
dvp, | |||
dvm, | |||
cp, | |||
cm | |||
) |
Monotonized central limiter (uniform cart. grid). Here cp
and cm
are useless.
Definition at line 119 of file plm_coeffs.h.
#define SET_MM_LIMITER | ( | dv, | |
dvp, | |||
dvm, | |||
cp, | |||
cm | |||
) | dv = (dvp*dvm > 0.0 ? ABS_MIN(dvp, dvm): 0.0) |
Set Minmod limiter.
Definition at line 76 of file plm_coeffs.h.
#define SET_OS_LIMITER | ( | dv, | |
dvp, | |||
dvm, | |||
cp, | |||
cm | |||
) |
OSPRE limiter (uniform Cart. grid)
Definition at line 109 of file plm_coeffs.h.
#define SET_UM_LIMITER | ( | dv, | |
dvp, | |||
dvm, | |||
cp, | |||
cm | |||
) |
Umist limiter
Definition at line 87 of file plm_coeffs.h.
#define SET_VA_LIMITER | ( | dv, | |
dvp, | |||
dvm, | |||
cp, | |||
cm | |||
) |
Van Albada limiter
Definition at line 80 of file plm_coeffs.h.
#define SET_VL_LIMITER | ( | dv, | |
dvp, | |||
dvm, | |||
cp, | |||
cm | |||
) | dv = (dvp*dvm > 0.0 ? 2.0*dvp*dvm/(dvp + dvm) :0.0) |
Van Leer limiter (uniform Cartesian grid)
Definition at line 114 of file plm_coeffs.h.
#define UNIFORM_CARTESIAN_GRID YES |
Definition at line 25 of file plm_coeffs.h.
typedef struct PLM_COEFFS PLM_Coeffs |
Simple structure used to retrieve 1D reconstruction weights (c, w, d) used by piecewise linear interpolation (see states_plm.c)
void PLM_CoefficientsGet | ( | PLM_Coeffs * | plm_coeffs, |
int | dir | ||
) |
Retrieve reconstruction coefficients in the PLM_Coeffs structure. This function can be called only if the previous one has been completed already.
[out] | plm_coeffs | a pointer to a PLM_Coeffs structure containing the 1D coefficients needed for reconstruction |
[in] | dir | the desired direction |
Definition at line 79 of file plm_coeffs.c.
void PLM_CoefficientsSet | ( | Grid * | grid | ) |
Compute interpolation coefficients for linear reconstruction.
[in] | grid | pointer to array of grid structure |
Definition at line 30 of file plm_coeffs.c.