CosmoGRaPH v0.0
Public Member Functions | Public Attributes | Private Attributes | List of all members
cosmo::BSSN Class Reference

BSSN Class: evolves BSSN metric fields, computes derived quantities. More...

#include <bssn.h>

Collaboration diagram for cosmo::BSSN:
Collaboration graph
[legend]

Public Member Functions

 BSSN (ConfigParser *config, Fourier *fourier_in)
 Constructor for BSSN class. More...
 
void init ()
 Initialize fields in BSSN class to defaults. More...
 
void setDt (real_t dt)
 Set integration timestep (eg, raytracing code calls this with negative dt when beginning to integrate backwards) More...
 
void setKODampingCoefficient (real_t KO_damping_coefficient_in)
 Set Kriess-Oliger damping coefficient (numerical dissipation strength) Default is zero (no dissipation).
 
void setExtraFieldData ()
 
void stepInit ()
 Call RK4Register class step initialization; normalize Aij and DIFFgammaIJ fields. More...
 
void RKEvolve ()
 Call BSSN::RKEvolvePt for all points.
 
void RKEvolvePt (idx_t i, idx_t j, idx_t k, BSSNData *bd)
 Compute the BSSN evolution functions. More...
 
void K1Finalize ()
 Call RK4Register::K1Finalize finalization routine for BSSN fields, call FRW::P1_step for reference FRW integrator.
 
void K2Finalize ()
 Call RK4Register::K2Finalize finalization routine for BSSN fields, call FRW::P2_step for reference FRW integrator.
 
void K3Finalize ()
 Call RK4Register::K3Finalize finalization routine for BSSN fields, call FRW::P3_step for reference FRW integrator.
 
void K4Finalize ()
 Call RK4Register::K4Finalize finalization routine for BSSN fields, call FRW::RK_total_step for reference FRW integrator.
 
void clearSrc ()
 zero all BSSN source term fields
 
void step ()
 Call Perform a full RK4 step, minus initialization. More...
 
void scaleMetricPerturbations (real_t multiplier)
 scale all metric fields by a multiplier: f -> f_avg + mlt*(f-f_avg)
 
void set_bd_values (idx_t i, idx_t j, idx_t k, BSSNData *bd)
 Populate values in a BSSNData struct. More...
 
void set_local_vals (BSSNData *bd)
 Set "local values"; set BSSNData values corresponding to field values at a point. More...
 
void set_gammai_values (idx_t i, idx_t j, idx_t k, BSSNData *bd)
 Compute and store inverse conformal difference metric components given the conformal difference metric in a BSSNData struct. More...
 
void set_DIFFgamma_Aij_norm ()
 Normalize the conformal difference metric, make sure the conformal extrinsic curvature is trace-free.
 
void calculate_Acont (BSSNData *bd)
 Calculate contravariant version of conformal trace-free extrinsic curvature, \(\bar{A}^{ij}\). More...
 
void calculate_dgamma (BSSNData *bd)
 Compute partial derivatives of the conformal metric, store in a BSSNData instance. More...
 
void calculate_ddgamma (BSSNData *bd)
 Compute second partial derivatives of the conformal metric, store in a BSSNData instance. More...
 
void calculate_dalpha_dphi (BSSNData *bd)
 Compute partial derivatives of the lapse and conformal factor, store in a BSSNData instance. More...
 
void calculate_dK (BSSNData *bd)
 Compute partial derivatives of the trace of the extrinsic curvature, store in a BSSNData instance. More...
 
void calculate_conformal_christoffels (BSSNData *bd)
 
void calculateDDphi (BSSNData *bd)
 
void calculateRicciTF (BSSNData *bd)
 
void calculateDDalphaTF (BSSNData *bd)
 
void enforceTFSIJ (BSSNData *bd)
 
void set_full_metric (BSSNData *bd)
 
void set_full_metric_der (BSSNData *bd)
 
real_t ev_DIFFgamma11 (BSSNData *bd)
 
real_t ev_DIFFgamma12 (BSSNData *bd)
 
real_t ev_DIFFgamma13 (BSSNData *bd)
 
real_t ev_DIFFgamma22 (BSSNData *bd)
 
real_t ev_DIFFgamma23 (BSSNData *bd)
 
real_t ev_DIFFgamma33 (BSSNData *bd)
 
real_t ev_A11 (BSSNData *bd)
 
real_t ev_A12 (BSSNData *bd)
 
real_t ev_A13 (BSSNData *bd)
 
real_t ev_A22 (BSSNData *bd)
 
real_t ev_A23 (BSSNData *bd)
 
real_t ev_A33 (BSSNData *bd)
 
real_t ev_DIFFK (BSSNData *bd)
 
real_t ev_DIFFphi (BSSNData *bd)
 
real_t ev_Gamma1 (BSSNData *bd)
 
real_t ev_Gamma2 (BSSNData *bd)
 
real_t ev_Gamma3 (BSSNData *bd)
 
real_t ev_DIFFalpha (BSSNData *bd)
 
void set1DConstraintOutput (real_t H_values[], real_t M_values[], int axis, idx_t n1, idx_t n2)
 
void setConstraintCalcs (real_t H_values[7], real_t M_values[7], real_t G_values[7], real_t A_values[7], real_t S_values[7])
 
real_t hamiltonianConstraintCalc (BSSNData *bd)
 
real_t hamiltonianConstraintScale (BSSNData *bd)
 
real_t momentumConstraintCalc (BSSNData *bd, idx_t d)
 
real_t momentumConstraintScale (BSSNData *bd, idx_t d)
 
real_t christoffelConstraintCalc (BSSNData *bd, idx_t d)
 Compute statistics about algebraic constraint violation: {}^i = {}^{jk} {}^i_{jk}.
 
real_t christoffelConstraintScale (BSSNData *bd, idx_t d)
 
real_t AijTFConstraintCalc (BSSNData *bd)
 Compute statistics about algebraic constraint violation: {}^{ij} {A}_{ij} = 0.
 
real_t AijTFConstraintScale (BSSNData *bd)
 
real_t unitDetConstraintCalc (BSSNData *bd)
 Compute statistics about algebraic constraint violation: det({}_{ij}) = 1 In terms of reference variables.
 
real_t unitDetConstraintScale (BSSNData *bd)
 

Public Attributes

BSSNGaugeHandlergaugeHandler
 
map_t fields
 Public map from names to internal arrays.
 
FRW< real_t > * frw
 FRW reference metric instance.
 
real_t K_avg
 
real_t rho_avg
 
real_t avg_vol
 
real_t K_min
 
real_t cur_t
 

Private Attributes

register_tDIFFgamma11
 
register_tDIFFgamma12
 
register_tDIFFgamma13
 
register_tDIFFgamma22
 
register_tDIFFgamma23
 
register_tDIFFgamma33
 
register_tDIFFphi
 
register_tA11
 
register_tA12
 
register_tA13
 
register_tA22
 
register_tA23
 
register_tA33
 
register_tDIFFK
 
register_tGamma1
 
register_tGamma2
 
register_tGamma3
 
register_tDIFFalpha
 
arr_t DIFFr_a
 
arr_t DIFFS_a
 
arr_t S1_a
 
arr_t S2_a
 
arr_t S3_a
 
arr_t STF11_a
 
arr_t STF12_a
 
arr_t STF13_a
 
arr_t STF22_a
 
arr_t STF23_a
 
arr_t STF33_a
 
arr_t ricci_a
 
arr_t AijAij_a
 
arr_t K0_a
 
real_t KO_damping_coefficient
 KO_dissipation coefficient amplitude (default 0)
 
real_t k_damping_amp
 Additional "K"-damping (default 0)
 
real_t a_adj_amp
 A-adjusted term amplitude (default 0)
 
real_t gd_eta
 Gamma driver "eta" parameter.
 
real_t rescale_metric
 
int normalize_metric
 Normalize A_ij and ? Default: 1 (true)
 
Fourierfourier
 

Detailed Description

BSSN Class: evolves BSSN metric fields, computes derived quantities.

Constructor & Destructor Documentation

cosmo::BSSN::BSSN ( ConfigParser config,
Fourier fourier_in 
)

Constructor for BSSN class.

Allocate memory for fields, add fields to map, create reference FRW integrator, and call BSSN::init.

Member Function Documentation

void cosmo::BSSN::calculate_Acont ( BSSNData bd)

Calculate contravariant version of conformal trace-free extrinsic curvature, \(\bar{A}^{ij}\).

Parameters
bdBSSNData struct with inverse metric, Aij already computed.
void cosmo::BSSN::calculate_dalpha_dphi ( BSSNData bd)

Compute partial derivatives of the lapse and conformal factor, store in a BSSNData instance.

Parameters
bdBSSNData struct reference
void cosmo::BSSN::calculate_ddgamma ( BSSNData bd)

Compute second partial derivatives of the conformal metric, store in a BSSNData instance.

Parameters
bdBSSNData struct reference
void cosmo::BSSN::calculate_dgamma ( BSSNData bd)

Compute partial derivatives of the conformal metric, store in a BSSNData instance.

Parameters
bdBSSNData struct reference
void cosmo::BSSN::calculate_dK ( BSSNData bd)

Compute partial derivatives of the trace of the extrinsic curvature, store in a BSSNData instance.

Parameters
bdBSSNData struct reference
void cosmo::BSSN::init ( )

Initialize fields in BSSN class to defaults.

BSSN fields initialized to a flat (difference) metric with zero source; thus all fields in all registers are zeroed. Reference integrator unaffected.

void cosmo::BSSN::RKEvolvePt ( idx_t  i,
idx_t  j,
idx_t  k,
BSSNData bd 
)

Compute the BSSN evolution functions.

Calls the BSSN evolution functions on the _a register; stores the result in the _c register. Computed data (Riemann tensor, etc) is stored in the BSSNData struct. Computed values of AijAij and Ricci are stored in the corresponding arrays.

Parameters
ix-index
jy-index
kz-index
bdreference to a BSSNData struct
void cosmo::BSSN::set_bd_values ( idx_t  i,
idx_t  j,
idx_t  k,
BSSNData bd 
)

Populate values in a BSSNData struct.

Compute all of them, except full metric m (TODO)

Parameters
ix-index
jy-index
kz-index
bdBSSNData struct to populate
void cosmo::BSSN::set_gammai_values ( idx_t  i,
idx_t  j,
idx_t  k,
BSSNData bd 
)

Compute and store inverse conformal difference metric components given the conformal difference metric in a BSSNData struct.

Computed assuming \(det(\bar{\gamma}_{ij}) = 1\)

Parameters
ix-index
jy-index
kz-index
bdBSSNData containing initialized conformal difference metric components
void cosmo::BSSN::set_local_vals ( BSSNData bd)

Set "local values"; set BSSNData values corresponding to field values at a point.

Parameters
bdBSSNData struct with idx set.
void cosmo::BSSN::setDt ( real_t  dt)

Set integration timestep (eg, raytracing code calls this with negative dt when beginning to integrate backwards)

Parameters
dtnew timesetp
void cosmo::BSSN::step ( )
void cosmo::BSSN::stepInit ( )

Call RK4Register class step initialization; normalize Aij and DIFFgammaIJ fields.

See RK4Register::stepInit() method.


The documentation for this class was generated from the following files: