COSMOS API FMV0 - cmyoo/cosmos GitHub Wiki
COSMOS :: Class description on Fmv0
- This class defines the structure of variables in the three dimensional box.
Fmv0 :: Variables
general parameters and variables
| type | name | description |
|---|---|---|
| bool | fluidevo | on/off switch for fluid evolution |
| bool | scalarevo | on/off switch for scalar evolution |
| bool | curveval | on/off switch for curvature evaluation |
| bool | hform | horizon formation flag |
| bool | exc | excision flag |
| bool | mrf | mesh refinement flag |
| short int* | rotsign | sign for y=0 boundary rotation |
| short int* | refsign | sign for reflection boundary |
| int | tab | tab for refinement boundary |
| int | jmax,jmin | maximum/minimum number of grid points for $x$ |
| int | kmax,kmin | maximum/minimum number of grid points for $y$ |
| int | lmax,lmin | maximum/minimum number of grid points for $z$ |
| int | jui,jli | maximum/minimum grid number to evolve for $x$ |
| int | kui,kli | maximum/minimum grid number to evolve for $y$ |
| int | lui,lli | maximum/minimum grid number to evolve for $z$ |
| int | nx,ny,nz | number of grid points for $x,y,z$ |
| int | nn,nc,nv | number of variables, constraints and outputs |
| int | nt | number of energy momentum tensor |
| int | npr | number of primitive variables of fluids |
| int | nsc,nscp | number for scalar field and its momentum |
| int | jhm,khm,lhm | grid point of max Hamiltonian constraint violation |
| int | jmm,kmm,lmm | grid point of max Momentum constraint violation |
| int | jkm,kkm,lkm | grid point of max Kretchmann invariant |
| int | jwm,kwm,lwm | grid point of max Weyl invariant |
| int | ipolo | order of interpolation |
| int | exg | excision grid number |
| int | layn | layer number |
| int | jjmin | minimum j for constraint check |
| int | kkmin | minimum k for constraint check |
| int | llmin | minimum l for constraint check |
| int | jjmax | maximum j for constraint check |
| int | kkmax | maximum k for constraint check |
| int | llmax | maximum l for constraint check |
| double | xu,xl | maximum/minimum of coordinate length for $x$ |
| double | yu,yl | maximum/minimum of coordinate length for $y$ |
| double | zu,zl | maximum/minimum of coordinate length for $z$ |
| double | dx,dy,dz,dvol | grid intervals $(x,y,z)$ and volume element |
| double | dxi,dyi,dzi | inverse of grid intervals for $(x,y,z)$ |
| double | dxi2,dyi2,dzi2 | dx/2 for convenience $(x,y,z)$ |
| double | dxi4,dyi4,dzi4 | dx/4 for convenience $(x,y,z)$ |
| double | dxi12,dyi12,dzi12 | dx/12 for convenience $(x,y,z)$ |
| double | dxi24,dyi24,dzi24 | dx/24 for convenience $(x,y,z)$ |
| double | t,dt,dt0,dtp,dtpp | time and its intervals dtp:previous dtpp:one before previous |
| double | tmax | maximum time |
| double | cfl | CFL condition |
| double | etaa,etab,etabb | gauge parameters |
| double | KOep | Kreiss-Oliger dissipation coefficient |
| double | amp | amplitude of inhomogeneous grid |
| double | lambda | cosmological constant |
| double | pi2,pi4,pi8,pi16 | $2\pi$, $4\pi$, $8\pi$, $16\pi$ |
constraints and curvature invariants
| type | name | description |
|---|---|---|
| double | ham,hammax,mom,mommax | values of constraint violation |
| double | dGam | deviation of Gamma: constraint |
| double | dGammax | deviation of Gamma: constraint |
| double | Kremax | value of max Kretchmann invariant |
| double | Weylmax | value of max Weyl invariant |
fluid parameters
| type | name | description |
|---|---|---|
| double | kap_MUSCL,b_minmod | parameters for MUSCL interpolation |
| double | fluidw | parameter for fluid EOS |
scalar field parameters
| type | name | description |
|---|---|---|
| double | scalarm | mass parameter for scalar field |
parameters for initial data and settings
| type | name | description |
|---|---|---|
| double | Hb | initial Hubble |
| double | tini | initial time |
| double | tk2 | initial trK^2 |
| double | dtk | dtrk/dt for maximal slice |
| double | boxL | boxsize |
coordinates and buffers
| type | name | description |
|---|---|---|
| int* | ju,jl | from innermost grid to outermost buffer grid for $x$ |
| int* | ku,kl | from innermost grid to outermost buffer grid for $y$ |
| int* | lu,ll | from innermost grid to outermost buffer grid for $z$ |
| double* | x | coordinate $x$ |
| double* | y | coordinate $y$ |
| double* | z | coordinate $z$ |
boundary flags
| type | name | description |
|---|---|---|
| int*** | bflag | flag used for excsion |
| int*** | hflag | horizon flag |
| int*** | fmrflag | flag for the existence of higher layer |
dynamical variables
- Dynamical variables are basically defined as four dimensional arrays, which the last three indeces are used for the three dimensional grid whereas the first index is for various variables like metric components. The corresponding number of the first index is as follows.
| type | name | description |
|---|---|---|
| double**** | bv | variables (GAUGE,BSSN,fluid,[scalar]) |
| double**** | dbv | fluxes (GAUGE,BSSN,fluid,[scalar]) |
| double**** | bv0 | variables at previous step |
| double**** | bv1 | variables at two steps before |
| double**** | bvr | variables (for Runge-Kutta integration) |
- Gauge
| index | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|---|
| variable | $\alpha$ | $\beta^x$ | $\beta^y$ | $\beta^z$ | $B^x$ | $B^y$ | $B^z$ |
- Metric
| index | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
|---|---|---|---|---|---|---|---|
| variable | $\gamma_{xx}$ | $\gamma_{yy}$ | $\gamma_{zz}$ | $\gamma_{xy}$ | $\gamma_{xz}$ | $\gamma_{yz}$ | $\psi$ |
- Extrinsic Curvature
| index | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
|---|---|---|---|---|---|---|---|
| index | $\tilde{A}_{xx}$ | $\tilde{A}_{yy}$ | $\tilde{A}_{zz}$ | $\tilde{A}_{xy}$ | $\tilde{A}_{xz}$ | $\tilde{A}_{yz}$ | $K$ |
- Auxiliary variable $\tilde{\Gamma}^i$
| index | 21 | 22 | 23 |
|---|---|---|---|
| variable | $\tilde{\Gamma}^x$ | $\tilde{\Gamma}^y$ | $\tilde{\Gamma}^z$ |
- in case that both fluid and scalar field exist
| index | 24 | 25 | 26 | 27 | 28 | 29 | 30 |
|---|---|---|---|---|---|---|---|
| variable | $E$ | $p_x$ | $p_y$ | $p_z$ | $N_B$ | $\phi$ | $\Pi$ |
- in case that only scalar field exists
| index | 24 | 25 |
|---|---|---|
| variable | $\phi$ | $\Pi$ |
fluid fluxes and primitive variables
| type | name | description |
|---|---|---|
| double**** | flux_x | deposit for x-flux at i-1/2 |
| double**** | flux_y | deposit for y-flux at i-1/2 |
| double**** | flux_z | deposit for z-flux at i-1/2 |
| double**** | primv | primitive variables of fluid |
- primitive variables of fluid
| index | 0 | 1 | 2 | 3 | 4 |
|---|---|---|---|---|---|
| variable | $\rho$ | $V^x$ | $V^y$ | $V^z$ | $\epsilon$ |
temporary variable
| type | name | description |
|---|---|---|
| double*** | psi | for initial data setup |
geometrical variables for inhomogeneous coordinate
| type | name | description |
|---|---|---|
| double* | flat_df2x | flat metric variables |
| double* | flat_df2y | flat metric variables |
| double* | flat_df2z | flat metric variables |
| double* | flat_Gamx | bar Gamma_ux_xx |
| double* | flat_Gamy | bar Gamma_uy_yy |
| double* | flat_Gamz | bar Gamma_uz_zz |
| double* | flat_dGamx | bar delG_x_ux_xx |
| double* | flat_dGamy | bar delG_y_uy_yy |
| double* | flat_dGamz | bar delG_z_uz_zz |
constraints and output
| type | name | description |
|---|---|---|
| double**** | con | for constraints |
| double**** | outv | for outputs |
- constraints
| index | description |
|---|---|
| 0 | normalized Hamiltonian constraint |
| 1 | Hamiltonian constraint |
| 2 | $x$ component of normalized Momemtum constraint |
| 3 | $x$ component of Momemtum constraint |
| 4 | $y$ component of normalized Momemtum constraint |
| 5 | $y$ component of Momemtum constraint |
| 6 | $z$ component of normalized Momemtum constraint |
| 7 | $z$ component of Momemtum constraint |
| 8 | $\Gamma^x-D\gamma^x$ |
| 9 | $\Gamma^y-D\gamma^y$ |
| 10 | $\Gamma^z-D\gamma^z$ |
Fmv0 :: Functions
- These define functions in the class.
Constructor and Destructor
Fmv0(int tabs,int jupper,int jlower,int kupper,int klower,int lupper,int llower, double xupper,double xlower,double yupper,double ylower,double zupper,double zlower,double am,bool fld, bool scl, bool cuev)
| input | setting variable in the class | description |
|---|---|---|
| tabs | tab | tab for refinement boundary |
| jupper | jui | maximum grid number to evolve for $x$ |
| jlower | jli | minimum grid number to evolve for $x$ |
| kupper | jui | maximum grid number to evolve for $y$ |
| klower | jli | minimum grid number to evolve for $y$ |
| lupper | jui | maximum grid number to evolve for $z$ |
| llower | jli | minimum grid number to evolve for $z$ |
| xupper | xu | maximum of coordinate length for $x$ |
| xlower | xl | minimum of coordinate length for $x$ |
| yupper | yu | maximum of coordinate length for $y$ |
| ylower | yl | minimum of coordinate length for $y$ |
| zupper | zu | maximum of coordinate length for $z$ |
| zlower | zl | minimum of coordinate length for $z$ |
| am | amp | amplitude of inhomogeneous grid |
| fld | fluidevo | on/off switch for fluid evolution |
| scl | scalarevo | on/off switch for scalar evolution |
| cuev | curveval | on/off switch for curvature evaluation |
~Fmv0()
GET functions
- These functions simply return the value of corresponding protected variables in the class.
| type | name | input | output: the corresponding variable in the class |
|---|---|---|---|
| bool | get_fluidevo() | no | fluidevo |
| bool | get_scalarevo() | no | scalarevo |
| bool | get_curveval() | no | curveval |
| bool | get_hform() | no | hform |
| bool | get_exc() | no | exc |
| bool | get_mrf() | no | mrf |
| int | get_jmax() | no | jmax |
| int | get_jmin() | no | jmin |
| int | get_kmax() | no | kmax |
| int | get_kmin() | no | kmin |
| int | get_lmax() | no | lmax |
| int | get_lmin() | no | lmin |
| int | get_jui() | no | jui |
| int | get_jli() | no | jli |
| int | get_kui() | no | kui |
| int | get_kli() | no | kli |
| int | get_lui() | no | lui |
| int | get_lli() | no | lli |
| int | get_nx() | no | nx |
| int | get_ny() | no | ny |
| int | get_nz() | no | nz |
| int | get_jhm() | no | jhm |
| int | get_khm() | no | khm |
| int | get_lhm() | no | lhm |
| int | get_jmm() | no | jmm |
| int | get_kmm() | no | kmm |
| int | get_lmm() | no | lmm |
| int | get_jkm() | no | jkm |
| int | get_kkm() | no | kkm |
| int | get_lkm() | no | lkm |
| int | get_jwm() | no | jwm |
| int | get_kwm() | no | kwm |
| int | get_lwm() | no | lwm |
| int | get_exg() | no | exg |
| int | get_layn() | no | layn |
| int | get_jjmin() | no | jjmin |
| int | get_kkmin() | no | kkmin |
| int | get_llmin() | no | llmin |
| double | get_t() | no | t |
| double | get_dt() | no | dt |
| double | get_dt0() | no | dt0 |
| double | get_dtp() | no | dtp |
| double | get_dtpp() | no | dtpp |
| double | get_tmax() | no | tmax |
| double | get_cfl() | no | cfl |
| double | get_dx() | no | dx |
| double | get_dy() | no | dy |
| double | get_dz() | no | dz |
| double | get_dvol() | no | dvol |
| double | get_dxi() | no | dxi |
| double | get_dyi() | no | dyi |
| double | get_dzi() | no | dzi |
| double | get_dxi2() | no | dxi2 |
| double | get_dyi2() | no | dyi2 |
| double | get_dzi2() | no | dzi2 |
| double | get_dxi4() | no | dxi4 |
| double | get_dyi4() | no | dyi4 |
| double | get_dzi4() | no | dzi4 |
| double | get_xu() | no | xu |
| double | get_xl() | no | xl |
| double | get_yu() | no | yu |
| double | get_yl() | no | yl |
| double | get_zu() | no | zu |
| double | get_zl() | no | zl |
| double | get_ham() | no | ham |
| double | get_hammax() | no | hammax |
| double | get_Kremax() | no | Kremax |
| double | get_Weylmax() | no | Weylmax |
| double | get_mom() | no | mom |
| double | get_mommax() | no | mommax |
| double | get_etaa() | no | etaa |
| double | get_etab() | no | etab |
| double | get_etabb() | no | etabb |
| double | get_lambda() | no | lambda |
| double | get_tini() | no | tini |
| double | get_KOep() | no | K0ep |
| double | get_Mkap() | no | kap_MUSCL |
| double | get_b() | no | b_minmod |
| double | get_Hb() | no | Hb |
| double | get_fluidw() | no | fluidw |
| double | get_scalarm() | no | scalarm |
| int | get_bflag(int l,int k,int j) | j,k,l:grid number for $x,y,z$ | bflag at j,k,l |
| int | get_hflag(int l,int k,int j) | j,k,l:grid number for $x,y,z$ | hflag at j,k,l |
| int | get_fmrflag(int l,int k,int j) | j,k,l:grid number for $x,y,z$ | fmrflag at j,k,l |
| double | get_x(int j) | j:grid number for $x$ | x at j |
| double | get_y(int k) | k:grid number for $y$ | y at k |
| double | get_z(int l) | l:grid number for $z$ | z at l |
| double | get_bv(int l,int k,int j,int i) | i:number of dynamical variables, j,k,l:grid number for $x,y,z$ | bv[i] at j,k,l |
| double | get_dbv(int l,int k,int j,int i) | i:number of dynamical fluxes, j,k,l:grid number for $x,y,z$ | dbv[i] at j,k,l |
| double | get_bv0(int l,int k,int j,int i) | i:number of dynamical variables, j,k,l:grid number for $x,y,z$ | bv0[i] at j,k,l |
| double | get_bv1(int l,int k,int j,int i) | i:number of dynamical variables, j,k,l:grid number for $x,y,z$ | bv0[i] at j,k,l |
| double | get_bvr(int l,int k,int j,int i) | i:number of dynamical variables, j,k,l:grid number for $x,y,z$ | bvr[i] at j,k,l |
| double | get_con(int l,int k,int j,int i) | i:number of constraints, j,k,l:grid number for $x,y,z$ | con[i] at j,k,l |
| double | get_flat_df2x(int j) | j:grid number for $x$ | flat_df2x at j |
| double | get_flat_df2y(int k) | k:grid number for $y$ | flat_df2y at k |
| double | get_flat_df2z(int l) | l:grid number for $z$ | flat_df2z at l |
| double | get_flat_Gamx(int j) | j:grid number for $x$ | flat_Gamx at j |
| double | get_flat_Gamy(int k) | k:grid number for $y$ | flat_Gamy at k |
| double | get_flat_Gamz(int l) | l:grid number for $z$ | flat_Gamz at l |
| double | get_flat_dGamx(int j) | j:grid number for $x$ | flat_dGamx at j |
| double | get_flat_dGamy(int k) | k:grid number for $y$ | flat_dGamy at k |
| double | get_flat_dGamz(int l) | l:grid number for $z$ | flat_dGamz at l |
| double | get_outv(int l,int k,int j,int i) | i:number of outputs, j,k,l:grid number for $x,y,z$ | outv[i] at j,k,l |
| double | get_psi(int l,int k,int j) | j,k,l:grid number for $x,y,z$ | psi at j,k,l |
| double | get_primv(int l,int k,int j,int i) | i:number of primitive variables, j,k,l:grid number for $x,y,z$ | primv[i] at j,k,l |
| double | get_flux_x(int l,int k,int j,int i) | i:number of fluxes in $x$, j,k,l:grid number for $x,y,z$ | flux_x[i] at j,k,l |
| double | get_flux_y(int l,int k,int j,int i) | i:number of fluxes in $y$, j,k,l:grid number for $x,y,z$ | flux_y[i] at j,k,l |
| double | get_flux_z(int l,int k,int j,int i) | i:number of fluxes in $z$, j,k,l:grid number for $x,y,z$ | flux_z[i] at j,k,l |
| double*** | get_bv(int i) | i:number of dynamical variables | pointer to bv[i] |
| double*** | get_dbv(int i) | i:number of dynamical variables | pointer to dbv[i] |
| double*** | get_bv0(int i) | i:number of dynamical variables | pointer to bv0[i] |
| double*** | get_bv1(int i) | i:number of dynamical variables | pointer to bv1[i] |
| double*** | get_bvr(int i) | i:number of dynamical variables | pointer to bvr[i] |
- The following get functions return calculated values from protected variables in the class as derivative or interpolation.
| type | name | input | output |
|---|---|---|---|
| double | get_f_x(int l,int k,int j,int i) | i:number of variables, j,k,l:grid number for $x,y,z$ | derivative of bv[i] with respect to $x$ at j,k,l |
| double | get_f_y(int l,int k,int j,int i) | i:number of variables, j,k,l:grid number for $x,y,z$ | derivative of bv[i] with respect to $y$ at j,k,l |
| double | get_f_z(int l,int k,int j,int i) | i:number of variables, j,k,l:grid number for $x,y,z$ | derivative of bv[i] with respect to $z$ at j,k,l |
| double | get_f_xx(int l,int k,int j,int i) | i:number of variables, j,k,l:grid number for $x,y,z$ | second derivative of bv[i] with respect to $x$ at j,k,l |
| double | get_f_yy(int l,int k,int j,int i) | i:number of variables, j,k,l:grid number for $x,y,z$ | second derivative of bv[i] with respect to $y$ at j,k,l |
| double | get_f_zz(int l,int k,int j,int i) | i:number of variables, j,k,l:grid number for $x,y,z$ | second derivative of bv[i] with respect to $z$ at j,k,l |
| double | get_f_xy(int l,int k,int j,int i) | i:number of variables, j,k,l:grid number for $x,y,z$ | second derivative of bv[i] with respect to $x$ and $y$ at j,k,l |
| double | get_f_xz(int l,int k,int j,int i) | i:number of variables, j,k,l:grid number for $x,y,z$ | second derivative of bv[i] with respect to $x$ and $z$ at j,k,l |
| double | get_f_yz(int l,int k,int j,int i) | i:number of variables, j,k,l:grid number for $x,y,z$ | second derivative of bv[i] with respect to $y$ and $z$ at j,k,l |
| double | get_ipol_x_lower_mid(int l,int k,int j,int i) | i:number of variables, j,k,l:grid number for $x,y,z$ | value of bv[i] interpolated in $x$ |
| double | get_ipol_y_lower_mid(int l,int k,int j,int i) | i:number of variables, j,k,l:grid number for $x,y,z$ | value of bv[i] interpolated in $y$ |
| double | get_ipol_z_lower_mid(int l,int k,int j,int i) | i:number of variables, j,k,l:grid number for $x,y,z$ | value of bv[i] interpolated in $z$ |
| double | get_2ndf_x(int l,int k,int j,int i) | i:number of variables, j,k,l:grid number for $x,y,z$ | lower-order derivative of bv[i] with respect to $x$ at j,k,l |
| double | get_2ndf_y(int l,int k,int j,int i) | i:number of variables, j,k,l:grid number for $x,y,z$ | lower-order derivative of bv[i] with respect to $y$ at j,k,l |
| double | get_2ndf_z(int l,int k,int j,int i) | i:number of variables, j,k,l:grid number for $x,y,z$ | lower-order derivative of bv[i] with respect to $z$ at j,k,l |
| double | get_2ndf_xx(int l,int k,int j,int i) | i:number of variables, j,k,l:grid number for $x,y,z$ | lower-order second derivative of bv[i] with respect to $x$ at j,k,l |
| double | get_2ndf_yy(int l,int k,int j,int i) | i:number of variables, j,k,l:grid number for $x,y,z$ | lower-order second derivative of bv[i] with respect to $y$ at j,k,l |
| double | get_2ndf_zz(int l,int k,int j,int i) | i:number of variables, j,k,l:grid number for $x,y,z$ | lower-order second derivative of bv[i] with respect to $z$ at j,k,l |
| double | get_2ndf_xy(int l,int k,int j,int i) | i:number of variables, j,k,l:grid number for $x,y,z$ | lower-order second derivative of bv[i] with respect to $x$ and $y$ at j,k,l |
| double | get_2ndf_xz(int l,int k,int j,int i) | i:number of variables, j,k,l:grid number for $x,y,z$ | lower-order second derivative of bv[i] with respect to $x$ and $z$ at j,k,l |
| double | get_2ndf_yz(int l,int k,int j,int i) | i:number of variables, j,k,l:grid number for $x,y,z$ | lower-order second derivative of bv[i] with respect to $y$ and $z$ at j,k,l |
SET functions
- These functions set the value of protected variables in the class.
| type | name | input | change the corresponding variable in the class |
|---|---|---|---|
| void | set_fluidevo(bool f) | f:fluid evolution switch | fluidevo |
| void | set_scalarevo(bool s) | s:scalar evolution switch | scalarevo |
| void | set_t(double time) | time:physical time | t |
| void | set_dt(double time) | time:time interval | dt |
| void | set_dt0(double time) | time:time interval at previous step | dt0 |
| void | set_dtp(double time) | time:time interval at two steps before | dtp |
| void | set_dtpp(double time) | time:time interval at three steps before | dtpp |
| void | set_tmax(double time) | time:maximum time | tmax |
| void | set_cfl(double c) | c:CFL condition number | cfl |
| void | set_etaa(double e) | e:parameter for gauge evolution | etaa |
| void | set_etab(double e) | e:parameter for gauge evolution | etab |
| void | set_etabb(double e) | e:parameter for gauge evolution | etabb |
| void | set_lambda(double l) | l:cosmological constant | lambda |
| void | set_Hb(double hb) | hb:initial Hubble | Hb |
| void | set_tini(double t) | t:initial physical time | tini |
| void | set_KOep(double l) | l:parameter for Kreiss-Oliger dissipation | K0ep |
| void | set_exg(int eg) | eg:number of excision grid | exg |
| void | set_amp(double a) | a:amplitude of inhomogeneous grid | amp |
| void | set_fluidw(double fw) | fw:fluid EOS parameter | fluidw |
| void | set_scalarm(double sm) | sm:scalar field mass parameter | scalarm |
| void | set_Mkap(double k) | k:MUSCL parameter | kap_MUSCL |
| void | set_b(double b) | b:MUSCL parameter | b_minmid |
| void | set_exc(bool e) | e:excision switch | exc |
| void | set_mrf(bool s) | s:mesh refinement switch | mrf |
| void | set_jjmin(int jjj) | jjj:minimum j for constraint check | jjmin |
| void | set_kkmin(int kkk) | kkk:minimum k for constraint check | kkmin |
| void | set_llmin(int lll) | lll:minimum l for constraint check | llmin |
| void | set_fmrregion(int lmi,int lma,int kmi,int kma,int jmi,int jma) | jmi,jma: minimum and maximum grid points for $x$, kmi,kma: minimum and maximum grid points for $y$, lmi,lma: minimum and maximum grid points for $z$ | fmrflag in $lmi\le l \le lma, kmi\le k\le kma, jmi\le j\le jma$ to $1$ |
| type | name | input | return the corresponding variable in the class |
|---|---|---|---|
| int& | set_bflag(int l,int k,int j) | j,k,l:grid number for $x,y,z$ | bflag at j,k,l |
| int& | set_hflag(int l,int k,int j) | j,k,l:grid number for $x,y,z$ | hflag at j,k,l |
| int& | set_fmrflag(int l,int k,int j) | j,k,l:grid number for $x,y,z$ | fmrflag at j,k,l |
| double& | set_bv(int l,int k,int j,int i) | i:number of dynamical variables, j,k,l:grid number for $x,y,z$ | bv[i] at j,k,l |
| double& | set_dbv(int l,int k,int j,int i) | i:number of dynamical variables, j,k,l:grid number for $x,y,z$ | bv[i] at j,k,l |
| double& | set_bv0(int l,int k,int j,int i) | i:number of dynamical variables, j,k,l:grid number for $x,y,z$ | bv[i] at j,k,l |
| double& | set_bv1(int l,int k,int j,int i) | i:number of dynamical variables, j,k,l:grid number for $x,y,z$ | bv[i] at j,k,l |
| double& | set_bvr(int l,int k,int j,int i) | i:number of dynamical variables, j,k,l:grid number for $x,y,z$ | bv[i] at j,k,l |
| double& | set_con(int l,int k,int j,int i) | i:number of diagnostics, j,k,l:grid number for $x,y,z$ | con[i] at j,k,l |
| double& | set_flat_df2x(int j) | j:grid number for $x$ | flat_df2x |
| double& | set_flat_df2y(int k) | k:grid number for $y$ | flat_df2y |
| double& | set_flat_df2z(int l) | l:grid number for $z$ | flat_df2z |
| double& | set_flat_Gamx(int j) | j:grid number for $x$ | flat_Gamx |
| double& | set_flat_Gamy(int k) | k:grid number for $y$ | flat_Gamy |
| double& | set_flat_Gamz(int l) | l:grid number for $z$ | flat_Gamz |
| double& | set_flat_dGamx(int j) | j:grid number for $x$ | flat_dGamx |
| double& | set_flat_dGamy(int k) | k:grid number for $y$ | flat_dGamy |
| double& | set_flat_dGamz(int l) | l:grid number for $z$ | flat_dGamz |
| double& | set_outv(int l,int k,int j,int i) | i:number of outputs, j,k,l:grid number for $x,y,z$ | outv[i] at j,k,l |
| double& | set_primv(int l,int k,int j,int i) | i:number of primitive variables, j,k,l:grid number for $x,y,z$ | primv[i] at j,k,l |
| double& | set_flux_x(int l,int k,int j,int i) | i:number of fluxes, j,k,l:grid number for $x,y,z$ | flux_x[i] at j,k,l |
| double& | set_flux_y(int l,int k,int j,int i) | i:number of fluxes, j,k,l:grid number for $x,y,z$ | flux_y[i] at j,k,l |
| double& | set_flux_z(int l,int k,int j,int i) | i:number of fluxes, j,k,l:grid number for $x,y,z$ | flux_z[i] at j,k,l |
| double*** | set_bv(int i) | i:number of dynamical variables | pointer to bv[i] |
| double*** | set_dbv(int i) | i:number of dynamical variables | pointer to dbv[i] |
| double*** | set_bv0(int i) | i:number of dynamical variables | pointer to bv0[i] |
| double*** | set_bv1(int i) | i:number of dynamical variables | pointer to bv1[i] |
| double*** | set_bvr(int i) | i:number of dynamical variables | pointer to bvr[i] |
| double& | set_psi(int l,int k,int j) | j,k,l:grid number for $x,y,z$ | psi at j,k,l |
- The following functions are used for initializing values as zero or unity.
| type | name | variables to set zero |
|---|---|---|
| void | set_zero_all() | bv, dbv, bv0, bv1, con, outv, flat_df2x, flat_df2y, flat_df2z, flat_Gamx, flat_Gamy, flat_Gamz, flat_dGamx, flat_dGamy, flat_dGamz, psi, primv, flux_x, flux_y, flux_z |
| void | set_zero_all_exc() | dbv, con, outv inside excision region |
| void | set_zero_primv() | primv |
| void | set_zero() | bv |
| void | set_zero_0() | bv0 |
| void | set_zero_1() | bv1 |
| void | set_zero_d() | dbv |
| void | set_zero_r() | bvr |
| void | set_bflag_zero() | bflag |
| void | set_hflag_zero() | hflag |
| void | set_fmrflag_zero() | fmrflag |
UPDATE functions
- These functions are used to evolve the variables in the three dimensional box.
| type | name | description |
|---|---|---|
| void | setv0() | copying bv to bv0 |
| void | set01() | copying bv0 to bv1 |
| void | set0v() | copying bv0 to bv |
| void | runge_kutta(double dt) | adding dbv*dt into bvr |
| void | new_bv(double dt) | making bv by adding dbv*dt to bv0 |
| void | new_bv4() | making bv by adding bvr to bv0 |
| void | set_psi() | setting values of bv[13] to psi |
| void | set_excflags_square() | setting bflag to detect the inside of black hole |
ERROR check functions
- These are functions for physically checking the correctness of caluculation.
| type | name | description |
|---|---|---|
| void | check_const() | Hamiltonian and Momentum constraints to output files |
| void | check_Kremax() | maximum of Kretchmann invariant to output file |
| void | check_Weylmax() | maximum of Weyl invariant to output file |
Functions for fluid evolution
- These are used to calculate the fluid flux in the evolution.
| type | name | input | output |
|---|---|---|---|
| double | pres(double rho) | rho:density | pressure given by equation of state |
| double | dpres(double rho) | rho:density | derivative of pressure with respect to density |
| type | name | input | output |
|---|---|---|---|
| double | minmod(double a,double b) | a,b:fluid flux | flux determined by minmod function |
| double | sign(double A) | A:fluid flux | sign of A |
| type | name | input | output |
|---|---|---|---|
| void | get_rhoGam(double Ene,double& S,double& rho,double& Gam) | Ene:energy, S:momemtum density squared, rho:density, Gam:Lorentz factor | calculation of rho and Gam from Ene and S |
| void | dyntoprim() | no | setting primitive variables by dynamical variables |
Interpolation function
- These calculate the interpolated value at some grid point using nearby values.
| type | name | input | output |
|---|---|---|---|
| double | ipol( double &rr,double *xx,double *yy,int order ) | rr:position, xx:position at grid points, yy:variables at grid points, order:order of interpolation | interpolated value |
| double | bv_ipol(int jc,int kc,int lc,double xc,double yc,double zc,int order,int number) | jc,kc,lc:nearest grid number, xc,yc,zc:coordinate values, order:order of interpolation, number:variable number | interpolated value of bv[number] |
| double | bv0_ipol(int jc,int kc,int lc,double xc,double yc,double zc,int order,int number) | jc,kc,lc:nearest grid number, xc,yc,zc:coordinate values, order:order of interpolation, number:variable number | interpolated value of bv0[number] |
| double | bv1_ipol(int jc,int kc,int lc,double xc,double yc,double zc,int order,int number) | jc,kc,lc:nearest grid number, xc,yc,zc:coordinate values, order:order of interpolation, number:variable number | interpolated value of bv1[number] |
| double | bv0_ipol_diff_x(int jc,int kc,int lc,double xc,double yc,double zc,double facx,double qh,int order,int number) | jc,kc,lc:nearest grid number, xc,yc,zc:coordinate values at point, facx:deviation from nearest grid x, qh:variable at point, order:order of interpolation, number:variable number | derivative of bv0[number] with respect to $x$ at point |
| double | bv0_ipol_diff_y(int jc,int kc,int lc,double xc,double yc,double zc,double facy,double qh,int order,int number) | jc,kc,lc:nearest grid number, xc,yc,zc:coordinate values at point, facx:deviation from nearest grid x, qh:variable at point, order:order of interpolation, number:variable number | derivative of bv0[number] with respect to $y$ at point |
| double | bv0_ipol_diff_z(int jc,int kc,int lc,double xc,double yc,double zc,double facz,double qh,int order,int number) | jc,kc,lc:nearest grid number, xc,yc,zc:coordinate values at point, facx:deviation from nearest grid x, qh:variable at point, order:order of interpolation, number:variable number | derivative of bv0[number] with respect to $z$ at point |
| double | bv_ipol_diff_x(int jc,int kc,int lc,double xc,double yc,double zc,double facx,double qh,int order,int number) | jc,kc,lc:nearest grid number, xc,yc,zc:coordinate values at point, facx:deviation from nearest grid x, qh:variable at point, order:order of interpolation, number:variable number | derivative of bv[number] with respect to $x$ at point |
| double | bv_ipol_diff_y(int jc,int kc,int lc,double xc,double yc,double zc,double facy,double qh,int order,int number) | jc,kc,lc:nearest grid number, xc,yc,zc:coordinate values at point, facx:deviation from nearest grid x, qh:variable at point, order:order of interpolation, number:variable number | derivative of bv[number] with respect to $y$ at point |
| double | bv_ipol_diff_z(int jc,int kc,int lc,double xc,double yc,double zc,double facz,double qh,int order,int number) | jc,kc,lc:nearest grid number, xc,yc,zc:coordinate values at point, facx:deviation from nearest grid x, qh:variable at point, order:order of interpolation, number:variable number | derivative of bv[number] with respect to $z$ at point |
BSSN functions
- These functions are for evaluating the flux in the Einstein equation in the BSSN formulation.
| type | name | input | description |
|---|---|---|---|
| void | BSSN_adv() | no | setting advection term only to dbv associated with shift vector |
| void | BSSN(int itype) | no | setting fluxes to dbv for dynamical evolution |
| void | enforce_const() | no | setting the determinant of $\gamma_{ij}$ to be unity and the trace of $A_{ij}$ to be zero |
| void | enforce_const_gp(int l,int k,int j) | j,k,l: grid number for $x,y,z$ | reset $\gamma_{ij}$ and $A_{ij}$ at j,k,l |
| void | KOdiss() | no | setting Kreiss-Oliger dissipation term |
| void | excision() | no | setting dbv at boundary grids in the excised region |
| void | flux_fill() | no | setting fluxes (flux_x, flux_y, flux_z) for fluid |
BOUNDARY functions
- These functions set the values at boundaries in the three dimensional box.
| type | name | input | description |
|---|---|---|---|
| void | boundary_quarter() | no | reflection boundary for bv, geometry and fluid (and scalar) |
| void | boundary_d_quarter() | no | reflection boundary for dbv, geometry and fluid (and scalar) |
| void | boundary_quarter_even(int i) | i:variable number | reflection boundary for bv[i] |
| void | boundary_prim_quarter() | no | boundary for primitive variables |
| void | boundary_quarter_excflags() | no | reflection boundary condition for the excised region |
| void | boundary_quarter_hflags() | no | reflection boundary condition for the horizon flags |
| void | boundary_psi_initial_quarter() | no | boundary condition for initial psi function |
| void | boundary_quarter_fluid() | no | reflection boundary for fluid |
| void | boundary_quarter_scalar() | no | reflection boundary for scalar field |
Initial functions
- These functions are used for creating the initial data for numerical relativity simulations if necessary.
| type | name | input | output |
|---|---|---|---|
| double | funcf(double X) | X:equilly-spaced coordinate | scale-up coordinate |
| double | ifuncf(double X) | X:scale-up coordinate | equially-spaced coordinate |
| double | df(double X) | X:equilly-spaced coordinate | first derivative of scale-up coordinate |
| double | ddf(double X) | X:equilly-spaced coordinate | second derivative of scale-up coordinate |
| double | dddf(double X) | X:equilly-spaced coordinate | third derivative of scale-up coordinate |
| type | name | input | description |
|---|---|---|---|
| void | initial_continue(ifstream& fcontinue) | fcontinue: savedata file | restarting the simulation with fcontinue data |
| void | set_flat() | no | setting flat spacetime for scale-up coordinate (flat_df2*, flat_Gam*, flat_dGam*) |
| void | set_Gam() | no | setting initial $\Gamma^i$ for evolution |
| void | set_enemomini() | no | setting fluid from geometrical variables by constraints |
| type | name | input | description |
|---|---|---|---|
| void | initial_params(double cfli,double etaai,double etabi,double etabbi,double lambdai,double dt0i,double dtpi,double dtppi,double ti,double tinii,double Hbi,double KOepi,int exgi,double fluidwi,double scalarmi,double kap_MUSCLi,double b_minmodi) | cfli:CFL parameter, etaai,etabi,etabbi:gauge parameters, lambdai:cosmological constant, dt0i,dtpi,dtppi,ti,tinii:initial time, Hbi:initial Hubble parameter, KOepi:Kreiss-Oliger dissipation coefficient, exgi:excision grid number, fluidwi:fluid EOS parameter, scalarmi: scalar field mass parameter, kap_MUSCLi,b_minmodi:parameters for MUSCL interpolation | setting initial parameters |
OUTPUT functions
- These functions are used for printing out field values.
| type | name | input | description |
|---|---|---|---|
| void | print_x(ofstream& fn, int k,int l) | fn:output file, k,l:grid numbers for $y$ and $z$ | print out variables in x to fn |
| void | print_y(ofstream& fn, int j,int l) | fn:output file, j,l:grid numbers for $x$ and $z$ | print out variables in y to fn |
| void | print_z(ofstream& fn, int j,int k) | fn:output file, j,k:grid numbers for $x$ and $y$ | print out variables in z to fn |
| void | print_xy(ofstream& fn, int l) | fn:output file, l:grid number for $z$ | print out variables in xy-plane to fn |
| void | print_xz(ofstream& fn, int k) | fn:output file, k:grid number for $y$ | print out variables in xz-plane to fn |
| void | print_yz(ofstream& fn, int j) | fn:output file, j:grid number for $x$ | print out variables in yz-plane to fn |
| void | print_Kremax(ofstream& fout) | fout:output file | printing curvature invariants |
| void | print_const(ofstream& fout) | fout:output file | printing constraints |
| void | print_all(ofstream& fout) | fout:output file | printing all variables |
| void | print_3d(ofstream& fout) | fout:output file | output for 3D animation |
Potential function
- These define the potential of the scalar field.
| type | name | input | output |
|---|---|---|---|
| double | funcV(double p) | p:value of scalar field | potential of massive scalar field |
| double | funcdV(double p) | p:value of scalar field | derivative of potential |