4 #include "../../cosmo_includes.h" 5 #include "../../cosmo_types.h" 7 #include "bssn_macros.h" 9 #include "../../utils/Array.h" 10 #include "../../utils/FRW.h" 11 #include "../../utils/Fourier.h" 12 #include "../../utils/ConfigParser.h" 15 #include "../cosmotrace/raytrace.h" 27 BSSN_APPLY_TO_FIELDS(RK4_ARRAY_CREATE)
28 BSSN_APPLY_TO_SOURCES(GEN1_ARRAY_CREATE)
29 BSSN_APPLY_TO_GEN1_EXTRAS(GEN1_ARRAY_CREATE)
36 real_t rescale_metric;
48 real_t K_avg, rho_avg, avg_vol;
58 void setDt(real_t dt);
62 void setExtraFieldData();
98 void calculate_conformal_christoffels(
BSSNData *bd);
102 void calculateRicciTF(
BSSNData *bd);
103 void calculateDDalphaTF(
BSSNData *bd);
109 void set_full_metric_der(
BSSNData *bd);
112 real_t ev_DIFFgamma11(
BSSNData *bd);
113 real_t ev_DIFFgamma12(
BSSNData *bd);
114 real_t ev_DIFFgamma13(
BSSNData *bd);
115 real_t ev_DIFFgamma22(
BSSNData *bd);
116 real_t ev_DIFFgamma23(
BSSNData *bd);
117 real_t ev_DIFFgamma33(
BSSNData *bd);
143 # if USE_GAMMA_DRIVER 150 void set1DConstraintOutput(
151 real_t H_values[], real_t M_values[],
int axis, idx_t n1, idx_t n2);
153 void setConstraintCalcs(real_t H_values[7], real_t M_values[7],
154 real_t G_values[7], real_t A_values[7], real_t S_values[7]);
156 real_t hamiltonianConstraintCalc(
BSSNData *bd);
157 real_t hamiltonianConstraintScale(
BSSNData *bd);
159 real_t momentumConstraintCalc(
BSSNData *bd, idx_t d);
160 real_t momentumConstraintScale(
BSSNData *bd, idx_t d);
163 real_t christoffelConstraintScale(
BSSNData *bd, idx_t d);
166 real_t AijTFConstraintScale(
BSSNData *bd);
169 real_t unitDetConstraintScale(
BSSNData *bd);
173 RaytracePrimitives<real_t> getRaytraceData(
BSSNData *bd);
174 void setRaytraceCornerPrimitives(RayTrace<real_t, idx_t> *rt);
175 void setRaytracePrimitives(RayTrace<real_t, idx_t> *rt);
Functions to determine gauge evolution for the BSSN class. Functions are determined via a config sett...
void calculate_Acont(BSSNData *bd)
Calculate contravariant version of conformal trace-free extrinsic curvature, .
Definition: bssn.cc:442
void K4Finalize()
Call RK4Register::K4Finalize finalization routine for BSSN fields, call FRW::RK_total_step for refere...
Definition: bssn.cc:280
real_t KO_damping_coefficient
KO_dissipation coefficient amplitude (default 0)
Definition: bssn.h:27
void RKEvolve()
Call BSSN::RKEvolvePt for all points.
Definition: bssn.cc:211
Definition: BSSNGaugeHandler.h:20
void stepInit()
Call RK4Register class step initialization; normalize Aij and DIFFgammaIJ fields. ...
Definition: bssn.cc:199
void K1Finalize()
Call RK4Register::K1Finalize finalization routine for BSSN fields, call FRW::P1_step for reference FR...
Definition: bssn.cc:247
real_t AijTFConstraintCalc(BSSNData *bd)
Compute statistics about algebraic constraint violation: {}^{ij} {A}_{ij} = 0.
Definition: bssn.cc:1147
real_t unitDetConstraintCalc(BSSNData *bd)
Compute statistics about algebraic constraint violation: det({}_{ij}) = 1 In terms of reference varia...
Definition: bssn.cc:1164
FRW< real_t > * frw
FRW reference metric instance.
Definition: bssn.h:41
void K3Finalize()
Call RK4Register::K3Finalize finalization routine for BSSN fields, call FRW::P3_step for reference FR...
Definition: bssn.cc:269
void calculate_dgamma(BSSNData *bd)
Compute partial derivatives of the conformal metric, store in a BSSNData instance.
Definition: bssn.cc:457
void clearSrc()
zero all BSSN source term fields
Definition: bssn.cc:290
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 metri...
Definition: bssn.cc:426
int normalize_metric
Normalize A_ij and ? Default: 1 (true)
Definition: bssn.h:32
void setKODampingCoefficient(real_t KO_damping_coefficient_in)
Set Kriess-Oliger damping coefficient (numerical dissipation strength) Default is zero (no dissipatio...
Definition: bssn.cc:140
void init()
Initialize fields in BSSN class to defaults.
Definition: bssn.cc:113
BSSN Class: evolves BSSN metric fields, computes derived quantities.
Definition: bssn.h:24
map_t fields
Public map from names to internal arrays.
Definition: bssn.h:38
Structure containing BSSN metric variables and various derived quantities, such as derivatives of BSS...
Definition: bssn_data.h:18
Definition: ConfigParser.h:10
void calculate_ddgamma(BSSNData *bd)
Compute second partial derivatives of the conformal metric, store in a BSSNData instance.
Definition: bssn.cc:467
void set_local_vals(BSSNData *bd)
Set "local values"; set BSSNData values corresponding to field values at a point. ...
Definition: bssn.cc:409
real_t gd_eta
Gamma driver "eta" parameter.
Definition: bssn.h:30
void scaleMetricPerturbations(real_t multiplier)
scale all metric fields by a multiplier: f -> f_avg + mlt*(f-f_avg)
Definition: bssn.cc:912
void set_bd_values(idx_t i, idx_t j, idx_t k, BSSNData *bd)
Populate values in a BSSNData struct.
Definition: bssn.cc:340
real_t k_damping_amp
Additional "K"-damping (default 0)
Definition: bssn.h:28
void calculate_dK(BSSNData *bd)
Compute partial derivatives of the trace of the extrinsic curvature, store in a BSSNData instance...
Definition: bssn.cc:504
void RKEvolvePt(idx_t i, idx_t j, idx_t k, BSSNData *bd)
Compute the BSSN evolution functions.
Definition: bssn.cc:237
void set_DIFFgamma_Aij_norm()
Normalize the conformal difference metric, make sure the conformal extrinsic curvature is trace-free...
Definition: bssn.cc:48
void setDt(real_t dt)
Set integration timestep (eg, raytracing code calls this with negative dt when beginning to integrate...
Definition: bssn.cc:131
real_t christoffelConstraintCalc(BSSNData *bd, idx_t d)
Compute statistics about algebraic constraint violation: {}^i = {}^{jk} {}^i_{jk}.
Definition: bssn.cc:1107
void step()
Call Perform a full RK4 step, minus initialization.
Definition: bssn.cc:306
void calculate_dalpha_dphi(BSSNData *bd)
Compute partial derivatives of the lapse and conformal factor, store in a BSSNData instance...
Definition: bssn.cc:477
void K2Finalize()
Call RK4Register::K2Finalize finalization routine for BSSN fields, call FRW::P2_step for reference FR...
Definition: bssn.cc:258
real_t a_adj_amp
A-adjusted term amplitude (default 0)
Definition: bssn.h:29