Takes RK sub-step. More...
#include "decs.h"
Go to the source code of this file.
Macros | |
#define | COMPARE_GAMMA 0 |
#define | GRAVITYCOUR (0.1) |
Functions | |
static FTYPE | fractional_diff (FTYPE a, FTYPE b) |
Returns the fractional difference between a & b. More... | |
static int | advance_standard (int truestep, int stage, FTYPE(*pi)[NSTORE2][NSTORE3][NPR], FTYPE(*pb)[NSTORE2][NSTORE3][NPR], FTYPE(*pf)[NSTORE2][NSTORE3][NPR], FTYPE(*pstag)[NSTORE2][NSTORE3][NPR], FTYPE(*pl_ct)[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], FTYPE(*pr_ct)[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], FTYPE(*F1)[NSTORE2][NSTORE3][NPR+NSPECIAL], FTYPE(*F2)[NSTORE2][NSTORE3][NPR+NSPECIAL], FTYPE(*F3)[NSTORE2][NSTORE3][NPR+NSPECIAL], FTYPE(*vpot)[NSTORE1+SHIFTSTORE1][NSTORE2+SHIFTSTORE2][NSTORE3+SHIFTSTORE3], FTYPE(*ui)[NSTORE2][NSTORE3][NPR], FTYPE(*uf)[NSTORE2][NSTORE3][NPR], FTYPE(*ucum)[NSTORE2][NSTORE3][NPR], FTYPE *CUf, FTYPE *CUnew, SFTYPE fluxdt, SFTYPE boundtime, SFTYPE fluxtime, int timeorder, int numtimeorders, FTYPE *ndt) |
this method guarantees conservation of non-sourced conserved quantities when metric is time-dependent this method has updated field staggered method Note that when dt==0.0, assume no fluxing, just take ucum -> ui -> {uf,ucum} and invert. More... | |
static int | advance_standard_orig (int truestep, int stage, FTYPE(*pi)[NSTORE2][NSTORE3][NPR], FTYPE(*pb)[NSTORE2][NSTORE3][NPR], FTYPE(*pf)[NSTORE2][NSTORE3][NPR], FTYPE(*pstag)[NSTORE2][NSTORE3][NPR], FTYPE(*pl_ct)[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], FTYPE(*pr_ct)[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], FTYPE(*F1)[NSTORE2][NSTORE3][NPR+NSPECIAL], FTYPE(*F2)[NSTORE2][NSTORE3][NPR+NSPECIAL], FTYPE(*F3)[NSTORE2][NSTORE3][NPR+NSPECIAL], FTYPE(*vpot)[NSTORE1+SHIFTSTORE1][NSTORE2+SHIFTSTORE2][NSTORE3+SHIFTSTORE3], FTYPE(*ui)[NSTORE2][NSTORE3][NPR], FTYPE(*uf)[NSTORE2][NSTORE3][NPR], FTYPE(*ucum)[NSTORE2][NSTORE3][NPR], FTYPE *CUf, FTYPE *CUnew, SFTYPE fluxdt, SFTYPE boundtime, SFTYPE fluxtime, int timeorder, int numtimeorders, FTYPE *ndt) |
this method guarantees conservation of non-sourced conserved quantities when metric is time-dependent this method has updated field staggered method Note that when dt==0.0, assume no fluxing, just take ucum -> ui -> {uf,ucum} and invert. More... | |
int | advance (int truestep, int stage, FTYPE(*pi)[NSTORE2][NSTORE3][NPR], FTYPE(*pb)[NSTORE2][NSTORE3][NPR], FTYPE(*pf)[NSTORE2][NSTORE3][NPR], FTYPE(*pstag)[NSTORE2][NSTORE3][NPR], FTYPE(*pl_ct)[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], FTYPE(*pr_ct)[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], FTYPE(*F1)[NSTORE2][NSTORE3][NPR+NSPECIAL], FTYPE(*F2)[NSTORE2][NSTORE3][NPR+NSPECIAL], FTYPE(*F3)[NSTORE2][NSTORE3][NPR+NSPECIAL], FTYPE(*vpot)[NSTORE1+SHIFTSTORE1][NSTORE2+SHIFTSTORE2][NSTORE3+SHIFTSTORE3], FTYPE(*ui)[NSTORE2][NSTORE3][NPR], FTYPE(*uf)[NSTORE2][NSTORE3][NPR], FTYPE(*ucum)[NSTORE2][NSTORE3][NPR], FTYPE *CUf, FTYPE *CUnew, SFTYPE fluxdt, SFTYPE boundtime, SFTYPE fluxtime, int timeorder, int numtimeorders, FTYPE *ndt) |
pi: initial values at t=t0 to compute Ui pb: values used to compute flux/source pf: solution using flux(pb) from pi's Ui -> Uf pi, pb, and pf can all be the same since 1) pb used first on a stencil, not modified, to compute fluxes 2) pf=pi is assigned by value at each zone 3) pf is modified using Utoprim at each zone using pb for sources (to correspond to fluxes which used pb) More... | |
FTYPE | limit_prim_correction (FTYPE fractional_difference_threshold, struct of_geom *geom, FTYPE *pin, FTYPE *pout) |
If density or gamma-factors are different by more than fractional_difference_threshold for states pin & pout, if different – correct pout such that it is not more than fractional_difference_threshold away from pin. More... | |
Takes RK sub-step.
Takes RK substep by doing 1) flux and source 2) flux+source->dU 3) dU->U 4) U->P
Definition in file advance.c.
int advance | ( | int | truestep, |
int | stage, | ||
FTYPE(*) | pi[NSTORE2][NSTORE3][NPR], | ||
FTYPE(*) | pb[NSTORE2][NSTORE3][NPR], | ||
FTYPE(*) | pf[NSTORE2][NSTORE3][NPR], | ||
FTYPE(*) | pstag[NSTORE2][NSTORE3][NPR], | ||
FTYPE(*) | pl_ct[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], | ||
FTYPE(*) | pr_ct[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], | ||
FTYPE(*) | F1[NSTORE2][NSTORE3][NPR+NSPECIAL], | ||
FTYPE(*) | F2[NSTORE2][NSTORE3][NPR+NSPECIAL], | ||
FTYPE(*) | F3[NSTORE2][NSTORE3][NPR+NSPECIAL], | ||
FTYPE(*) | vpot[NSTORE1+SHIFTSTORE1][NSTORE2+SHIFTSTORE2][NSTORE3+SHIFTSTORE3], | ||
FTYPE(*) | ui[NSTORE2][NSTORE3][NPR], | ||
FTYPE(*) | uf[NSTORE2][NSTORE3][NPR], | ||
FTYPE(*) | ucum[NSTORE2][NSTORE3][NPR], | ||
FTYPE * | CUf, | ||
FTYPE * | CUnew, | ||
SFTYPE | fluxdt, | ||
SFTYPE | boundtime, | ||
SFTYPE | fluxtime, | ||
int | timeorder, | ||
int | numtimeorders, | ||
FTYPE * | ndt | ||
) |
pi: initial values at t=t0 to compute Ui pb: values used to compute flux/source pf: solution using flux(pb) from pi's Ui -> Uf pi, pb, and pf can all be the same since 1) pb used first on a stencil, not modified, to compute fluxes 2) pf=pi is assigned by value at each zone 3) pf is modified using Utoprim at each zone using pb for sources (to correspond to fluxes which used pb)
So in the end only pf is modified at each zone, so the loop changing p at previous (i,j) location doesn't affect the any new location in (i,j)
Definition at line 102 of file advance.c.
|
static |
this method guarantees conservation of non-sourced conserved quantities when metric is time-dependent this method has updated field staggered method Note that when dt==0.0, assume no fluxing, just take ucum -> ui -> {uf,ucum} and invert.
Used with metric update.
NEW: like advance_standard_orig(), but removed debug info and set field "inversion" first so have centered value for source() so have it for any point-use of values like in implicit solver for radiation-fluid interaction.
Definition at line 160 of file advance.c.
|
static |
this method guarantees conservation of non-sourced conserved quantities when metric is time-dependent this method has updated field staggered method Note that when dt==0.0, assume no fluxing, just take ucum -> ui -> {uf,ucum} and invert.
Used with metric update.
Definition at line 1235 of file advance.c.
FTYPE limit_prim_correction | ( | FTYPE | fractional_difference_threshold, |
struct of_geom * | geom, | ||
FTYPE * | pin, | ||
FTYPE * | pout | ||
) |
If density or gamma-factors are different by more than fractional_difference_threshold for states pin & pout, if different – correct pout such that it is not more than fractional_difference_threshold away from pin.
externally referenced
Definition at line 3023 of file advance.c.