HARM
harm and utilities
 All Data Structures Files Functions Variables Typedefs Macros Pages
Macros | Functions
phys.funcdeclare.h File Reference

Function declarations for global use of things in phys.c. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ucon_calc   ucon_calc_4vel
 
#define dudp_calc   dudp_calc_gen
 
#define compute_1plusud0   compute_1plusud0_general
 
#define bsq_calc   bsq_calc_general
 
#define bsq_calc_fromq   bsq_calc_fromq_general
 
#define get_geometry(ii, jj, kk, pp, ptrgeom)   get_geometry_old(ii,jj,kk,pp,ptrgeom)
 
#define get_geometry_gdetmix(ii, jj, kk, pp, ptrgeom)   get_geometry_old(ii,jj,kk,pp,ptrgeom)
 
#define get_geometry_gdetonly(ii, jj, kk, pp, ptrgeom)   get_geometry_gdetonly_old(ii,jj,kk,pp,ptrgeom)
 
#define get_geometry_geomeonly(ii, jj, kk, pp, ptrgeom)   get_geometry_geomeonly_old(ii,jj,kk,pp,ptrgeom)
 
#define set_igdet(arg)   set_igdet_old(arg)
 
#define set_igdetsimple(arg)   set_igdetsimple_old(arg)
 

Functions

int sourcephysics (FTYPE *pi, FTYPE *ph, FTYPE *pf, int *didreturnpf, int *eomtype, struct of_geom *geom, struct of_state *q, FTYPE *Ugeomfreei, FTYPE *Ugeomfreef, FTYPE *CUf, FTYPE *CUimp, FTYPE dissmeasure, FTYPE *dUother, FTYPE(*dUcomp)[NPR])
 Ugeomfree and dUother are in UNOTHING form (or UEVOLVE without geometry) pf might be modified so better approximation to final update, so easier on Utoprimgen() to get inversion. More...
 
int primtoU (int returntype, FTYPE *p, struct of_state *q, struct of_geom *geom, FTYPE *U, FTYPE *Uabs)
 calculate "conserved" quantities More...
 
int ucon_calc_3vel (FTYPE *pr, struct of_geom *geom, FTYPE *ucon, FTYPE *others)
 find contravariant four-velocity int ucon_calc(FTYPE *pr, struct of_geom *geom, FTYPE *ucon, FTYPE *others) More...
 
int ucon_calc_rel4vel (FTYPE *pr, struct of_geom *geom, FTYPE *ucon, FTYPE *others)
 find contravariant four-velocity from the relative 4 velocity More...
 
int ucon_calc_4vel (FTYPE *pr, struct of_geom *geom, FTYPE *ucon, FTYPE *others)
 find contravariant time component of four-velocity from the 4velocity (3 terms) More...
 
int ucon_calc_4vel_bothut (FTYPE *pr, struct of_geom *geom, FTYPE *ucon, FTYPE *ucon2, FTYPE *others)
 find contravariant time component of four-velocity from the 4velocity (3 terms) More...
 
int ucon_calc_rel4vel_fromuconrel (FTYPE *uconrel, struct of_geom *geom, FTYPE *ucon, FTYPE *others)
 find u^ from {u}^ fill full 4-vector OPTMARK: Before storing , this was the most expensive function over the entire code [determined by avoiding inlining] More...
 
int gamma_calc_fromuconrel (FTYPE *uconrel, struct of_geom *geom, FTYPE *gamma, FTYPE *qsq)
 find gamma-factor wrt normal observer This function and qsq_calc() have about the same cache miss amount now More...
 
int uconrel (FTYPE *ucon, FTYPE *uconrel, struct of_geom *geom)
 find {u}^ from u^ only fill spatial parts so can feed in 3-vector More...
 
int ucon_calcother (FTYPE *pr, FTYPE *ucon, FTYPE *others)
 
void ucon_precalc (FTYPE *ucon, FTYPE *AA, FTYPE *BB, FTYPE *CC, FTYPE *discr)
 
int ucon_calc_whichvel (int whichvel, FTYPE *pr, struct of_geom *geom, FTYPE *ucon, FTYPE *others)
 
int bsq_calc (FTYPE *pr, struct of_geom *geom, FTYPE *b2)
 
int bsq_calc_fromq (FTYPE *pr, struct of_geom *geom, struct of_state *q, FTYPE *b2)
 
void b_calc (FTYPE *pr, FTYPE *ucon, FTYPE *b)
 
void bsq_calc_rel4vel_fromq (FTYPE *pr, struct of_geom *ptrgeom, struct of_state *q, FTYPE *bsq)
 
void get_allgeometry (int i, int j, int k, int loc, struct of_allgeom *allgeom, struct of_geom *geom)
 
int get_state (FTYPE *pr, struct of_geom *geom, struct of_state *q)
 find ucon, ucov, bcon, bcov from primitive variables when calling get_state, users of this function expect to get q->{ucon,ucov,bcon,bcov,pressure} More...
 
int get_state_norad_part1 (FTYPE *pr, struct of_geom *geom, struct of_state *q)
 find ucon, ucov, bcon, bcov from primitive variables when calling get_state, users of this function expect to get q->{ucon,ucov,bcon,bcov,pressure} More...
 
int get_state_norad_part2 (int needentropy, FTYPE *pr, struct of_geom *geom, struct of_state *q)
 find ucon, ucov, bcon, bcov from primitive variables when calling get_state, users of this function expect to get q->{ucon,ucov,bcon,bcov,pressure} More...
 
int get_state_radonly (FTYPE *pr, struct of_geom *geom, struct of_state *q)
 find ucon, ucov, bcon, bcov from primitive variables when calling get_state, users of this function expect to get q->{ucon,ucov,bcon,bcov,pressure} More...
 
int get_state_nofield (FTYPE *pr, struct of_geom *geom, struct of_state *q)
 all get_state() things except the field quantities More...
 
int get_stateforcheckinversion (FTYPE *pr, struct of_geom *geom, struct of_state *q)
 used to check inversion, which has consistent pressure used to get things as functions of instead of u in case of using jon's inversion More...
 
int get_state_uconucovonly (FTYPE *pr, struct of_geom *ptrgeom, struct of_state *q)
 Get only u^ and u_ assumine b^ and b_ not used. More...
 
int get_stateforsource (FTYPE *pr, struct of_geom *ptrgeom, struct of_state **q)
 wrapper for choosing to get state by computing it or from global array pointer assign (overrides the existing default assignment of the pointer address in the calling function, so assumes calling function only uses pointer form subsequently) More...
 
int get_stateforfluxcalc (int dimen, int isleftright, FTYPE *pr, struct of_geom *ptrgeom, struct of_state **qptr)
 wrapper for choosing to get state by computing it or from global array notice that ptrgeom->p inputted not used More...
 
int get_stateforinterpline (FTYPE *pr, struct of_geom *ptrgeom, struct of_state **qptr)
 wrapper for choosing to get state by computing it or from global array pointer assign (overrides the existing default assignment of the pointer address in the calling function, so assumes calling function only uses pointer form subsequently) More...
 
int get_stateforglobalwavespeeds (FTYPE *pr, struct of_geom *ptrgeom, struct of_state **qptr)
 wrapper for choosing to get state by computing it or from global array pointer assign (overrides the existing default assignment of the pointer address in the calling function, so assumes calling function only uses pointer form subsequently) More...
 
int primtoflux (int returntype, FTYPE *pa, struct of_state *q, int dir, struct of_geom *geom, FTYPE *fl, FTYPE *flabs)
 Calculate fluxes in direction dir and conserved variable U returntype==0 : flux with geometric factor geom->e (used by evolution code) returntype==1 : flux with physical geometry factor geom->gdet (used by diagnostics) see UtoU and source_conn() Note that if MAXWELL==PRIMMAXWELL then primtoflux doesn't use b^ or b_ (bcon and bcov) More...
 
int flux_compute_general (int i, int j, int k, int dir, struct of_geom *geom, FTYPE CUf, FTYPE *p_c, FTYPE *p_l, FTYPE *p_r, FTYPE *F, FTYPE *ctopall)
 actually compute the flux and ctop for dt calculation More...
 
int source (FTYPE *pi, FTYPE *pa, FTYPE *pf, int *didreturnpf, int *eomtype, struct of_geom *geom, struct of_state *q, FTYPE *Ui, FTYPE *Uf, FTYPE *CUf, FTYPE *CUimp, FTYPE dissmeasure, FTYPE *dUriemann, FTYPE(*Uacomp)[NPR], FTYPE *Ua)
 add in source terms to equations of motion ui and dUriemann in UEVOLVE form assume q(pr) so consistent, but p or ui don't yet account for dUriemann! More...
 
FTYPE taper_func (FTYPE R, FTYPE rin)
 
FTYPE lc4 (int updown, FTYPE detg, int mu, int nu, int kappa, int lambda)
 used Mathematica's MinimumChangePermutations and Signature updown = 0 : down updown = 1 : up More...
 
void faraday_calc (int which, FTYPE *b, FTYPE *u, struct of_geom *geom, FTYPE(*faraday)[NDIM])
 Compute faraday assumes b and u are inputted as bcov&ucov for F^{} and bcon&ucon for F_{}. More...
 

Detailed Description

Function declarations for global use of things in phys.c.

Definition in file phys.funcdeclare.h.

Macro Definition Documentation

#define bsq_calc   bsq_calc_general

Definition at line 28 of file phys.funcdeclare.h.

#define bsq_calc_fromq   bsq_calc_fromq_general

Definition at line 29 of file phys.funcdeclare.h.

#define compute_1plusud0   compute_1plusud0_general

Definition at line 27 of file phys.funcdeclare.h.

#define dudp_calc   dudp_calc_gen

Definition at line 26 of file phys.funcdeclare.h.

#define get_geometry (   ii,
  jj,
  kk,
  pp,
  ptrgeom 
)    get_geometry_old(ii,jj,kk,pp,ptrgeom)

Definition at line 117 of file phys.funcdeclare.h.

#define get_geometry_gdetmix (   ii,
  jj,
  kk,
  pp,
  ptrgeom 
)    get_geometry_old(ii,jj,kk,pp,ptrgeom)

Definition at line 118 of file phys.funcdeclare.h.

#define get_geometry_gdetonly (   ii,
  jj,
  kk,
  pp,
  ptrgeom 
)    get_geometry_gdetonly_old(ii,jj,kk,pp,ptrgeom)

Definition at line 119 of file phys.funcdeclare.h.

#define get_geometry_geomeonly (   ii,
  jj,
  kk,
  pp,
  ptrgeom 
)    get_geometry_geomeonly_old(ii,jj,kk,pp,ptrgeom)

Definition at line 120 of file phys.funcdeclare.h.

#define set_igdet (   arg)    set_igdet_old(arg)

Definition at line 121 of file phys.funcdeclare.h.

#define set_igdetsimple (   arg)    set_igdetsimple_old(arg)

Definition at line 122 of file phys.funcdeclare.h.

#define ucon_calc   ucon_calc_4vel

Definition at line 25 of file phys.funcdeclare.h.

Function Documentation

void b_calc ( FTYPE pr,
FTYPE ucon,
FTYPE b 
)
int bsq_calc ( FTYPE pr,
struct of_geom geom,
FTYPE b2 
)

Here is the caller graph for this function:

int bsq_calc_fromq ( FTYPE pr,
struct of_geom geom,
struct of_state q,
FTYPE b2 
)

Here is the caller graph for this function:

void bsq_calc_rel4vel_fromq ( FTYPE pr,
struct of_geom ptrgeom,
struct of_state q,
FTYPE bsq 
)
void faraday_calc ( int  which,
FTYPE b,
FTYPE u,
struct of_geom geom,
FTYPE(*)  faraday[NDIM] 
)

Compute faraday assumes b and u are inputted as bcov&ucov for F^{} and bcon&ucon for F_{}.

Definition at line 2895 of file phys.tools.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int flux_compute_general ( int  i,
int  j,
int  k,
int  dir,
struct of_geom ptrgeom,
FTYPE  CUf,
FTYPE p_c,
FTYPE p_l,
FTYPE p_r,
FTYPE F,
FTYPE ctopallptr 
)

actually compute the flux and ctop for dt calculation

actually compute flux from given data

Definition at line 25 of file fluxcompute.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int gamma_calc_fromuconrel ( FTYPE uconrel,
struct of_geom geom,
FTYPE gamma,
FTYPE qsq 
)

find gamma-factor wrt normal observer This function and qsq_calc() have about the same cache miss amount now

Definition at line 2473 of file phys.tools.c.

Here is the caller graph for this function:

void get_allgeometry ( int  i,
int  j,
int  k,
int  loc,
struct of_allgeom allgeom,
struct of_geom geom 
)

Definition at line 422 of file phys.c.

Here is the call graph for this function:

int get_state ( FTYPE pr,
struct of_geom geom,
struct of_state q 
)

find ucon, ucov, bcon, bcov from primitive variables when calling get_state, users of this function expect to get q->{ucon,ucov,bcon,bcov,pressure}

Definition at line 1861 of file phys.tools.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int get_state_nofield ( FTYPE pr,
struct of_geom geom,
struct of_state q 
)

all get_state() things except the field quantities

Definition at line 1932 of file phys.tools.c.

Here is the call graph for this function:

int get_state_norad_part1 ( FTYPE pr,
struct of_geom geom,
struct of_state q 
)

find ucon, ucov, bcon, bcov from primitive variables when calling get_state, users of this function expect to get q->{ucon,ucov,bcon,bcov,pressure}

Definition at line 1901 of file phys.tools.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int get_state_norad_part2 ( int  needentropy,
FTYPE pr,
struct of_geom geom,
struct of_state q 
)

find ucon, ucov, bcon, bcov from primitive variables when calling get_state, users of this function expect to get q->{ucon,ucov,bcon,bcov,pressure}

Definition at line 1919 of file phys.tools.c.

Here is the caller graph for this function:

int get_state_radonly ( FTYPE pr,
struct of_geom geom,
struct of_state q 
)

find ucon, ucov, bcon, bcov from primitive variables when calling get_state, users of this function expect to get q->{ucon,ucov,bcon,bcov,pressure}

Definition at line 1888 of file phys.tools.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int get_state_uconucovonly ( FTYPE pr,
struct of_geom ptrgeom,
struct of_state q 
)

Get only u^ and u_ assumine b^ and b_ not used.

Definition at line 2205 of file phys.tools.c.

Here is the caller graph for this function:

int get_stateforcheckinversion ( FTYPE pr,
struct of_geom geom,
struct of_state q 
)

used to check inversion, which has consistent pressure used to get things as functions of instead of u in case of using jon's inversion

Definition at line 1952 of file phys.tools.c.

Here is the call graph for this function:

int get_stateforfluxcalc ( int  dimen,
int  isleftright,
FTYPE pr,
struct of_geom ptrgeom,
struct of_state **  qptr 
)

wrapper for choosing to get state by computing it or from global array notice that ptrgeom->p inputted not used

Definition at line 27 of file phys.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int get_stateforglobalwavespeeds ( FTYPE pr,
struct of_geom ptrgeom,
struct of_state **  qptr 
)

wrapper for choosing to get state by computing it or from global array pointer assign (overrides the existing default assignment of the pointer address in the calling function, so assumes calling function only uses pointer form subsequently)

Definition at line 110 of file phys.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int get_stateforinterpline ( FTYPE pr,
struct of_geom ptrgeom,
struct of_state **  qptr 
)

wrapper for choosing to get state by computing it or from global array pointer assign (overrides the existing default assignment of the pointer address in the calling function, so assumes calling function only uses pointer form subsequently)

Definition at line 82 of file phys.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int get_stateforsource ( FTYPE pr,
struct of_geom ptrgeom,
struct of_state **  q 
)

wrapper for choosing to get state by computing it or from global array pointer assign (overrides the existing default assignment of the pointer address in the calling function, so assumes calling function only uses pointer form subsequently)

Definition at line 57 of file phys.c.

Here is the call graph for this function:

Here is the caller graph for this function:

FTYPE lc4 ( int  updown,
FTYPE  detg,
int  mu,
int  nu,
int  kappa,
int  lambda 
)

used Mathematica's MinimumChangePermutations and Signature updown = 0 : down updown = 1 : up

Definition at line 2873 of file phys.tools.c.

Here is the caller graph for this function:

int primtoflux ( int  returntype,
FTYPE pa,
struct of_state q,
int  dir,
struct of_geom geom,
FTYPE fl,
FTYPE flabs 
)

Calculate fluxes in direction dir and conserved variable U returntype==0 : flux with geometric factor geom->e (used by evolution code) returntype==1 : flux with physical geometry factor geom->gdet (used by diagnostics) see UtoU and source_conn() Note that if MAXWELL==PRIMMAXWELL then primtoflux doesn't use b^ or b_ (bcon and bcov)

Definition at line 33 of file phys.tools.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int primtoU ( int  returntype,
FTYPE p,
struct of_state q,
struct of_geom geom,
FTYPE U,
FTYPE Uabs 
)

calculate "conserved" quantities

Definition at line 728 of file phys.tools.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int source ( FTYPE pi,
FTYPE pa,
FTYPE pf,
int *  didreturnpf,
int *  eomtype,
struct of_geom geom,
struct of_state q,
FTYPE Ui,
FTYPE Uf,
FTYPE CUf,
FTYPE CUimp,
FTYPE  dissmeasure,
FTYPE dUriemann,
FTYPE(*)  Uacomp[NPR],
FTYPE Ua 
)

add in source terms to equations of motion ui and dUriemann in UEVOLVE form assume q(pr) so consistent, but p or ui don't yet account for dUriemann!

Definition at line 1619 of file phys.tools.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int sourcephysics ( FTYPE pi,
FTYPE pr,
FTYPE pf,
int *  didreturnpf,
int *  eomtype,
struct of_geom ptrgeom,
struct of_state q,
FTYPE Ugeomfreei,
FTYPE Ugeomfreef,
FTYPE CUf,
FTYPE CUimp,
FTYPE  dissmeasure,
FTYPE dUother,
FTYPE(*)  dUcomp[NPR] 
)

Ugeomfree and dUother are in UNOTHING form (or UEVOLVE without geometry) pf might be modified so better approximation to final update, so easier on Utoprimgen() to get inversion.

Definition at line 14 of file sources.c.

Here is the call graph for this function:

Here is the caller graph for this function:

FTYPE taper_func ( FTYPE  R,
FTYPE  rin 
)

Definition at line 2856 of file phys.tools.c.

int ucon_calc_3vel ( FTYPE pr,
struct of_geom geom,
FTYPE ucon,
FTYPE others 
)

find contravariant four-velocity int ucon_calc(FTYPE *pr, struct of_geom *geom, FTYPE *ucon, FTYPE *others)

Definition at line 2544 of file phys.tools.c.

Here is the caller graph for this function:

int ucon_calc_4vel ( FTYPE pr,
struct of_geom geom,
FTYPE ucon,
FTYPE others 
)

find contravariant time component of four-velocity from the 4velocity (3 terms)

Definition at line 2772 of file phys.tools.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int ucon_calc_4vel_bothut ( FTYPE pr,
struct of_geom geom,
FTYPE ucon,
FTYPE ucon2,
FTYPE others 
)

find contravariant time component of four-velocity from the 4velocity (3 terms)

Definition at line 2724 of file phys.tools.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int ucon_calc_rel4vel ( FTYPE pr,
struct of_geom geom,
FTYPE ucon,
FTYPE others 
)

find contravariant four-velocity from the relative 4 velocity

Definition at line 2401 of file phys.tools.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int ucon_calc_rel4vel_fromuconrel ( FTYPE uconrel,
struct of_geom geom,
FTYPE ucon,
FTYPE others 
)

find u^ from {u}^ fill full 4-vector OPTMARK: Before storing , this was the most expensive function over the entire code [determined by avoiding inlining]

Definition at line 2360 of file phys.tools.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int ucon_calc_whichvel ( int  whichvel,
FTYPE pr,
struct of_geom geom,
FTYPE ucon,
FTYPE others 
)

Definition at line 2422 of file phys.tools.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int ucon_calcother ( FTYPE pr,
FTYPE ucon,
FTYPE others 
)
void ucon_precalc ( FTYPE ucon,
FTYPE AA,
FTYPE BB,
FTYPE CC,
FTYPE discr 
)
int uconrel ( FTYPE ucon,
FTYPE uconrel,
struct of_geom geom 
)

find {u}^ from u^ only fill spatial parts so can feed in 3-vector

Definition at line 2387 of file phys.tools.c.

Here is the caller graph for this function: