Coordinate and frame transformation functions. More...
#include "decs.h"
Go to the source code of this file.
Macros | |
#define | bl2ks_trans00 (1) |
#define | bl2ks_trans01 (2.*r/(r*r - 2.*r + a*a)) |
#define | bl2ks_trans02 (0) |
#define | bl2ks_trans03 (0) |
#define | bl2ks_trans10 (0) |
#define | bl2ks_trans11 (1) |
#define | bl2ks_trans12 (0) |
#define | bl2ks_trans13 (0) |
#define | bl2ks_trans20 (0) |
#define | bl2ks_trans21 (0) |
#define | bl2ks_trans22 (1) |
#define | bl2ks_trans23 (0) |
#define | bl2ks_trans30 (0) |
#define | bl2ks_trans31 (a/(r*r - 2.*r + a*a)) |
#define | bl2ks_trans32 (0) |
#define | bl2ks_trans33 (1) |
#define | ks2bl_trans00 (1) |
#define | ks2bl_trans01 (-2.*r/(r*r - 2.*r + a*a)) |
#define | ks2bl_trans02 (0) |
#define | ks2bl_trans03 (0) |
#define | ks2bl_trans10 (0) |
#define | ks2bl_trans11 (1) |
#define | ks2bl_trans12 (0) |
#define | ks2bl_trans13 (0) |
#define | ks2bl_trans20 (0) |
#define | ks2bl_trans21 (0) |
#define | ks2bl_trans22 (1) |
#define | ks2bl_trans23 (0) |
#define | ks2bl_trans30 (0) |
#define | ks2bl_trans31 (-a/(r*r - 2.*r + a*a)) |
#define | ks2bl_trans32 (0) |
#define | ks2bl_trans33 (1) |
#define | NORMALDENSITY 0 |
#define | LOGDENSITY 1 |
#define | DENSITYTYPE LOGDENSITY |
Functions | |
int | bl2met2metp2v (int whichvel, int whichcoord, FTYPE *pr, int ii, int jj, int kk) |
assumes all centered quantities (so for FLUXB==FLUXCTSTAG assumes operates on centered field versions) More... | |
int | bl2met2metp2v_genloc (int whichvel, int whichcoord, FTYPE *pr, int ii, int jj, int kk, int loc) |
converts whichvel/whichcoord velocity to WHICHVEL/(->MCOORD->PRIMECOORDS) converts field too More... | |
int | bl2met2metp2v_genloc_fieldonly (int whichvel, int whichcoord, FTYPE *pr, int ii, int jj, int kk, int loc) |
converts field only and otherwise like normal function More... | |
int | ucov_whichcoord2primecoords (int whichcoord, int ii, int jj, int kk, int loc, FTYPE *ucov) |
converts u_ in whichcoord to PRIMECOORDS More... | |
int | bl2met2metp2v_gen (int whichvel, int whichcoord, int newwhichvel, int newwhichcoord, FTYPE *pr, int ii, int jj, int kk) |
converts whichvel/whichcoord velocity to WHICHVEL/MCOORD More... | |
int | metp2met2bl (int whichvel, int whichcoord, FTYPE *pr, int ii, int jj, int kk) |
transform MCOORD prime primitive velocity to whichcoord whichvel velocity (also converts field) More... | |
int | metp2met2bl_genloc (int whichvel, int whichcoord, FTYPE *pr, int ii, int jj, int kk, int pos) |
transform MCOORD prime primitive velocity to whichcoord whichvel velocity (also converts field) More... | |
int | coordtrans (int whichcoordin, int whichcoordout, int ii, int jj, int kk, int loc, FTYPE *ucon) |
whichcoordin -> whichcoordout More... | |
void | bltoks_trans (int ii, int jj, int kk, int loc, FTYPE(*bl2ks)[NDIM]) |
void | bltoks (int ii, int jj, int kk, int loc, FTYPE *ucon) |
void | bltoks_ucov (int ii, int jj, int kk, int loc, FTYPE *ucov) |
void | kstobl_trans (int ii, int jj, int kk, int loc, FTYPE(*ks2bl)[NDIM]) |
void | kstobl (int ii, int jj, int kk, int loc, FTYPE *ucon) |
void | transV2Vmetric (int whichcoord, int ii, int jj, int kk, int loc, FTYPE ROTANGLE, FTYPE *X, FTYPE *V, FTYPE *Xmetric, FTYPE *Vmetric, FTYPE *gcov, FTYPE *gcovpert) |
transformation of metric written in V[X]-type coordinates with dV differentials to one written in Vmetric old/original coordinates with dVmetric original/old differentials More... | |
void | transVmetrictoV (int whichcoord, int ii, int jj, int kk, int loc, FTYPE ROTANGLE, FTYPE *X, FTYPE *V, FTYPE *Xmetric, FTYPE *Vmetric, FTYPE *gcov, FTYPE *gcovpert) |
transformation of metric written in Vmetric-type coordinates with dVmetric differentials to one written in V[X] coordinates with dVdifferentials More... | |
void | transVmetrictoV_ucov (FTYPE ROTANGLE, FTYPE *Vmetric, FTYPE *ucov) |
Transform u_ from Vmetric form (where z-axis is BH spin axis) to V form [tilted BH spin axis]. More... | |
void | transVmetrictoV_trans (FTYPE ROTANGLE, FTYPE *Vmetric, FTYPE(*trans)[NDIM]) |
transformation of metric written in Vmetric-type coordinates with dVmetric differentials to one written in V[X] coordinates with dVdifferentials More... | |
void | mettometp (int ii, int jj, int kk, FTYPE *ucon) |
void | mettometp_genloc (int ii, int jj, int kk, int loc, FTYPE *ucon) |
MCOORD -> prime MCOORD. More... | |
void | metptomet (int ii, int jj, int kk, FTYPE *ucon) |
void | metptomet_genloc (int ii, int jj, int kk, int loc, FTYPE *ucon) |
prime MCOORD -> MCOORD for u^ More... | |
void | metptomet_Tud (int ii, int jj, int kk, FTYPE(*Tud)[NDIM]) |
prime MCOORD -> MCOORD for T^ More... | |
void | metptomet_simple_Tud (FTYPE(*dxdxp)[NDIM], FTYPE(*idxdxp)[NDIM], FTYPE(*Tud)[NDIM]) |
prime MCOORD -> MCOORD feed in coordinate dependent quantities instead of computing them useful when wanting to speep up calculation when calling function needs dxdxp and/or idxdxp More... | |
int | vcon2pr (int whichvel, FTYPE *vcon, struct of_geom *geom, FTYPE *pr) |
convert 3-velocity to whichvel velocity More... | |
void | density2pr (FTYPE *density, FTYPE *pr) |
make sure both of these are setup so density could be same memory location as pr More... | |
void | pr2density (FTYPE *pr, FTYPE *density) |
note that we have to have inverses for this to work in general, numerical inverses probably bad idea? More... | |
Coordinate and frame transformation functions.
Definition in file transforms.c.
#define bl2ks_trans00 (1) |
#define bl2ks_trans02 (0) |
#define bl2ks_trans03 (0) |
#define bl2ks_trans10 (0) |
#define bl2ks_trans11 (1) |
#define bl2ks_trans12 (0) |
#define bl2ks_trans13 (0) |
#define bl2ks_trans20 (0) |
#define bl2ks_trans21 (0) |
#define bl2ks_trans22 (1) |
#define bl2ks_trans23 (0) |
#define bl2ks_trans30 (0) |
#define bl2ks_trans32 (0) |
#define bl2ks_trans33 (1) |
#define DENSITYTYPE LOGDENSITY |
Definition at line 1001 of file transforms.c.
#define ks2bl_trans00 (1) |
#define ks2bl_trans02 (0) |
#define ks2bl_trans03 (0) |
#define ks2bl_trans10 (0) |
#define ks2bl_trans11 (1) |
#define ks2bl_trans12 (0) |
#define ks2bl_trans13 (0) |
#define ks2bl_trans20 (0) |
#define ks2bl_trans21 (0) |
#define ks2bl_trans22 (1) |
#define ks2bl_trans23 (0) |
#define ks2bl_trans30 (0) |
#define ks2bl_trans32 (0) |
#define ks2bl_trans33 (1) |
#define LOGDENSITY 1 |
Definition at line 999 of file transforms.c.
#define NORMALDENSITY 0 |
Definition at line 998 of file transforms.c.
int bl2met2metp2v | ( | int | whichvel, |
int | whichcoord, | ||
FTYPE * | pr, | ||
int | ii, | ||
int | jj, | ||
int | kk | ||
) |
assumes all centered quantities (so for FLUXB==FLUXCTSTAG assumes operates on centered field versions)
Definition at line 17 of file transforms.c.
int bl2met2metp2v_gen | ( | int | whichvel, |
int | whichcoord, | ||
int | newwhichvel, | ||
int | newwhichcoord, | ||
FTYPE * | pr, | ||
int | ii, | ||
int | jj, | ||
int | kk | ||
) |
converts whichvel/whichcoord velocity to WHICHVEL/MCOORD
Definition at line 189 of file transforms.c.
int bl2met2metp2v_genloc | ( | int | whichvel, |
int | whichcoord, | ||
FTYPE * | pr, | ||
int | ii, | ||
int | jj, | ||
int | kk, | ||
int | loc | ||
) |
converts whichvel/whichcoord velocity to WHICHVEL/(->MCOORD->PRIMECOORDS) converts field too
Definition at line 30 of file transforms.c.
int bl2met2metp2v_genloc_fieldonly | ( | int | whichvel, |
int | whichcoord, | ||
FTYPE * | pr, | ||
int | ii, | ||
int | jj, | ||
int | kk, | ||
int | loc | ||
) |
converts field only and otherwise like normal function
Definition at line 102 of file transforms.c.
void bltoks | ( | int | ii, |
int | jj, | ||
int | kk, | ||
int | loc, | ||
FTYPE * | ucon | ||
) |
Definition at line 427 of file transforms.c.
void bltoks_trans | ( | int | ii, |
int | jj, | ||
int | kk, | ||
int | loc, | ||
FTYPE(*) | bl2ks[NDIM] | ||
) |
Definition at line 368 of file transforms.c.
void bltoks_ucov | ( | int | ii, |
int | jj, | ||
int | kk, | ||
int | loc, | ||
FTYPE * | ucov | ||
) |
Definition at line 448 of file transforms.c.
int coordtrans | ( | int | whichcoordin, |
int | whichcoordout, | ||
int | ii, | ||
int | jj, | ||
int | kk, | ||
int | loc, | ||
FTYPE * | ucon | ||
) |
whichcoordin -> whichcoordout
Definition at line 346 of file transforms.c.
make sure both of these are setup so density could be same memory location as pr
Definition at line 1005 of file transforms.c.
void kstobl | ( | int | ii, |
int | jj, | ||
int | kk, | ||
int | loc, | ||
FTYPE * | ucon | ||
) |
Definition at line 529 of file transforms.c.
void kstobl_trans | ( | int | ii, |
int | jj, | ||
int | kk, | ||
int | loc, | ||
FTYPE(*) | ks2bl[NDIM] | ||
) |
Definition at line 470 of file transforms.c.
int metp2met2bl | ( | int | whichvel, |
int | whichcoord, | ||
FTYPE * | pr, | ||
int | ii, | ||
int | jj, | ||
int | kk | ||
) |
transform MCOORD prime primitive velocity to whichcoord whichvel velocity (also converts field)
Definition at line 258 of file transforms.c.
int metp2met2bl_genloc | ( | int | whichvel, |
int | whichcoord, | ||
FTYPE * | pr, | ||
int | ii, | ||
int | jj, | ||
int | kk, | ||
int | pos | ||
) |
transform MCOORD prime primitive velocity to whichcoord whichvel velocity (also converts field)
Definition at line 269 of file transforms.c.
void metptomet | ( | int | ii, |
int | jj, | ||
int | kk, | ||
FTYPE * | ucon | ||
) |
Definition at line 833 of file transforms.c.
void metptomet_genloc | ( | int | ii, |
int | jj, | ||
int | kk, | ||
int | loc, | ||
FTYPE * | ucon | ||
) |
prime MCOORD -> MCOORD for u^
Definition at line 843 of file transforms.c.
prime MCOORD -> MCOORD feed in coordinate dependent quantities instead of computing them useful when wanting to speep up calculation when calling function needs dxdxp and/or idxdxp
Definition at line 914 of file transforms.c.
void metptomet_Tud | ( | int | ii, |
int | jj, | ||
int | kk, | ||
FTYPE(*) | Tud[NDIM] | ||
) |
prime MCOORD -> MCOORD for T^
Definition at line 890 of file transforms.c.
void mettometp | ( | int | ii, |
int | jj, | ||
int | kk, | ||
FTYPE * | ucon | ||
) |
Definition at line 762 of file transforms.c.
void mettometp_genloc | ( | int | ii, |
int | jj, | ||
int | kk, | ||
int | loc, | ||
FTYPE * | ucon | ||
) |
MCOORD -> prime MCOORD.
Definition at line 772 of file transforms.c.
note that we have to have inverses for this to work in general, numerical inverses probably bad idea?
Definition at line 1019 of file transforms.c.
void transV2Vmetric | ( | int | whichcoord, |
int | ii, | ||
int | jj, | ||
int | kk, | ||
int | loc, | ||
FTYPE | ROTANGLE, | ||
FTYPE * | X, | ||
FTYPE * | V, | ||
FTYPE * | Xmetric, | ||
FTYPE * | Vmetric, | ||
FTYPE * | gcov, | ||
FTYPE * | gcovpert | ||
) |
transformation of metric written in V[X]-type coordinates with dV differentials to one written in Vmetric old/original coordinates with dVmetric original/old differentials
This is not used in metric.c to rotate metric This would only be used to transform V[X] metric to old/original Vmetric=rold,hold,phold
Definition at line 554 of file transforms.c.
void transVmetrictoV | ( | int | whichcoord, |
int | ii, | ||
int | jj, | ||
int | kk, | ||
int | loc, | ||
FTYPE | ROTANGLE, | ||
FTYPE * | X, | ||
FTYPE * | V, | ||
FTYPE * | Xmetric, | ||
FTYPE * | Vmetric, | ||
FTYPE * | gcov, | ||
FTYPE * | gcovpert | ||
) |
transformation of metric written in Vmetric-type coordinates with dVmetric differentials to one written in V[X] coordinates with dVdifferentials
This is what's used to take original metric from set_gcov and get the one with new differentials based upon V[X]
Definition at line 616 of file transforms.c.
transformation of metric written in Vmetric-type coordinates with dVmetric differentials to one written in V[X] coordinates with dVdifferentials
This is what's used to take original metric from set_gcov and get the one with new differentials based upon V[X] Generate trans[mu][nu] = T^mu[Vmetric]_nu[V] Such that g_{mup nup} = g_{mu nu} T^mu_mup T^nu_nup
Definition at line 683 of file transforms.c.
Transform u_ from Vmetric form (where z-axis is BH spin axis) to V form [tilted BH spin axis].
Definition at line 649 of file transforms.c.
int ucov_whichcoord2primecoords | ( | int | whichcoord, |
int | ii, | ||
int | jj, | ||
int | kk, | ||
int | loc, | ||
FTYPE * | ucov | ||
) |
converts u_ in whichcoord to PRIMECOORDS
Definition at line 153 of file transforms.c.
convert 3-velocity to whichvel velocity
Definition at line 950 of file transforms.c.