Code to take full RK step. More...
#include "decs.h"
Go to the source code of this file.
Functions | |
static void | setup_rktimestep (int truestep, int *numtimeorders, FTYPE(*p)[NSTORE2][NSTORE3][NPR], FTYPE(*pstag)[NSTORE2][NSTORE3][NPR], FTYPE(*ucons)[NSTORE2][NSTORE3][NPR], FTYPE(*vpot)[NSTORE1+SHIFTSTORE1][NSTORE2+SHIFTSTORE2][NSTORE3+SHIFTSTORE3], FTYPE(*Bhat)[NSTORE2][NSTORE3][NPR], FTYPE(*pk)[NSTORE1][NSTORE2][NSTORE3][NPR], FTYPE(*pii[MAXTIMEORDER])[NSTORE2][NSTORE3][NPR], FTYPE(*pbb[MAXTIMEORDER])[NSTORE2][NSTORE3][NPR], FTYPE(*pff[MAXTIMEORDER])[NSTORE2][NSTORE3][NPR], FTYPE(*uii[MAXTIMEORDER])[NSTORE2][NSTORE3][NPR], FTYPE(*uff[MAXTIMEORDER])[NSTORE2][NSTORE3][NPR], FTYPE(*ucum[MAXTIMEORDER])[NSTORE2][NSTORE3][NPR], FTYPE(*CUf)[NUMDTCUFS], FTYPE(*CUnew)[NUMDTCUFS]) |
Setup RK steps for the ith stage: More... | |
static int | pre_stepch (int *dumpingnext, FTYPE(*prim)[NSTORE2][NSTORE3][NPR]) |
things to do before taking a full timestep assume not called when dt==0.0 More... | |
static int | post_stepch (int *dumpingnext, FTYPE fullndt, FTYPE(*prim)[NSTORE2][NSTORE3][NPR], FTYPE(*ucons)[NSTORE2][NSTORE3][NPR]) |
things to do after taking a full timestep assume not called when dt==0.0 More... | |
static int | step_ch (int truestep, int *dumpingnext, FTYPE *fullndt, FTYPE(*prim)[NSTORE2][NSTORE3][NPR], FTYPE(*pstag)[NSTORE2][NSTORE3][NPR], FTYPE(*ucons)[NSTORE2][NSTORE3][NPR], FTYPE(*vpot)[NSTORE1+SHIFTSTORE1][NSTORE2+SHIFTSTORE2][NSTORE3+SHIFTSTORE3], FTYPE(*Bhat)[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(*Atemp)[NSTORE1+SHIFTSTORE1][NSTORE2+SHIFTSTORE2][NSTORE3+SHIFTSTORE3], FTYPE(*uconstemp)[NSTORE2][NSTORE3][NPR]) |
take step itself More... | |
static int | post_advance (int truestep, int *dumpingnext, int timeorder, int numtimeorders, int finalstep, SFTYPE boundtime, SFTYPE fluxtime, FTYPE(*pi)[NSTORE2][NSTORE3][NPR], FTYPE(*pb)[NSTORE2][NSTORE3][NPR], FTYPE(*pf)[NSTORE2][NSTORE3][NPR], FTYPE(*pstag)[NSTORE2][NSTORE3][NPR], FTYPE(*ucons)[NSTORE2][NSTORE3][NPR], FTYPE(*vpot)[NSTORE1+SHIFTSTORE1][NSTORE2+SHIFTSTORE2][NSTORE3+SHIFTSTORE3], FTYPE(*Bhat)[NSTORE2][NSTORE3][NPR], FTYPE(*F1)[NSTORE2][NSTORE3][NPR+NSPECIAL], FTYPE(*F2)[NSTORE2][NSTORE3][NPR+NSPECIAL], FTYPE(*F3)[NSTORE2][NSTORE3][NPR+NSPECIAL], FTYPE(*Atemp)[NSTORE1+SHIFTSTORE1][NSTORE2+SHIFTSTORE2][NSTORE3+SHIFTSTORE3], FTYPE(*uconstemp)[NSTORE2][NSTORE3][NPR]) |
things to do after advance() More... | |
int | step_ch_full (int truestep, FTYPE(*prim)[NSTORE2][NSTORE3][NPR], FTYPE(*pstag)[NSTORE2][NSTORE3][NPR], FTYPE(*ucons)[NSTORE2][NSTORE3][NPR], FTYPE(*vpot)[NSTORE1+SHIFTSTORE1][NSTORE2+SHIFTSTORE2][NSTORE3+SHIFTSTORE3], FTYPE(*Bhat)[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(*Atemp)[NSTORE1+SHIFTSTORE1][NSTORE2+SHIFTSTORE2][NSTORE3+SHIFTSTORE3], FTYPE(*uconstemp)[NSTORE2][NSTORE3][NPR]) |
take full step (called from main.c) More... | |
int | pre_advance (int timeorder, int numtimeorders, int finalstep, FTYPE(*pi)[NSTORE2][NSTORE3][NPR], FTYPE(*pb)[NSTORE2][NSTORE3][NPR], FTYPE(*pf)[NSTORE2][NSTORE3][NPR]) |
things to do during substep before advance() More... | |
int | step_ch_simplempi (int truestep, int *dumpingnext, FTYPE *fullndt, FTYPE(*prim)[NSTORE2][NSTORE3][NPR], FTYPE(*pstag)[NSTORE2][NSTORE3][NPR], FTYPE(*ucons)[NSTORE2][NSTORE3][NPR], FTYPE(*vpot)[NSTORE1+SHIFTSTORE1][NSTORE2+SHIFTSTORE2][NSTORE3+SHIFTSTORE3], FTYPE(*Bhat)[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(*Atemp)[NSTORE1+SHIFTSTORE1][NSTORE2+SHIFTSTORE2][NSTORE3+SHIFTSTORE3], FTYPE(*uconstemp)[NSTORE2][NSTORE3][NPR]) |
take full step using normal MPI method This method transfers ALL boundary cells AT ONCE after updating ALL active cells More... | |
int | bound_evolveprim (int boundstage, int finalstep, SFTYPE boundtime, FTYPE(*prim)[NSTORE2][NSTORE3][NPR], FTYPE(*pstag)[NSTORE2][NSTORE3][NPR], FTYPE(*ucons)[NSTORE2][NSTORE3][NPR], int doboundmpi) |
normal full bounding during evolution NOTEMARK: Was previously also bounding pstag here, but not necessary since done by calling bound_pstag in fluxctstag.c More... | |
int | bound_beforeevolveprim (int boundstage, int finalstep, SFTYPE boundtime, FTYPE(*prim)[NSTORE2][NSTORE3][NPR], FTYPE(*pstag)[NSTORE2][NSTORE3][NPR], FTYPE(*ucons)[NSTORE2][NSTORE3][NPR], int doboundmpi) |
simple bounding during evolution NOTEMARK: Was previously also bounding pstag here, but not necessary since done by calling bound_pstag in fluxctstag.c More... | |
int | bound_prim (int boundstage, int finalstep, SFTYPE boundtime, FTYPE(*prim)[NSTORE2][NSTORE3][NPR], FTYPE(*pstag)[NSTORE2][NSTORE3][NPR], FTYPE(*ucons)[NSTORE2][NSTORE3][NPR], int doboundmpi) |
normal bounding of non-staggered primitives More... | |
int | bound_pstag (int boundstage, int finalstep, SFTYPE boundtime, FTYPE(*prim)[NSTORE2][NSTORE3][NPR], FTYPE(*pstag)[NSTORE2][NSTORE3][NPR], FTYPE(*ucons)[NSTORE2][NSTORE3][NPR], int doboundmpi) |
normal bounding of staggered primitives More... | |
int | bound_allprim (int boundstage, int finalstep, SFTYPE boundtime, FTYPE(*prim)[NSTORE2][NSTORE3][NPR], FTYPE(*pstag)[NSTORE2][NSTORE3][NPR], FTYPE(*ucons)[NSTORE2][NSTORE3][NPR], int doboundmpi) |
normal bounding of all primitives More... | |
int | bound_anyallprim (int boundstage, int finalstep, SFTYPE boundtime, int boundvartype, FTYPE(*prim)[NSTORE2][NSTORE3][NPR], FTYPE(*pstag)[NSTORE2][NSTORE3][NPR], FTYPE(*ucons)[NSTORE2][NSTORE3][NPR], int doboundmpi) |
bound all prims More... | |
int | bound_anyprim (int boundstage, int finalstep, SFTYPE boundtime, int boundvartype, FTYPE(*prim)[NSTORE2][NSTORE3][NPR], FTYPE(*pstag)[NSTORE2][NSTORE3][NPR], FTYPE(*ucons)[NSTORE2][NSTORE3][NPR], int doboundmpi) |
bound any prim type CALLS directly real and MPI boundary functions pstag = pstagglobal ucons = unewglobal More... | |
int | bound_anypstag (int boundstage, int finalstep, SFTYPE boundtime, int boundvartype, FTYPE(*prim)[NSTORE2][NSTORE3][NPR], FTYPE(*pstag)[NSTORE2][NSTORE3][NPR], FTYPE(*ucons)[NSTORE2][NSTORE3][NPR], int doboundmpi) |
bound any pstag type CALLS directly real and MPI boundary functions pstag is at FACE1,2,3 for fields, so user bound is different MPI bounding is the same as CENT quantities used when restarting in initbase.c to bound unewglobal for FLUXB==FLUXCTSTAG More... | |
Code to take full RK step.
Definition in file step_ch.c.
int bound_anypstag | ( | int | boundstage, |
int | finalstep, | ||
SFTYPE | boundtime, | ||
int | boundvartype, | ||
FTYPE(*) | prim[NSTORE2][NSTORE3][NPR], | ||
FTYPE(*) | pstag[NSTORE2][NSTORE3][NPR], | ||
FTYPE(*) | ucons[NSTORE2][NSTORE3][NPR], | ||
int | doboundmpi | ||
) |
bound any pstag type CALLS directly real and MPI boundary functions pstag is at FACE1,2,3 for fields, so user bound is different MPI bounding is the same as CENT quantities used when restarting in initbase.c to bound unewglobal for FLUXB==FLUXCTSTAG
Definition at line 1912 of file step_ch.c.
int bound_beforeevolveprim | ( | int | boundstage, |
int | finalstep, | ||
SFTYPE | boundtime, | ||
FTYPE(*) | prim[NSTORE2][NSTORE3][NPR], | ||
FTYPE(*) | pstag[NSTORE2][NSTORE3][NPR], | ||
FTYPE(*) | ucons[NSTORE2][NSTORE3][NPR], | ||
int | doboundmpi | ||
) |
simple bounding during evolution NOTEMARK: Was previously also bounding pstag here, but not necessary since done by calling bound_pstag in fluxctstag.c
Definition at line 1688 of file step_ch.c.
int bound_evolveprim | ( | int | boundstage, |
int | finalstep, | ||
SFTYPE | boundtime, | ||
FTYPE(*) | prim[NSTORE2][NSTORE3][NPR], | ||
FTYPE(*) | pstag[NSTORE2][NSTORE3][NPR], | ||
FTYPE(*) | ucons[NSTORE2][NSTORE3][NPR], | ||
int | doboundmpi | ||
) |
normal full bounding during evolution NOTEMARK: Was previously also bounding pstag here, but not necessary since done by calling bound_pstag in fluxctstag.c
Definition at line 1663 of file step_ch.c.
|
static |
|
static |
|
static |
Setup RK steps for the ith stage:
Uf^i = ulast^i = CUf^{i0} Ui^i + CUf^{i1} ulast^i + CUf^{i2} dUexplicit^i + CUf^{i4} dUimplicit^i
unew^i = CUnew^{i0} Ui^i + CUnew^{i1} dUexplicit^i + CUnew^{i2} Uf^i + CUnew^{i4} dUimplicit^i
[SUPERNOTE: currently only TIMEORDER==4 has final unew different from final uf. This factis usd in utoprimgen.c to avoid inversion if requested, unless cannot because unew must itself be inverted.]
(how also used) CUf[timeorder][2] : t + dt*CUf[timeorder][3]+ dt*CUf[timeorder][2] = time of pf
CUf[timeorder][3] : t + dt*CUf[timeorder][3] = time of pi
CUnew[timeorder][3] : t + dt*CUnew[timeorder][3] = approximate time of pb
GODMARK: Currently RK methods all feed pf into pb on next step, so only need one pstag. In general should have multiple pstag's.
Definition at line 1317 of file step_ch.c.
|
static |
int step_ch_full | ( | int | truestep, |
FTYPE(*) | prim[NSTORE2][NSTORE3][NPR], | ||
FTYPE(*) | pstag[NSTORE2][NSTORE3][NPR], | ||
FTYPE(*) | ucons[NSTORE2][NSTORE3][NPR], | ||
FTYPE(*) | vpot[NSTORE1+SHIFTSTORE1][NSTORE2+SHIFTSTORE2][NSTORE3+SHIFTSTORE3], | ||
FTYPE(*) | Bhat[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(*) | Atemp[NSTORE1+SHIFTSTORE1][NSTORE2+SHIFTSTORE2][NSTORE3+SHIFTSTORE3], | ||
FTYPE(*) | uconstemp[NSTORE2][NSTORE3][NPR] | ||
) |
int step_ch_simplempi | ( | int | truestep, |
int * | dumpingnext, | ||
FTYPE * | fullndt, | ||
FTYPE(*) | prim[NSTORE2][NSTORE3][NPR], | ||
FTYPE(*) | pstag[NSTORE2][NSTORE3][NPR], | ||
FTYPE(*) | ucons[NSTORE2][NSTORE3][NPR], | ||
FTYPE(*) | vpot[NSTORE1+SHIFTSTORE1][NSTORE2+SHIFTSTORE2][NSTORE3+SHIFTSTORE3], | ||
FTYPE(*) | Bhat[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(*) | Atemp[NSTORE1+SHIFTSTORE1][NSTORE2+SHIFTSTORE2][NSTORE3+SHIFTSTORE3], | ||
FTYPE(*) | uconstemp[NSTORE2][NSTORE3][NPR] | ||
) |