General extended feature wrapper for inversion U->P. More...
#include "decs.h"
Go to the source code of this file.
Macros | |
#define | CHECKONINVFRAC (MAX(1E-7,newtonstats->tryconv*1E3)) |
fractional error above which inversion is reported on as having made a signficant error More... | |
#define | FAILIFBADCHECK 1 |
whether to fail if check on inversion fails More... | |
#define | CHECKONINVFRACFAIL (1E-1) |
fraction upon if greater will treat as failure if FAILIFBADCHECK is triggered More... | |
#define | REPORTCYCLE (10) |
#define | ENTROPYFIXGUESSEXTERNAL (ENTROPYFIXGUESS) |
whether to fix u_g using entropy conserved quantity, if available. More... | |
#define | CRAZYDEBUG 0 |
#define | ERRORCONST (1E-10) |
#define | SHOWUGCHANGEDUETOENTROPY (10.0) |
Functions | |
int | Utoprimgen (int showmessages, int checkoninversiongas, int checkoninversionrad, int allowlocalfailurefixandnoreport, int finalstep, int *eomtype, int whichcap, int whichmethod, int modprim, int evolvetype, int inputtype, FTYPE *U, struct of_state *qptr, struct of_geom *ptrgeom, FTYPE dissmeasure, FTYPE *pi, FTYPE *pr, struct of_newtonstats *newtonstats) |
General explicit inversion of U[MHD]->P[MHD] and also inverts scalars. Inverts radiation if(EOMRADTYPE!=EOMRADNONE) More... | |
int | invert_scalars1 (struct of_geom *ptrgeom, FTYPE *Ugeomfree, FTYPE *pr) |
perform U->p inversion on advected scalars More... | |
int | invert_scalars2 (struct of_geom *ptrgeom, FTYPE *Ugeomfree, struct of_state *q, FTYPE *pr) |
perform U->p inversion on advected scalars More... | |
int | Utoprimgen_pick (int showmessages, int allowlocalfailurefixandnoreport, int which, int eomtype, int whichcap, int parameter, FTYPE *Ugeomfree, struct of_geom *ptrgeom, PFTYPE *lpflag, FTYPE *pr, FTYPE *pressure, struct of_newtonstats *newtonstats, PFTYPE *lpflagrad) |
just picks the algorithm to invert More... | |
int | Utoprimloop (FTYPE(*U)[NSTORE2][NSTORE3][NPR], FTYPE(*prim)[NSTORE2][NSTORE3][NPR], struct of_newtonstats *newtonstats) |
there may be something wrong with this function – didn't work in TIMEORDER==4, had to do standard method could have just been that I wasn't bounding after using this More... | |
int | primtoUloop (FTYPE(*prim)[NSTORE2][NSTORE3][NPR], FTYPE(*U)[NSTORE2][NSTORE3][NPR]) |
loop for P->U More... | |
int | isflowcold (FTYPE COLDFACTOR, int includerad, FTYPE *pb, struct of_geom *ptrgeom, struct of_state *q, FTYPE *uu0) |
includerad=1: account for fact that not only assume MHD flow is cold itself, but energy-force balance between gas and radiation is not important, only momentum being important. More... | |
General extended feature wrapper for inversion U->P.
Definition in file utoprimgen.c.
#define CHECKONINVFRAC (MAX(1E-7,newtonstats->tryconv*1E3)) |
fractional error above which inversion is reported on as having made a signficant error
Definition at line 20 of file utoprimgen.c.
#define CHECKONINVFRACFAIL (1E-1) |
fraction upon if greater will treat as failure if FAILIFBADCHECK is triggered
Definition at line 27 of file utoprimgen.c.
#define CRAZYDEBUG 0 |
#define ENTROPYFIXGUESSEXTERNAL (ENTROPYFIXGUESS) |
whether to fix u_g using entropy conserved quantity, if available.
Definition at line 32 of file utoprimgen.c.
#define ERRORCONST (1E-10) |
#define FAILIFBADCHECK 1 |
whether to fail if check on inversion fails
Definition at line 24 of file utoprimgen.c.
#define REPORTCYCLE (10) |
Definition at line 29 of file utoprimgen.c.
#define SHOWUGCHANGEDUETOENTROPY (10.0) |
perform U->p inversion on advected scalars
Definition at line 2215 of file utoprimgen.c.
int invert_scalars2 | ( | struct of_geom * | ptrgeom, |
FTYPE * | Ugeomfree, | ||
struct of_state * | q, | ||
FTYPE * | pr | ||
) |
perform U->p inversion on advected scalars
Definition at line 2353 of file utoprimgen.c.
int isflowcold | ( | FTYPE | COLDFACTOR, |
int | includerad, | ||
FTYPE * | pb, | ||
struct of_geom * | ptrgeom, | ||
struct of_state * | q, | ||
FTYPE * | uu0 | ||
) |
includerad=1: account for fact that not only assume MHD flow is cold itself, but energy-force balance between gas and radiation is not important, only momentum being important.
Definition at line 3088 of file utoprimgen.c.
loop for P->U
Definition at line 2838 of file utoprimgen.c.
int Utoprimgen | ( | int | showmessages, |
int | checkoninversiongas, | ||
int | checkoninversionrad, | ||
int | allowlocalfailurefixandnoreport, | ||
int | finalstep, | ||
int * | eomtype, | ||
int | whichcap, | ||
int | whichmethod, | ||
int | modprim, | ||
int | evolvetype, | ||
int | inputtype, | ||
FTYPE * | U, | ||
struct of_state * | qptr, | ||
struct of_geom * | ptrgeom, | ||
FTYPE | dissmeasure, | ||
FTYPE * | pi, | ||
FTYPE * | pr, | ||
struct of_newtonstats * | newtonstats | ||
) |
General explicit inversion of U[MHD]->P[MHD] and also inverts scalars. Inverts radiation if(EOMRADTYPE!=EOMRADNONE)
Definition at line 53 of file utoprimgen.c.
int Utoprimgen_pick | ( | int | showmessages, |
int | allowlocalfailurefixandnoreport, | ||
int | which, | ||
int | eomtype, | ||
int | whichcap, | ||
int | parameter, | ||
FTYPE * | Ugeomfree, | ||
struct of_geom * | ptrgeom, | ||
PFTYPE * | lpflag, | ||
FTYPE * | pr, | ||
FTYPE * | pressure, | ||
struct of_newtonstats * | newtonstats, | ||
PFTYPE * | lpflagrad | ||
) |
just picks the algorithm to invert
Definition at line 2615 of file utoprimgen.c.
int Utoprimloop | ( | FTYPE(*) | U[NSTORE2][NSTORE3][NPR], |
FTYPE(*) | prim[NSTORE2][NSTORE3][NPR], | ||
struct of_newtonstats * | newtonstats | ||
) |
there may be something wrong with this function – didn't work in TIMEORDER==4, had to do standard method could have just been that I wasn't bounding after using this
Definition at line 2812 of file utoprimgen.c.