LeanBSSNMoL solves Einstein’s equations in the BSSN formalism with up to 6th order accurate finite-difference stencils. It relies on the MoL thorn for the time integration.
The Lean code was first introduced in [1], to evolve vacuum spacetimes with the BSSN formalism. It has since been modified to run with the MoL thorn for the time integration and generalized to include matter terms through the TmunuBase thorn. It was made publicly available through the Canuda numerical relativity library [2], and has since been distributed also as a part of the Einstein Toolkit.
The bulk of the code is written in Fortran 90 and should be simple to follow – emphasis has been given to readability. The main part of the code, where the right-hand side of the evolution equations is computed, can be found in the file calc_bssn_rhs.F90. For the conformal factor the code uses the “W” version, i.e. \(W=\gamma ^{-1/6}\), and it employs the usual “1+log” and “Gamma-driver” gauge conditions.
LeanBSSNMoL is included with the Einstein Toolkit and can also be obtained through the Canuda numerical relativity library [2].
[1] U. Sperhake, “Binary black-hole evolutions of excision and puncture data,” Phys. Rev. D 76 (2007), 104015 doi:10.1103/PhysRevD.76.104015 [arXiv:gr-qc/0606079 [gr-qc]].
[2] H. Witek, M. Zilhao, G. Bozzola, C.-H. Cheng, A. Dima, M. Elley, G. Ficarra, T. Ikeda, R. Luna, C. Richards, N. Sanchis-Gual, H. Okada da Silva. “Canuda: a public numerical relativity library to probe fundamental physics,” Zenodo (2023) doi: 10.5281/zenodo.3565474
beta_alp | Scope: private | REAL |
Description: Exponent for lapse in front of the Gammaî term in the shift
| ||
Range | Default: 0.0 | |
*:* | Anything possible, default is zero
| |
beta_f_delta1 | Scope: private | REAL |
Description: delta1 coefficient for the shift condition of 1702.01755
| ||
Range | Default: 0.0125 | |
0:* | non-negative
| |
beta_f_delta2 | Scope: private | REAL |
Description: delta2 coefficient for the shift condition of 1702.01755
| ||
Range | Default: 0.0005 | |
0:* | non-negative
| |
beta_gamma | Scope: private | REAL |
Description: Coefficient in front of the Gammaî term in the shift
| ||
Range | Default: 0.75 | |
*:* | Anything possible
| |
calculate_constraints | Scope: private | BOOLEAN |
Description: Calculate the BSSN constraints?
| ||
Default: no | ||
calculate_constraints_every | Scope: private | INT |
Description: Calculate the BSSN constraints every N iterations
| ||
Range | Default: 1 | |
*:* | 0 or a negative value means never compute them
| |
chi_gamma | Scope: private | REAL |
Description: adding Yo-term to the gamma equation
| ||
Range | Default: 0.0 | |
*:* | 2/3 is a good value; the sign must be the same as betak,k
| |
compute_rhs_at_initial | Scope: private | BOOLEAN |
Description: Compute RHS after the initial data?
| ||
Default: no | ||
conf_fac_floor | Scope: private | REAL |
Description: Minimal value of conformal factor
| ||
Range | Default: 1.0d-04 | |
*:* | Any value possible
| |
derivs_order | Scope: private | INT |
Description: Order for derivatives
| ||
Range | Default: 4 | |
4 | 4th order stencils
| |
6 | 6th order stencils
| |
eps_r | Scope: private | REAL |
Description: Minimal value of radius for eta_transition
| ||
Range | Default: 1.0d-06 | |
0:* | Any value possible
| |
eta_beta | Scope: private | REAL |
Description: Damping parameter in live shift
| ||
Range | Default: 1 | |
0:* | non-negative
| |
eta_transition | Scope: private | BOOLEAN |
Description: Use an r-dependent eta?
| ||
Default: no | ||
eta_transition_r | Scope: private | REAL |
Description: Damping parameter in live shift
| ||
Range | Default: 1 | |
0:* | non-negative
| |
impose_conf_fac_floor_at_initial | Scope: private | BOOLEAN |
Description: Use floor value on initial data?
| ||
Default: no | ||
make_aa_tracefree | Scope: private | BOOLEAN |
Description: Remove trace of aij after each timestep?
| ||
Default: yes | ||
n_aij | Scope: private | INT |
Description: n power of outgoing boundary r fall off rate for A_ij
| ||
Range | Default: 2 | |
0:2 | 2 is reasonable
| |
n_alpha | Scope: private | INT |
Description: n power of outgoing boundary r fall off rate for alpha
| ||
Range | Default: 1 | |
0:2 | 1 is my guess
| |
n_beta | Scope: private | INT |
Description: n power of outgoing boundary r fall off rate for beta
| ||
Range | Default: 1 | |
0:2 | 1 is my guess
| |
n_conf_fac | Scope: private | INT |
Description: n power of outgoing boundary r fall off rate for conf_fac
| ||
Range | Default: 1 | |
0:2 | 1 is reasonable
| |
n_gammat | Scope: private | INT |
Description: n power of outgoing boundary r fall off rate for Gammaî
| ||
Range | Default: 1 | |
0:2 | Maybe 1?
| |
n_hij | Scope: private | INT |
Description: n power of outgoing boundary r fall off rate for h_ij
| ||
Range | Default: 1 | |
0:2 | 1 is reasonable
| |
n_trk | Scope: private | INT |
Description: n power of outgoing boundary r fall off rate for A_ij
| ||
Range | Default: 2 | |
0:2 | 2 is reasonable
| |
precollapsed_lapse | Scope: private | BOOLEAN |
Description: Initialize lapse as alp*psi-2}?
| ||
Default: no | ||
rescale_shift_initial | Scope: private | BOOLEAN |
Description: Initialize shift as psi-2}beta ?
| ||
Default: no | ||
reset_dethh | Scope: private | BOOLEAN |
Description: Reset determinant of conformal metric?
| ||
Default: no | ||
use_advection_stencils | Scope: private | BOOLEAN |
Description: Use lop-sided stencils for advection derivs
| ||
Default: yes | ||
z_is_radial | Scope: private | BOOLEAN |
Description: use with multipatch
| ||
Default: no | ||
zeta_alpha | Scope: private | REAL |
Description: Coefficient in front of the ad1_alpha term in slicing
| ||
Range | Default: 1 | |
*:* | Anything possible
| |
zeta_beta | Scope: private | REAL |
Description: Factor in front of ad1_beta in the live shift
| ||
Range | Default: 1 | |
0:* | non-negative
| |
leanbssn_maxnumconstrainedvars | Scope: restricted | INT |
Description: The maximum number of constrained variables used by LeanBSSNMoL
| ||
Range | Default: 16 | |
16:16 | metric(6), extrinsic curvature(6), dtlapse(1) and dtshift(3)
| |
leanbssn_maxnumevolvedvars | Scope: restricted | INT |
Description: The maximum number of evolved variables used by LeanBSSNMoL
| ||
Range | Default: 21 | |
21:21 | lapse (1), shift(3), hmetric (6), hcurv(6), trK (1), conf_fac(1), Gamma
(3)
| |
leanbssn_maxnumsandrvars | Scope: restricted | INT |
Description: The maximum number of save and restore variables used by LeanBSSNMoL
| ||
Range | Default: (none) | |
0:0 | none
| |
mol_num_constrained_vars | Scope: shared from METHODOFLINES | INT |
mol_num_evolved_vars | Scope: shared from METHODOFLINES | INT |
mol_num_saveandrestore_vars | Scope: shared from METHODOFLINES | INT |
Implements:
leanbssnmol
Inherits:
admbase
tmunubase
boundary
coordgauge
Group Names | Variable Names | Details | |
conf_fac | conf_fac | compact | 0 |
description | conformal factor | ||
dimensions | 3 | ||
distribution | DEFAULT | ||
group type | GF | ||
tags | tensortypealias=”Scalar” tensorweight=-0.33333333333333333333 | ||
timelevels | 3 | ||
variable type | REAL | ||
rhs_conf_fac | rhs_conf_fac | compact | 0 |
description | conformal factor | ||
dimensions | 3 | ||
distribution | DEFAULT | ||
group type | GF | ||
tags | tensortypealias=”Scalar” tensorweight=-0.33333333333333333333 prolongation=”none” | ||
timelevels | 1 | ||
variable type | REAL | ||
hmetric | compact | 0 | |
hxx | description | ∖tilde gamma_ij | |
hxy | dimensions | 3 | |
hxz | distribution | DEFAULT | |
hyy | group type | GF | |
hyz | tags | tensortypealias=”DD_sym” tensorweight=-0.66666666666666666667 | |
hzz | timelevels | 3 | |
variable type | REAL | ||
rhs_hmetric | compact | 0 | |
rhs_hxx | description | ∖tilde gamma_ij | |
rhs_hxy | dimensions | 3 | |
rhs_hxz | distribution | DEFAULT | |
rhs_hyy | group type | GF | |
rhs_hyz | tags | tensortypealias=”DD_sym” tensorweight=-0.66666666666666666667 prolongation=”none” | |
rhs_hzz | timelevels | 1 | |
variable type | REAL | ||
hcurv | compact | 0 | |
axx | description | ∖tilde a_ij | |
axy | dimensions | 3 | |
axz | distribution | DEFAULT | |
ayy | group type | GF | |
ayz | tags | tensortypealias=”DD_sym” tensorweight=-0.66666666666666666667 | |
azz | timelevels | 3 | |
variable type | REAL | ||
rhs_hcurv | compact | 0 | |
rhs_axx | description | ∖tilde a_ij | |
rhs_axy | dimensions | 3 | |
rhs_axz | distribution | DEFAULT | |
rhs_ayy | group type | GF | |
rhs_ayz | tags | tensortypealias=”DD_sym” tensorweight=-0.66666666666666666667 prolongation=”none” | |
rhs_azz | timelevels | 1 | |
variable type | REAL | ||
Group Names | Variable Names | Details | |
trk | compact | 0 | |
tracek | description | Tr(K) | |
dimensions | 3 | ||
distribution | DEFAULT | ||
group type | GF | ||
tags | tensortypealias=”Scalar” tensorweight=0 | ||
timelevels | 3 | ||
variable type | REAL | ||
rhs_trk | compact | 0 | |
rhs_tracek | description | Tr(K) | |
dimensions | 3 | ||
distribution | DEFAULT | ||
group type | GF | ||
tags | tensortypealias=”Scalar” tensorweight=0 prolongation=”none” | ||
timelevels | 1 | ||
variable type | REAL | ||
gammat | compact | 0 | |
gammatx | description | ∖tilde ∖Gammaî | |
gammaty | dimensions | 3 | |
gammatz | distribution | DEFAULT | |
group type | GF | ||
tags | tensortypealias=”U” tensorweight=0.66666666666666666667 tensorspecial=”Gamma” | ||
timelevels | 3 | ||
variable type | REAL | ||
rhs_gammat | compact | 0 | |
rhs_gammatx | description | ∖tilde ∖Gammaî | |
rhs_gammaty | dimensions | 3 | |
rhs_gammatz | distribution | DEFAULT | |
group type | GF | ||
tags | tensortypealias=”U” tensorweight=0.66666666666666666667 tensorspecial=”Gamma” prolongation=”none” | ||
timelevels | 3 | ||
variable type | REAL | ||
rhs_lapse | compact | 0 | |
rhs_alp | description | lapse function | |
dimensions | 3 | ||
distribution | DEFAULT | ||
group type | GF | ||
tags | tensortypealias=”Scalar” prolongation=”none” | ||
timelevels | 1 | ||
variable type | REAL | ||
rhs_shift | compact | 0 | |
rhs_betax | description | shift vector | |
rhs_betay | dimensions | 3 | |
rhs_betaz | distribution | DEFAULT | |
group type | GF | ||
tags | tensortypealias=”U” prolongation=”none” | ||
timelevels | 1 | ||
variable type | REAL | ||
Group Names | Variable Names | Details | |
ham | compact | 0 | |
hc | description | Hamiltonian constraint | |
dimensions | 3 | ||
distribution | DEFAULT | ||
group type | GF | ||
tags | tensortypealias=”Scalar” tensorweight=0 | ||
timelevels | 3 | ||
variable type | REAL | ||
mom | compact | 0 | |
mcx | description | momentum constraints | |
mcy | dimensions | 3 | |
mcz | distribution | DEFAULT | |
group type | GF | ||
tags | tensortypealias=”D” tensorweight=0 | ||
timelevels | 3 | ||
variable type | REAL | ||
Uses header:
Slicing.h
This section lists all the variables which are assigned storage by thorn Lean/LeanBSSNMoL. Storage can either last for the duration of the run (Always means that if this thorn is activated storage will be assigned, Conditional means that if this thorn is activated storage will be assigned for the duration of the run if some condition is met), or can be turned on for the duration of a schedule function.
Conditional: | |
conf_fac[3] rhs_conf_fac[1] | |
hmetric[3] rhs_hmetric[1] | |
hcurv[3] rhs_hcurv[1] | |
trk[3] rhs_trk[1] | |
gammat[3] rhs_gammat[1] | |
rhs_lapse[1] | |
rhs_shift[1] | |
ham[3] | |
mom[3] | |
CCTK_PARAMCHECK (conditional)
lean_paramcheck
check lean parameters for consistency
Language: | c | |
Type: | function | |
CCTK_STARTUP (conditional)
leanbssn_registerslicing
register slicing
Language: | c | |
Options: | meta | |
Type: | function | |
CCTK_POSTINITIAL (conditional)
leanbssn_calc_bssn_rhs_bdry
mol boundary rhs calculation
After: | leanbssn_calcrhs | |
Language: | fortran | |
Type: | function | |
CCTK_POSTINITIAL (conditional)
leanbssn_calc_bssn_rhs_bdry_sph
mol boundary rhs calculation in spherical coordinates
Language: | fortran | |
Type: | function | |
MoL_CalcRHS (conditional)
leanbssn_calc_bssn_rhs_bdry
mol boundary rhs calculation
After: | leanbssn_calcrhs | |
Language: | fortran | |
Type: | function | |
MoL_RHSBoundaries (conditional)
leanbssn_calc_bssn_rhs_bdry_sph
mol boundary rhs calculation in spherical coordinates
Language: | fortran | |
Type: | function | |
MoL_PostStep (conditional)
leanbssn_reset_detmetric
reset dethh = 1
Before: | leanbssn_boundaries | |
Language: | fortran | |
Type: | function | |
MoL_PostStep (conditional)
leanbssn_remove_tra
remove trace of a
After: | reset_detmetric | |
Before: | leanbssn_boundaries | |
Language: | fortran | |
Type: | function | |
MoL_PostStep (conditional)
leanbssn_impose_conf_fac_floor
make sure conformal factor does not drop below specified value
Before: | leanbssn_boundaries | |
Language: | fortran | |
Type: | function | |
MoL_PostStep (conditional)
leanbssn_boundaries
mol boundary enforcement
Language: | fortran | |
Options: | level | |
Sync: | admbase::lapse | |
admbase::shift | ||
leanbssnmol::conf_fac | ||
leanbssnmol::hmetric | ||
leanbssnmol::hcurv | ||
leanbssnmol::trk | ||
leanbssnmol::gammat | ||
Type: | function | |
MoL_PostStep (conditional)
applybcs
apply boundary conditions
After: | leanbssn_boundaries | |
Type: | group | |
MoL_PostStep (conditional)
leanbssn_bssn2adm
convert variables back to the adm ones
After: | leanbssn_applybcs | |
Before: | admbase_setadmvars | |
Language: | fortran | |
Options: | local | |
Type: | function | |
CCTK_BASEGRID (conditional)
leanbssn_symmetries
register symmetries of the bssn grid functions
Language: | fortran | |
Options: | global | |
Type: | function | |
CCTK_ANALYSIS (conditional)
leanbssn_constraints
compute constraints
Language: | fortran | |
Type: | group | |
LeanBSSN_constraints (conditional)
leanbssn_bssn_constraints
compute constraints
Language: | fortran | |
Type: | function | |
LeanBSSN_constraints (conditional)
leanbssn_constraints_boundaries
enforce symmetry bcs in constraint computation
After: | leanbssn_bssn_constraints | |
Language: | fortran | |
Options: | level | |
Sync: | leanbssnmol::ham | |
leanbssnmol::mom | ||
Type: | function | |
LeanBSSN_constraints (conditional)
applybcs
apply boundary conditions
After: | leanbssn_constraints_boundaries | |
Type: | group | |
CCTK_BASEGRID (conditional)
leanbssn_zero_rhs
set all rhs functions to zero to prevent spurious nans
After: | leanbssn_symmetries | |
Language: | fortran | |
Type: | function | |
CCTK_INITIAL (conditional)
leanbssn_adm2bssn
convert initial data into bssn variables
After: | admbase_postinitial | |
Language: | fortran | |
Options: | local | |
Type: | function | |
CCTK_INITIAL (conditional)
leanbssn_boundaries
boundary enforcement
After: | leanbssn_adm2bssn | |
Language: | fortran | |
Options: | level | |
Sync: | leanbssnmol::gammat | |
Type: | function | |
CCTK_INITIAL (conditional)
applybcs
apply boundary conditions
After: | leanbssn_boundaries | |
Type: | group | |
MoL_Register (conditional)
leanbssn_registervars
register variables for mol
Language: | c | |
Options: | meta | |
Type: | function | |
MoL_CalcRHS (conditional)
leanbssn_calc_bssn_rhs
mol rhs calculation
Language: | fortran | |
Type: | function | |
CCTK_POSTINITIAL (conditional)
leanbssn_calc_bssn_rhs
mol rhs calculation
Before: | leanbssn_boundaries | |
Language: | fortran | |
Type: | function | |
Alias Name: | Function Name: |
ApplyBCs | LeanBSSN_ApplyBCs |
LeanBSSN_calc_bssn_rhs | LeanBSSN_CalcRHS |
LeanBSSN_calc_bssn_rhs_bdry | LeanBSSN_CalcRHS_Bdry |
LeanBSSN_calc_bssn_rhs_bdry_sph | LeanBSSN_CalcRHS_Bdry_Sph |