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

Function delcarations for global use of functions in metric.c. More...

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

Go to the source code of this file.

Functions

int metric_checks (struct of_geom *ptrgeom)
 
void conn_func (int whichcoord, FTYPE *X, struct of_geom *geom, FTYPE(*lconn)[NDIM][NDIM], FTYPE *conn2)
 connection not simply transformed – so compute directly from final metric (primcoords) More...
 
void gcov_func (struct of_geom *ptrgeom, int getprim, int whichcoord, FTYPE *X, FTYPE *gcovinfunc, FTYPE *gcovpertinfunc)
 obtain gcov in primcoords of whichcoord type metric/coords here ptrgeom is only expected to contain i,j,k,p location More...
 
void gcon_func (struct of_geom *ptrgeom, int getprim, int whichcoord, FTYPE *X, FTYPE *gcov, FTYPE *gcon)
 obtain prim gcon in primcoords of whichcoord type metric/coords More...
 
int rotate_VtoVmetric (int whichcoord, FTYPE ROTANGLE, FTYPE *V, FTYPE *Vmetric)
 Rotate V[X] (r,thnew,phnew as in bl_coord) to Vmetric (r,th,ph as in set_gcov) That is, when using rotated metric, we assume metric itself still has Vmetric=r,th,ph, while X is mapped to V=rnew,hnew,phnew. More...
 
int rotate_VmetrictoV (int whichcoord, FTYPE ROTANGLE, FTYPE *Vmetric, FTYPE *V)
 perform rotation of V (for spherical polar coordinates) More...
 

Detailed Description

Function delcarations for global use of functions in metric.c.

Definition in file metric.funcdeclare.h.

Function Documentation

void conn_func ( int  whichcoord,
FTYPE X,
struct of_geom geom,
FTYPE(*)  lconn[NDIM][NDIM],
FTYPE conn2 
)

connection not simply transformed – so compute directly from final metric (primcoords)

Definition at line 744 of file metric.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void gcon_func ( struct of_geom ptrgeom,
int  getprim,
int  whichcoord,
FTYPE X,
FTYPE gcov,
FTYPE gcon 
)

obtain prim gcon in primcoords of whichcoord type metric/coords

Definition at line 678 of file metric.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void gcov_func ( struct of_geom ptrgeom,
int  getprim,
int  whichcoord,
FTYPE X,
FTYPE gcovinfunc,
FTYPE gcovpertinfunc 
)

obtain gcov in primcoords of whichcoord type metric/coords here ptrgeom is only expected to contain i,j,k,p location

Definition at line 24 of file metric.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int metric_checks ( struct of_geom ptrgeom)

Definition at line 2616 of file metric.tools.c.

Here is the caller graph for this function:

int rotate_VmetrictoV ( int  whichcoord,
FTYPE  ROTANGLE,
FTYPE Vmetric,
FTYPE V 
)

perform rotation of V (for spherical polar coordinates)

This takes input of V=(t,r,h,ph) and gives back Vmetric=(t,r,hnew,phnew) where h,ph are in original metric form and hnew,phnew are rotated versions

So since we want X->V to be mapping V=(t,r,hnew,phnew), this is not to be used.


This can be used in (e.g.) init.py to have python script take data (in Vnew=V) and obtain Vmetric version

1) transVtoVmetric(gcovnew) gives gcov[original metric] 2) transVtoVmetric(ucon,bcon,ucov,bcov) or transVmetrictoV(ucon,bcon,ucov,bcov) 3) Rotate actual spatial positions of data, including metrics, so that again axisymmetric so only have to store 1 phi slice!

Definition at line 485 of file metric.c.

int rotate_VtoVmetric ( int  whichcoord,
FTYPE  ROTANGLE,
FTYPE V,
FTYPE Vmetric 
)

Rotate V[X] (r,thnew,phnew as in bl_coord) to Vmetric (r,th,ph as in set_gcov) That is, when using rotated metric, we assume metric itself still has Vmetric=r,th,ph, while X is mapped to V=rnew,hnew,phnew.

So input to set_gcov(X,V) needs to then get V->Vmetric before getting gcov(Vmetric). So real spherical polar coordinates for grid itself is V=rnew,hnew,phnew.

Use this rather than direct transformation(rnew,hnew,phnew) because that expression becomes too complicated in mathematica. So just take 3 steps: 1) gcov_func(X,V) 2) rotate_VtoVmetric(V,Vmetric) 3) set_gcov...(Vmetric) 4) transVmetrictoV(gcov) (which internally uses rotate_VtoVmetric() to keep expressions simple (i.e. kept in terms of Vmetric)

#2 just accounts for Vmetric[V[X]] as far as assignment of metric values so that X[] grid has used correct values of old/metric r,h,ph #4 accounts for differentials in metric so that ds^2 is the same. This is written in terms of V=rnew,hnew,phnew, so can just feed-in V[X].

Definition at line 378 of file metric.c.

Here is the caller graph for this function: