Routines for computing fluxes except those special routines directly related to FLUXB==FLUXCTSTAG or FLUXCTTOTH. More...
#include "decs.h"
Go to the source code of this file.
Macros | |
| #define | STOREWAVESPEEDMETHOD 1 |
| #define | MYCOMPLOOPF3 for(k=-SHIFT3+SHIFTX3DN;k<=N3-1+SHIFT3+SHIFT3+SHIFTX3UP;k++) |
| #define | MYCOMPLOOPF2 for(j=-SHIFT2+SHIFTX2DN;j<=N2-1+SHIFT2+SHIFT2+SHIFTX2UP;j++) |
| #define | MYCOMPLOOPF1 for(i=-SHIFT1+SHIFTX1DN;i<=N1-1+SHIFT1+SHIFT1+SHIFTX1UP;i++) |
| #define | MYCOMPLOOPF MYCOMPLOOPF3 MYCOMPLOOPF2 MYCOMPLOOPF1 |
| #define | WHICHEMF 1 |
Functions | |
| int | fluxcalc (int stage, int initialstep, int finalstep, FTYPE(*pr)[NSTORE2][NSTORE3][NPR], FTYPE(*pstag)[NSTORE2][NSTORE3][NPR], FTYPE(*pl_ct)[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], FTYPE(*pr_ct)[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], FTYPE(*vpot)[NSTORE1+SHIFTSTORE1][NSTORE2+SHIFTSTORE2][NSTORE3+SHIFTSTORE3], FTYPE(*F1)[NSTORE2][NSTORE3][NPR+NSPECIAL], FTYPE(*F2)[NSTORE2][NSTORE3][NPR+NSPECIAL], FTYPE(*F3)[NSTORE2][NSTORE3][NPR+NSPECIAL], FTYPE *CUf, FTYPE *CUnew, SFTYPE fluxdt, SFTYPE fluxtime, FTYPE *ndt1, FTYPE *ndt2, FTYPE *ndt3) |
| see fluxcompute.c for non-computer science, real physics calculations of flux More... | |
| int | fluxEM2flux4EMF (int *Nvec, FTYPE(*fluxvec[NDIM])[NSTORE2][NSTORE3][NPR+NSPECIAL], FTYPE(*fluxvecEM[NDIM])[NSTORE2][NSTORE3][NPR+NSPECIAL]) |
| int | fluxcalc_flux (int stage, FTYPE(*pr)[NSTORE2][NSTORE3][NPR], FTYPE(*pstag)[NSTORE2][NSTORE3][NPR], FTYPE(*pl_ct)[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], FTYPE(*pr_ct)[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], int *Nvec, FTYPE(*dqvec[NDIM])[NSTORE2][NSTORE3][NPR2INTERP], FTYPE(*fluxvec[NDIM])[NSTORE2][NSTORE3][NPR+NSPECIAL], FTYPE(*fluxvecEM[NDIM])[NSTORE2][NSTORE3][NPR+NSPECIAL], FTYPE CUf, SFTYPE time, FTYPE *ndtvec[NDIM], struct of_loop *cent2faceloop) |
| wrapper for CENT_to_FACE1,2,3 used to compute flux at face More... | |
| int | fluxcalc_flux_1d (int stage, FTYPE(*pr)[NSTORE2][NSTORE3][NPR], FTYPE(*pstag)[NSTORE2][NSTORE3][NPR], FTYPE(*pl_ct)[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], FTYPE(*pr_ct)[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], int dir, SFTYPE time, int is, int ie, int js, int je, int ks, int ke, int idel, int jdel, int kdel, int face, FTYPE(*dq)[NSTORE2][NSTORE3][NPR2INTERP], FTYPE(*F)[NSTORE2][NSTORE3][NPR+NSPECIAL], FTYPE(*FEM)[NSTORE2][NSTORE3][NPR+NSPECIAL], FTYPE CUf, FTYPE *ndt, struct of_loop *cent2faceloop, int *didassigngetstatecentdata) |
| wrapper for different standard 1-D flux calculators 1-D interpolate and get flux for that direction (assumes purely 1-D Riemann problem) More... | |
| int | fluxcalc_standard (int stage, FTYPE(*pr)[NSTORE2][NSTORE3][NPR], FTYPE(*pstag)[NSTORE2][NSTORE3][NPR], FTYPE(*pl_ct)[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], FTYPE(*pr_ct)[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], int dir, SFTYPE time, int is, int ie, int js, int je, int ks, int ke, int idel, int jdel, int kdel, int face, FTYPE(*dq)[NSTORE2][NSTORE3][NPR2INTERP], FTYPE(*F)[NSTORE2][NSTORE3][NPR+NSPECIAL], FTYPE(*FEM)[NSTORE2][NSTORE3][NPR+NSPECIAL], FTYPE CUf, FTYPE *ndt, struct of_loop *cent2faceloop, int *didassigngetstatecentdata) |
| original flux calculator that gets F in "dir". At end global pleft,pright,dq also set and if STOREWAVESPEEDS>0 then wavespeeds stored globally More... | |
| int | fluxcalc_standard_4fluxctstag (int stage, FTYPE(*pr)[NSTORE2][NSTORE3][NPR], FTYPE(*pstag)[NSTORE2][NSTORE3][NPR], FTYPE(*pl_ct)[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], FTYPE(*pr_ct)[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], int dir, SFTYPE time, int is, int ie, int js, int je, int ks, int ke, int idel, int jdel, int kdel, int face, FTYPE(*dq)[NSTORE2][NSTORE3][NPR2INTERP], FTYPE(*F)[NSTORE2][NSTORE3][NPR+NSPECIAL], FTYPE(*FEM)[NSTORE2][NSTORE3][NPR+NSPECIAL], FTYPE CUf, FTYPE *ndt, struct of_loop *cent2faceloop, int *didassigngetstatecentdata) |
| standard (non-field flux) calculation but setup to store results of interpolation so can be used for fluxctstag calculation set pl_ct and pr_ct with FACE interpolations from CENT (including field face from pstagscratch[]) At end global pleft,pright,dq also set and if STOREWAVESPEEDS>0 then wavespeeds stored globally More... | |
| int | interpolate_prim_cent2face (int stage, int realisinterp, FTYPE(*pr)[NSTORE2][NSTORE3][NPR], FTYPE(*pstag)[NSTORE2][NSTORE3][NPR], FTYPE(*pl_ct)[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], FTYPE(*pr_ct)[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], int dir, SFTYPE time, int is, int ie, int js, int je, int ks, int ke, int idel, int jdel, int kdel, int face, FTYPE(*dq)[NSTORE2][NSTORE3][NPR2INTERP], struct of_loop *cent2faceloop) |
| normal interpolation of CENT quantities to FACE quantities sets global variables pl_ct and pr_ct to p_l and p_r from interpolations More... | |
| void | slope_lim (int dointerpolation, int realisinterp, int dir, int idel, int jdel, int kdel, FTYPE(*primreal)[NSTORE2][NSTORE3][NPR], FTYPE(*p2interp)[NSTORE2][NSTORE3][NPR2INTERP], FTYPE(*dq)[NSTORE2][NSTORE3][NPR2INTERP], FTYPE(*pleft)[NSTORE2][NSTORE3][NPR2INTERP], FTYPE(*pright)[NSTORE2][NSTORE3][NPR2INTERP], struct of_loop *cent2faceloop) |
| slope_lim() is provided p2interp and returns pleft/pright More... | |
| void | slope_lim_cent2face (int dointerpolation, int realisinterp, int dir, int idel, int jdel, int kdel, FTYPE(*primreal)[NSTORE2][NSTORE3][NPR], FTYPE(*p2interp)[NSTORE2][NSTORE3][NPR2INTERP], FTYPE(*dq)[NSTORE2][NSTORE3][NPR2INTERP], FTYPE(*pleft)[NSTORE2][NSTORE3][NPR2INTERP], FTYPE(*pright)[NSTORE2][NSTORE3][NPR2INTERP], struct of_loop *cent2faceloop) |
| slope_lim_cent2face() is provided p2interp and returns pleft/pright gets interpolations in expanded region for FLUXRECON && FLUXCTSTAG method if updating quasi-deaveraged field instead of point value More... | |
| int | fluxcalc_donor (int stage, FTYPE(*pr)[NSTORE2][NSTORE3][NPR], FTYPE(*pstag)[NSTORE2][NSTORE3][NPR], FTYPE(*pl_ct)[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], FTYPE(*pr_ct)[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], FTYPE(*vpot)[NSTORE1+SHIFTSTORE1][NSTORE2+SHIFTSTORE2][NSTORE3+SHIFTSTORE3], FTYPE(*F1)[NSTORE2][NSTORE3][NPR+NSPECIAL], FTYPE(*F2)[NSTORE2][NSTORE3][NPR+NSPECIAL], FTYPE(*F3)[NSTORE2][NSTORE3][NPR+NSPECIAL], FTYPE CUf, FTYPE fluxdt, FTYPE *ndt1, FTYPE *ndt2, FTYPE *ndt3) |
| compute donor-based flux, bypassing normal fluxcalc(). More... | |
Routines for computing fluxes except those special routines directly related to FLUXB==FLUXCTSTAG or FLUXCTTOTH.
OPTMARK: Should redo flux's so that fluxes are accessed by MAC(F1,j,k,i) MAC(F2,k,i,j) MAC(F3,i,j,k) for faster differencing in advance.c Maybe not important
Definition in file flux.c.
| #define MYCOMPLOOPF MYCOMPLOOPF3 MYCOMPLOOPF2 MYCOMPLOOPF1 |
| #define WHICHEMF 1 |
| int fluxcalc | ( | int | stage, |
| int | initialstep, | ||
| int | finalstep, | ||
| FTYPE(*) | pr[NSTORE2][NSTORE3][NPR], | ||
| FTYPE(*) | pstag[NSTORE2][NSTORE3][NPR], | ||
| FTYPE(*) | pl_ct[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], | ||
| FTYPE(*) | pr_ct[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], | ||
| FTYPE(*) | vpot[NSTORE1+SHIFTSTORE1][NSTORE2+SHIFTSTORE2][NSTORE3+SHIFTSTORE3], | ||
| FTYPE(*) | F1[NSTORE2][NSTORE3][NPR+NSPECIAL], | ||
| FTYPE(*) | F2[NSTORE2][NSTORE3][NPR+NSPECIAL], | ||
| FTYPE(*) | F3[NSTORE2][NSTORE3][NPR+NSPECIAL], | ||
| FTYPE * | CUf, | ||
| FTYPE * | CUnew, | ||
| SFTYPE | fluxdt, | ||
| SFTYPE | fluxtime, | ||
| FTYPE * | ndt1, | ||
| FTYPE * | ndt2, | ||
| FTYPE * | ndt3 | ||
| ) |
see fluxcompute.c for non-computer science, real physics calculations of flux
Definition at line 44 of file flux.c.


| int fluxcalc_donor | ( | int | stage, |
| FTYPE(*) | pr[NSTORE2][NSTORE3][NPR], | ||
| FTYPE(*) | pstag[NSTORE2][NSTORE3][NPR], | ||
| FTYPE(*) | pl_ct[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], | ||
| FTYPE(*) | pr_ct[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], | ||
| FTYPE(*) | vpot[NSTORE1+SHIFTSTORE1][NSTORE2+SHIFTSTORE2][NSTORE3+SHIFTSTORE3], | ||
| FTYPE(*) | F1[NSTORE2][NSTORE3][NPR+NSPECIAL], | ||
| FTYPE(*) | F2[NSTORE2][NSTORE3][NPR+NSPECIAL], | ||
| FTYPE(*) | F3[NSTORE2][NSTORE3][NPR+NSPECIAL], | ||
| FTYPE | CUf, | ||
| FTYPE | fluxdt, | ||
| FTYPE * | ndt1, | ||
| FTYPE * | ndt2, | ||
| FTYPE * | ndt3 | ||
| ) |
compute donor-based flux, bypassing normal fluxcalc().
Allows one to check consistency. Or if really want DONOR, then much faster. To use this, remove "_donor" on function name and rename normal function to be with (e.g.) "_normal" on end of function name. compute donor-based flux, bypassing normal fluxcalc(). Allows one to check consistency. Or if really want DONOR, then much faster.
Definition at line 2586 of file flux.c.


| int fluxcalc_flux | ( | int | stage, |
| FTYPE(*) | pr[NSTORE2][NSTORE3][NPR], | ||
| FTYPE(*) | pstag[NSTORE2][NSTORE3][NPR], | ||
| FTYPE(*) | pl_ct[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], | ||
| FTYPE(*) | pr_ct[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], | ||
| int * | Nvec, | ||
| FTYPE(*[]) | NDIM[NSTORE2][NSTORE3][NPR2INTERP], | ||
| FTYPE(*[]) | NDIM[NSTORE2][NSTORE3][NPR+NSPECIAL], | ||
| FTYPE(*[]) | NDIM[NSTORE2][NSTORE3][NPR+NSPECIAL], | ||
| FTYPE | CUf, | ||
| SFTYPE | time, | ||
| FTYPE * | ndtvec[NDIM], | ||
| struct of_loop * | cent2faceloop | ||
| ) |
| int fluxcalc_flux_1d | ( | int | stage, |
| FTYPE(*) | pr[NSTORE2][NSTORE3][NPR], | ||
| FTYPE(*) | pstag[NSTORE2][NSTORE3][NPR], | ||
| FTYPE(*) | pl_ct[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], | ||
| FTYPE(*) | pr_ct[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], | ||
| int | dir, | ||
| SFTYPE | time, | ||
| int | is, | ||
| int | ie, | ||
| int | js, | ||
| int | je, | ||
| int | ks, | ||
| int | ke, | ||
| int | idel, | ||
| int | jdel, | ||
| int | kdel, | ||
| int | face, | ||
| FTYPE(*) | dq[NSTORE2][NSTORE3][NPR2INTERP], | ||
| FTYPE(*) | F[NSTORE2][NSTORE3][NPR+NSPECIAL], | ||
| FTYPE(*) | FEM[NSTORE2][NSTORE3][NPR+NSPECIAL], | ||
| FTYPE | CUf, | ||
| FTYPE * | ndt, | ||
| struct of_loop * | cent2faceloop, | ||
| int * | didassigngetstatecentdata | ||
| ) |
| int fluxcalc_standard | ( | int | stage, |
| FTYPE(*) | pr[NSTORE2][NSTORE3][NPR], | ||
| FTYPE(*) | pstag[NSTORE2][NSTORE3][NPR], | ||
| FTYPE(*) | pl_ct[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], | ||
| FTYPE(*) | pr_ct[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], | ||
| int | dir, | ||
| SFTYPE | time, | ||
| int | is, | ||
| int | ie, | ||
| int | js, | ||
| int | je, | ||
| int | ks, | ||
| int | ke, | ||
| int | idel, | ||
| int | jdel, | ||
| int | kdel, | ||
| int | face, | ||
| FTYPE(*) | dq[NSTORE2][NSTORE3][NPR2INTERP], | ||
| FTYPE(*) | F[NSTORE2][NSTORE3][NPR+NSPECIAL], | ||
| FTYPE(*) | FEM[NSTORE2][NSTORE3][NPR+NSPECIAL], | ||
| FTYPE | CUf, | ||
| FTYPE * | ndt, | ||
| struct of_loop * | cent2faceloop, | ||
| int * | didassigngetstatecentdata | ||
| ) |
| int fluxcalc_standard_4fluxctstag | ( | int | stage, |
| FTYPE(*) | pr[NSTORE2][NSTORE3][NPR], | ||
| FTYPE(*) | pstag[NSTORE2][NSTORE3][NPR], | ||
| FTYPE(*) | pl_ct[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], | ||
| FTYPE(*) | pr_ct[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], | ||
| int | dir, | ||
| SFTYPE | time, | ||
| int | is, | ||
| int | ie, | ||
| int | js, | ||
| int | je, | ||
| int | ks, | ||
| int | ke, | ||
| int | idel, | ||
| int | jdel, | ||
| int | kdel, | ||
| int | face, | ||
| FTYPE(*) | dq[NSTORE2][NSTORE3][NPR2INTERP], | ||
| FTYPE(*) | F[NSTORE2][NSTORE3][NPR+NSPECIAL], | ||
| FTYPE(*) | FEM[NSTORE2][NSTORE3][NPR+NSPECIAL], | ||
| FTYPE | CUf, | ||
| FTYPE * | ndt, | ||
| struct of_loop * | cent2faceloop, | ||
| int * | didassigngetstatecentdata | ||
| ) |
standard (non-field flux) calculation but setup to store results of interpolation so can be used for fluxctstag calculation set pl_ct and pr_ct with FACE interpolations from CENT (including field face from pstagscratch[]) At end global pleft,pright,dq also set and if STOREWAVESPEEDS>0 then wavespeeds stored globally
Definition at line 1283 of file flux.c.


| int interpolate_prim_cent2face | ( | int | stage, |
| int | realisinterp, | ||
| FTYPE(*) | pr[NSTORE2][NSTORE3][NPR], | ||
| FTYPE(*) | pstag[NSTORE2][NSTORE3][NPR], | ||
| FTYPE(*) | pl_ct[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], | ||
| FTYPE(*) | pr_ct[NSTORE1][NSTORE2][NSTORE3][NPR2INTERP], | ||
| int | dir, | ||
| SFTYPE | time, | ||
| int | is, | ||
| int | ie, | ||
| int | js, | ||
| int | je, | ||
| int | ks, | ||
| int | ke, | ||
| int | idel, | ||
| int | jdel, | ||
| int | kdel, | ||
| int | face, | ||
| FTYPE(*) | dq[NSTORE2][NSTORE3][NPR2INTERP], | ||
| struct of_loop * | cent2faceloop | ||
| ) |
| void slope_lim | ( | int | dointerpolation, |
| int | realisinterp, | ||
| int | dir, | ||
| int | idel, | ||
| int | jdel, | ||
| int | kdel, | ||
| FTYPE(*) | primreal[NSTORE2][NSTORE3][NPR], | ||
| FTYPE(*) | p2interp[NSTORE2][NSTORE3][NPR2INTERP], | ||
| FTYPE(*) | dq[NSTORE2][NSTORE3][NPR2INTERP], | ||
| FTYPE(*) | pleft[NSTORE2][NSTORE3][NPR2INTERP], | ||
| FTYPE(*) | pright[NSTORE2][NSTORE3][NPR2INTERP], | ||
| struct of_loop * | cent2faceloop | ||
| ) |
slope_lim() is provided p2interp and returns pleft/pright
|=interface i=zone center of ith zone
| | p2interp(i) | | pl(i)|pr(i) i | | Fl(i)|Fr(i) i | | Ul(i)|Ur(i) i | | |pleft(i) pright(i)| | |F(i) |
Definition at line 2491 of file flux.c.


| void slope_lim_cent2face | ( | int | dointerpolation, |
| int | realisinterp, | ||
| int | dir, | ||
| int | idel, | ||
| int | jdel, | ||
| int | kdel, | ||
| FTYPE(*) | primreal[NSTORE2][NSTORE3][NPR], | ||
| FTYPE(*) | p2interp[NSTORE2][NSTORE3][NPR2INTERP], | ||
| FTYPE(*) | dq[NSTORE2][NSTORE3][NPR2INTERP], | ||
| FTYPE(*) | pleft[NSTORE2][NSTORE3][NPR2INTERP], | ||
| FTYPE(*) | pright[NSTORE2][NSTORE3][NPR2INTERP], | ||
| struct of_loop * | cent2faceloop | ||
| ) |
slope_lim_cent2face() is provided p2interp and returns pleft/pright gets interpolations in expanded region for FLUXRECON && FLUXCTSTAG method if updating quasi-deaveraged field instead of point value
|=interface i=zone center of ith zone
| | p2interp(i) | | pl(i)|pr(i) i | | Fl(i)|Fr(i) i | | Ul(i)|Ur(i) i | | |pleft(i) pright(i)| | |F(i) |
Definition at line 2533 of file flux.c.


1.8.3.1