SpECTRE
v2024.09.29
|
Items related to evolving the first-order generalized harmonic system. More...
Namespaces | |
namespace | BoundaryConditions |
Boundary conditions for the generalized harmonic system. | |
namespace | BoundaryCorrections |
Boundary corrections/numerical fluxes. | |
namespace | ConstraintDamping |
Holds classes implementing DampingFunction (functions | |
namespace | gauges |
Gauge conditions for generalized harmonic evolution systems. | |
namespace | OptionTags |
Input option tags for the generalized harmonic evolution system. | |
namespace | Tags |
Tags for the generalized harmonic formulation of Einstein equations. | |
Classes | |
struct | CharacteristicFieldsCompute |
struct | CharacteristicSpeedsCompute |
struct | CharacteristicSpeedsOnStrahlkorper |
struct | CharacteristicSpeedsOnStrahlkorperCompute |
struct | ComputeNormalDotFluxes |
Set the normal dot the flux to zero since the generalized harmonic system has no fluxes and they're currently still needed for the evolution scheme. More... | |
struct | EvolvedFieldsFromCharacteristicFieldsCompute |
class | NumericInitialData |
Numeric initial data loaded from volume data files. More... | |
struct | System |
struct | TimeDerivative |
Compute the RHS of the Generalized Harmonic formulation of Einstein's equations. More... | |
Functions | |
template<size_t Dim> | |
void | initial_gh_variables_from_adm (gsl::not_null< tnsr::aa< DataVector, Dim > * > spacetime_metric, gsl::not_null< tnsr::aa< DataVector, Dim > * > pi, gsl::not_null< tnsr::iaa< DataVector, Dim > * > phi, const tnsr::ii< DataVector, Dim > &spatial_metric, const Scalar< DataVector > &lapse, const tnsr::I< DataVector, Dim > &shift, const tnsr::ii< DataVector, Dim > &extrinsic_curvature, const Mesh< Dim > &mesh, const InverseJacobian< DataVector, Dim, Frame::ElementLogical, Frame::Inertial > &inv_jacobian) |
Compute initial GH variables from ADM variables. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::ijj< DataType, SpatialDim, Frame > | covariant_deriv_of_extrinsic_curvature (const tnsr::ii< DataType, SpatialDim, Frame > &extrinsic_curvature, const tnsr::A< DataType, SpatialDim, Frame > &spacetime_unit_normal_vector, const tnsr::Ijj< DataType, SpatialDim, Frame > &spatial_christoffel_second_kind, const tnsr::AA< DataType, SpatialDim, Frame > &inverse_spacetime_metric, const tnsr::iaa< DataType, SpatialDim, Frame > &phi, const tnsr::iaa< DataType, SpatialDim, Frame > &d_pi, const tnsr::ijaa< DataType, SpatialDim, Frame > &d_phi) |
Computes the covariant derivative of extrinsic curvature from generalized harmonic variables and the spacetime normal vector. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | covariant_deriv_of_extrinsic_curvature (gsl::not_null< tnsr::ijj< DataType, SpatialDim, Frame > * > d_extrinsic_curvature, const tnsr::ii< DataType, SpatialDim, Frame > &extrinsic_curvature, const tnsr::A< DataType, SpatialDim, Frame > &spacetime_unit_normal_vector, const tnsr::Ijj< DataType, SpatialDim, Frame > &spatial_christoffel_second_kind, const tnsr::AA< DataType, SpatialDim, Frame > &inverse_spacetime_metric, const tnsr::iaa< DataType, SpatialDim, Frame > &phi, const tnsr::iaa< DataType, SpatialDim, Frame > &d_pi, const tnsr::ijaa< DataType, SpatialDim, Frame > &d_phi) |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | spacetime_derivative_of_spacetime_metric (gsl::not_null< tnsr::abb< DataType, SpatialDim, Frame > * > da_spacetime_metric, const Scalar< DataType > &lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::aa< DataType, SpatialDim, Frame > &pi, const tnsr::iaa< DataType, SpatialDim, Frame > &phi) |
Computes the spacetime derivative of the spacetime metric, | |
template<size_t Dim, typename Frame > | |
std::array< DataVector, 4 > | characteristic_speeds (const Scalar< DataVector > &gamma_1, const Scalar< DataVector > &lapse, const tnsr::I< DataVector, Dim, Frame > &shift, const tnsr::i< DataVector, Dim, Frame > &unit_normal_one_form, const std::optional< tnsr::I< DataVector, Dim, Frame > > &mesh_velocity) |
Compute the characteristic speeds for the generalized harmonic system. More... | |
template<size_t Dim, typename Frame > | |
void | characteristic_speeds (gsl::not_null< std::array< DataVector, 4 > * > char_speeds, const Scalar< DataVector > &gamma_1, const Scalar< DataVector > &lapse, const tnsr::I< DataVector, Dim, Frame > &shift, const tnsr::i< DataVector, Dim, Frame > &unit_normal_one_form, const std::optional< tnsr::I< DataVector, Dim, Frame > > &mesh_velocity) |
Compute the characteristic speeds for the generalized harmonic system. More... | |
template<size_t Dim, typename Frame > | |
Tags::CharacteristicFields< DataVector, Dim, Frame >::type | characteristic_fields (const Scalar< DataVector > &gamma_2, const tnsr::II< DataVector, Dim, Frame > &inverse_spatial_metric, const tnsr::aa< DataVector, Dim, Frame > &spacetime_metric, const tnsr::aa< DataVector, Dim, Frame > &pi, const tnsr::iaa< DataVector, Dim, Frame > &phi, const tnsr::i< DataVector, Dim, Frame > &unit_normal_one_form) |
Computes characteristic fields from evolved fields. More... | |
template<size_t Dim, typename Frame > | |
void | characteristic_fields (gsl::not_null< typename Tags::CharacteristicFields< DataVector, Dim, Frame >::type * > char_fields, const Scalar< DataVector > &gamma_2, const tnsr::II< DataVector, Dim, Frame > &inverse_spatial_metric, const tnsr::aa< DataVector, Dim, Frame > &spacetime_metric, const tnsr::aa< DataVector, Dim, Frame > &pi, const tnsr::iaa< DataVector, Dim, Frame > &phi, const tnsr::i< DataVector, Dim, Frame > &unit_normal_one_form) |
Computes characteristic fields from evolved fields. More... | |
template<size_t Dim, typename Frame > | |
Tags::EvolvedFieldsFromCharacteristicFields< DataVector, Dim, Frame >::type | evolved_fields_from_characteristic_fields (const Scalar< DataVector > &gamma_2, const tnsr::aa< DataVector, Dim, Frame > &u_psi, const tnsr::iaa< DataVector, Dim, Frame > &u_zero, const tnsr::aa< DataVector, Dim, Frame > &u_plus, const tnsr::aa< DataVector, Dim, Frame > &u_minus, const tnsr::i< DataVector, Dim, Frame > &unit_normal_one_form) |
For expressions used here to compute evolved fields from characteristic ones, see CharacteristicFieldsCompute. | |
template<size_t Dim, typename Frame > | |
void | evolved_fields_from_characteristic_fields (gsl::not_null< typename Tags::EvolvedFieldsFromCharacteristicFields< DataVector, Dim, Frame >::type * > evolved_fields, const Scalar< DataVector > &gamma_2, const tnsr::aa< DataVector, Dim, Frame > &u_psi, const tnsr::iaa< DataVector, Dim, Frame > &u_zero, const tnsr::aa< DataVector, Dim, Frame > &u_plus, const tnsr::aa< DataVector, Dim, Frame > &u_minus, const tnsr::i< DataVector, Dim, Frame > &unit_normal_one_form) |
For expressions used here to compute evolved fields from characteristic ones, see CharacteristicFieldsCompute. | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::iaa< DataType, SpatialDim, Frame > | three_index_constraint (const tnsr::iaa< DataType, SpatialDim, Frame > &d_spacetime_metric, const tnsr::iaa< DataType, SpatialDim, Frame > &phi) |
Computes the generalized-harmonic 3-index constraint. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | three_index_constraint (gsl::not_null< tnsr::iaa< DataType, SpatialDim, Frame > * > constraint, const tnsr::iaa< DataType, SpatialDim, Frame > &d_spacetime_metric, const tnsr::iaa< DataType, SpatialDim, Frame > &phi) |
Computes the generalized-harmonic 3-index constraint. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::a< DataType, SpatialDim, Frame > | gauge_constraint (const tnsr::a< DataType, SpatialDim, Frame > &gauge_function, const tnsr::a< DataType, SpatialDim, Frame > &spacetime_normal_one_form, const tnsr::A< DataType, SpatialDim, Frame > &spacetime_normal_vector, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric, const tnsr::AA< DataType, SpatialDim, Frame > &inverse_spacetime_metric, const tnsr::aa< DataType, SpatialDim, Frame > &pi, const tnsr::iaa< DataType, SpatialDim, Frame > &phi) |
Computes the generalized-harmonic gauge constraint. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | gauge_constraint (gsl::not_null< tnsr::a< DataType, SpatialDim, Frame > * > constraint, const tnsr::a< DataType, SpatialDim, Frame > &gauge_function, const tnsr::a< DataType, SpatialDim, Frame > &spacetime_normal_one_form, const tnsr::A< DataType, SpatialDim, Frame > &spacetime_normal_vector, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric, const tnsr::AA< DataType, SpatialDim, Frame > &inverse_spacetime_metric, const tnsr::aa< DataType, SpatialDim, Frame > &pi, const tnsr::iaa< DataType, SpatialDim, Frame > &phi) |
Computes the generalized-harmonic gauge constraint. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::ia< DataType, SpatialDim, Frame > | two_index_constraint (const tnsr::ab< DataType, SpatialDim, Frame > &spacetime_d_gauge_function, const tnsr::a< DataType, SpatialDim, Frame > &spacetime_normal_one_form, const tnsr::A< DataType, SpatialDim, Frame > &spacetime_normal_vector, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric, const tnsr::AA< DataType, SpatialDim, Frame > &inverse_spacetime_metric, const tnsr::aa< DataType, SpatialDim, Frame > &pi, const tnsr::iaa< DataType, SpatialDim, Frame > &phi, const tnsr::iaa< DataType, SpatialDim, Frame > &d_pi, const tnsr::ijaa< DataType, SpatialDim, Frame > &d_phi, const Scalar< DataType > &gamma2, const tnsr::iaa< DataType, SpatialDim, Frame > &three_index_constraint) |
Computes the generalized-harmonic 2-index constraint. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | two_index_constraint (gsl::not_null< tnsr::ia< DataType, SpatialDim, Frame > * > constraint, const tnsr::ab< DataType, SpatialDim, Frame > &spacetime_d_gauge_function, const tnsr::a< DataType, SpatialDim, Frame > &spacetime_normal_one_form, const tnsr::A< DataType, SpatialDim, Frame > &spacetime_normal_vector, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric, const tnsr::AA< DataType, SpatialDim, Frame > &inverse_spacetime_metric, const tnsr::aa< DataType, SpatialDim, Frame > &pi, const tnsr::iaa< DataType, SpatialDim, Frame > &phi, const tnsr::iaa< DataType, SpatialDim, Frame > &d_pi, const tnsr::ijaa< DataType, SpatialDim, Frame > &d_phi, const Scalar< DataType > &gamma2, const tnsr::iaa< DataType, SpatialDim, Frame > &three_index_constraint) |
Computes the generalized-harmonic 2-index constraint. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::iaa< DataType, SpatialDim, Frame > | four_index_constraint (const tnsr::ijaa< DataType, SpatialDim, Frame > &d_phi) |
Computes the generalized-harmonic 4-index constraint. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | four_index_constraint (gsl::not_null< tnsr::iaa< DataType, SpatialDim, Frame > * > constraint, const tnsr::ijaa< DataType, SpatialDim, Frame > &d_phi) |
Computes the generalized-harmonic 4-index constraint. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::a< DataType, SpatialDim, Frame > | f_constraint (const tnsr::a< DataType, SpatialDim, Frame > &gauge_function, const tnsr::ab< DataType, SpatialDim, Frame > &spacetime_d_gauge_function, const tnsr::a< DataType, SpatialDim, Frame > &spacetime_normal_one_form, const tnsr::A< DataType, SpatialDim, Frame > &spacetime_normal_vector, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric, const tnsr::AA< DataType, SpatialDim, Frame > &inverse_spacetime_metric, const tnsr::aa< DataType, SpatialDim, Frame > &pi, const tnsr::iaa< DataType, SpatialDim, Frame > &phi, const tnsr::iaa< DataType, SpatialDim, Frame > &d_pi, const tnsr::ijaa< DataType, SpatialDim, Frame > &d_phi, const Scalar< DataType > &gamma2, const tnsr::iaa< DataType, SpatialDim, Frame > &three_index_constraint) |
Computes the generalized-harmonic F constraint. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | f_constraint (gsl::not_null< tnsr::a< DataType, SpatialDim, Frame > * > constraint, const tnsr::a< DataType, SpatialDim, Frame > &gauge_function, const tnsr::ab< DataType, SpatialDim, Frame > &spacetime_d_gauge_function, const tnsr::a< DataType, SpatialDim, Frame > &spacetime_normal_one_form, const tnsr::A< DataType, SpatialDim, Frame > &spacetime_normal_vector, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric, const tnsr::AA< DataType, SpatialDim, Frame > &inverse_spacetime_metric, const tnsr::aa< DataType, SpatialDim, Frame > &pi, const tnsr::iaa< DataType, SpatialDim, Frame > &phi, const tnsr::iaa< DataType, SpatialDim, Frame > &d_pi, const tnsr::ijaa< DataType, SpatialDim, Frame > &d_phi, const Scalar< DataType > &gamma2, const tnsr::iaa< DataType, SpatialDim, Frame > &three_index_constraint) |
Computes the generalized-harmonic F constraint. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::a< DataType, SpatialDim, Frame > | f_constraint (const tnsr::a< DataType, SpatialDim, Frame > &gauge_function, const tnsr::ab< DataType, SpatialDim, Frame > &spacetime_d_gauge_function, const tnsr::a< DataType, SpatialDim, Frame > &spacetime_normal_one_form, const tnsr::A< DataType, SpatialDim, Frame > &spacetime_normal_vector, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric, const tnsr::AA< DataType, SpatialDim, Frame > &inverse_spacetime_metric, const tnsr::aa< DataType, SpatialDim, Frame > &pi, const tnsr::iaa< DataType, SpatialDim, Frame > &phi, const tnsr::iaa< DataType, SpatialDim, Frame > &d_pi, const tnsr::ijaa< DataType, SpatialDim, Frame > &d_phi, const Scalar< DataType > &gamma2, const tnsr::iaa< DataType, SpatialDim, Frame > &three_index_constraint, const tnsr::aa< DataType, SpatialDim, Frame > &trace_reversed_stress_energy) |
Computes the generalized-harmonic F constraint. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | f_constraint (gsl::not_null< tnsr::a< DataType, SpatialDim, Frame > * > constraint, const tnsr::a< DataType, SpatialDim, Frame > &gauge_function, const tnsr::ab< DataType, SpatialDim, Frame > &spacetime_d_gauge_function, const tnsr::a< DataType, SpatialDim, Frame > &spacetime_normal_one_form, const tnsr::A< DataType, SpatialDim, Frame > &spacetime_normal_vector, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric, const tnsr::AA< DataType, SpatialDim, Frame > &inverse_spacetime_metric, const tnsr::aa< DataType, SpatialDim, Frame > &pi, const tnsr::iaa< DataType, SpatialDim, Frame > &phi, const tnsr::iaa< DataType, SpatialDim, Frame > &d_pi, const tnsr::ijaa< DataType, SpatialDim, Frame > &d_phi, const Scalar< DataType > &gamma2, const tnsr::iaa< DataType, SpatialDim, Frame > &three_index_constraint, const tnsr::aa< DataType, SpatialDim, Frame > &trace_reversed_stress_energy) |
Computes the generalized-harmonic F constraint. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
Scalar< DataType > | constraint_energy (const tnsr::a< DataType, SpatialDim, Frame > &gauge_constraint, const tnsr::a< DataType, SpatialDim, Frame > &f_constraint, const tnsr::ia< DataType, SpatialDim, Frame > &two_index_constraint, const tnsr::iaa< DataType, SpatialDim, Frame > &three_index_constraint, const tnsr::iaa< DataType, SpatialDim, Frame > &four_index_constraint, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric, const Scalar< DataType > &spatial_metric_determinant, double gauge_constraint_multiplier=1.0, double two_index_constraint_multiplier=1.0, double three_index_constraint_multiplier=1.0, double four_index_constraint_multiplier=1.0) |
Computes the generalized-harmonic (unnormalized) constraint energy. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | constraint_energy (gsl::not_null< Scalar< DataType > * > energy, const tnsr::a< DataType, SpatialDim, Frame > &gauge_constraint, const tnsr::a< DataType, SpatialDim, Frame > &f_constraint, const tnsr::ia< DataType, SpatialDim, Frame > &two_index_constraint, const tnsr::iaa< DataType, SpatialDim, Frame > &three_index_constraint, const tnsr::iaa< DataType, SpatialDim, Frame > &four_index_constraint, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric, const Scalar< DataType > &spatial_metric_determinant, double gauge_constraint_multiplier=1.0, double two_index_constraint_multiplier=1.0, double three_index_constraint_multiplier=1.0, double four_index_constraint_multiplier=1.0) |
Computes the generalized-harmonic (unnormalized) constraint energy. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
Scalar< DataType > | constraint_energy_normalization (const tnsr::iaa< DataType, SpatialDim, Frame > &d_spacetime_metric, const tnsr::iaa< DataType, SpatialDim, Frame > &d_pi, const tnsr::ijaa< DataType, SpatialDim, Frame > &d_phi, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric, const Scalar< DataType > &sqrt_spatial_metric_determinant, double dimensional_constant) |
Computes the generalized-harmonic normalized constraint energy. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | constraint_energy_normalization (gsl::not_null< Scalar< DataType > * > energy_norm, const tnsr::iaa< DataType, SpatialDim, Frame > &d_spacetime_metric, const tnsr::iaa< DataType, SpatialDim, Frame > &d_pi, const tnsr::ijaa< DataType, SpatialDim, Frame > &d_phi, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric, const Scalar< DataType > &sqrt_spatial_metric_determinant, double dimensional_constant) |
Computes the generalized-harmonic normalized constraint energy. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | christoffel_second_kind (const gsl::not_null< tnsr::Ijj< DataType, SpatialDim, Frame > * > christoffel, const tnsr::iaa< DataType, SpatialDim, Frame > &phi, const tnsr::II< DataType, SpatialDim, Frame > &inv_metric) |
Computes spatial Christoffel symbol of the 2nd kind from the the generalized harmonic spatial derivative variable and the inverse spatial metric. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
auto | christoffel_second_kind (const tnsr::iaa< DataType, SpatialDim, Frame > &phi, const tnsr::II< DataType, SpatialDim, Frame > &inv_metric) -> tnsr::Ijj< DataType, SpatialDim, Frame > |
Computes spatial Christoffel symbol of the 2nd kind from the the generalized harmonic spatial derivative variable and the inverse spatial metric. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::a< DataType, SpatialDim, Frame > | trace_christoffel (const tnsr::a< DataType, SpatialDim, Frame > &spacetime_normal_one_form, const tnsr::A< DataType, SpatialDim, Frame > &spacetime_normal_vector, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric, const tnsr::AA< DataType, SpatialDim, Frame > &inverse_spacetime_metric, const tnsr::aa< DataType, SpatialDim, Frame > &pi, const tnsr::iaa< DataType, SpatialDim, Frame > &phi) |
Compute | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | trace_christoffel (gsl::not_null< tnsr::a< DataType, SpatialDim, Frame > * > trace, const tnsr::a< DataType, SpatialDim, Frame > &spacetime_normal_one_form, const tnsr::A< DataType, SpatialDim, Frame > &spacetime_normal_vector, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric, const tnsr::AA< DataType, SpatialDim, Frame > &inverse_spacetime_metric, const tnsr::aa< DataType, SpatialDim, Frame > &pi, const tnsr::iaa< DataType, SpatialDim, Frame > &phi) |
Compute | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | deriv_spatial_metric (gsl::not_null< tnsr::ijj< DataType, SpatialDim, Frame > * > d_spatial_metric, const tnsr::iaa< DataType, SpatialDim, Frame > &phi) |
Computes spatial derivatives of the spatial metric from the generalized harmonic spatial derivative variable. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::ijj< DataType, SpatialDim, Frame > | deriv_spatial_metric (const tnsr::iaa< DataType, SpatialDim, Frame > &phi) |
Computes spatial derivatives of the spatial metric from the generalized harmonic spatial derivative variable. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | extrinsic_curvature (gsl::not_null< tnsr::ii< DataType, SpatialDim, Frame > * > ex_curv, const tnsr::A< DataType, SpatialDim, Frame > &spacetime_normal_vector, const tnsr::aa< DataType, SpatialDim, Frame > &pi, const tnsr::iaa< DataType, SpatialDim, Frame > &phi) |
Computes extrinsic curvature from generalized harmonic variables and the spacetime normal vector. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::ii< DataType, SpatialDim, Frame > | extrinsic_curvature (const tnsr::A< DataType, SpatialDim, Frame > &spacetime_normal_vector, const tnsr::aa< DataType, SpatialDim, Frame > &pi, const tnsr::iaa< DataType, SpatialDim, Frame > &phi) |
Computes extrinsic curvature from generalized harmonic variables and the spacetime normal vector. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | gauge_source (gsl::not_null< tnsr::a< DataType, SpatialDim, Frame > * > gauge_source_h, const Scalar< DataType > &lapse, const Scalar< DataType > &dt_lapse, const tnsr::i< DataType, SpatialDim, Frame > &deriv_lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::I< DataType, SpatialDim, Frame > &dt_shift, const tnsr::iJ< DataType, SpatialDim, Frame > &deriv_shift, const tnsr::ii< DataType, SpatialDim, Frame > &spatial_metric, const Scalar< DataType > &trace_extrinsic_curvature, const tnsr::i< DataType, SpatialDim, Frame > &trace_christoffel_last_indices) |
Computes generalized harmonic gauge source function. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::a< DataType, SpatialDim, Frame > | gauge_source (const Scalar< DataType > &lapse, const Scalar< DataType > &dt_lapse, const tnsr::i< DataType, SpatialDim, Frame > &deriv_lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::I< DataType, SpatialDim, Frame > &dt_shift, const tnsr::iJ< DataType, SpatialDim, Frame > &deriv_shift, const tnsr::ii< DataType, SpatialDim, Frame > &spatial_metric, const Scalar< DataType > &trace_extrinsic_curvature, const tnsr::i< DataType, SpatialDim, Frame > &trace_christoffel_last_indices) |
Computes generalized harmonic gauge source function. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | phi (gsl::not_null< tnsr::iaa< DataType, SpatialDim, Frame > * > phi, const Scalar< DataType > &lapse, const tnsr::i< DataType, SpatialDim, Frame > &deriv_lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::iJ< DataType, SpatialDim, Frame > &deriv_shift, const tnsr::ii< DataType, SpatialDim, Frame > &spatial_metric, const tnsr::ijj< DataType, SpatialDim, Frame > &deriv_spatial_metric) |
Computes the auxiliary variable | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::iaa< DataType, SpatialDim, Frame > | phi (const Scalar< DataType > &lapse, const tnsr::i< DataType, SpatialDim, Frame > &deriv_lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::iJ< DataType, SpatialDim, Frame > &deriv_shift, const tnsr::ii< DataType, SpatialDim, Frame > &spatial_metric, const tnsr::ijj< DataType, SpatialDim, Frame > &deriv_spatial_metric) |
Computes the auxiliary variable | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | pi (gsl::not_null< tnsr::aa< DataType, SpatialDim, Frame > * > pi, const Scalar< DataType > &lapse, const Scalar< DataType > &dt_lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::I< DataType, SpatialDim, Frame > &dt_shift, const tnsr::ii< DataType, SpatialDim, Frame > &spatial_metric, const tnsr::ii< DataType, SpatialDim, Frame > &dt_spatial_metric, const tnsr::iaa< DataType, SpatialDim, Frame > &phi) |
Computes the conjugate momentum | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::aa< DataType, SpatialDim, Frame > | pi (const Scalar< DataType > &lapse, const Scalar< DataType > &dt_lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::I< DataType, SpatialDim, Frame > &dt_shift, const tnsr::ii< DataType, SpatialDim, Frame > &spatial_metric, const tnsr::ii< DataType, SpatialDim, Frame > &dt_spatial_metric, const tnsr::iaa< DataType, SpatialDim, Frame > &phi) |
Computes the conjugate momentum | |
template<typename DataType , size_t VolumeDim, typename Frame > | |
void | spatial_ricci_tensor (gsl::not_null< tnsr::ii< DataType, VolumeDim, Frame > * > ricci, const tnsr::iaa< DataType, VolumeDim, Frame > &phi, const tnsr::ijaa< DataType, VolumeDim, Frame > &deriv_phi, const tnsr::II< DataType, VolumeDim, Frame > &inverse_spatial_metric) |
Compute spatial Ricci tensor using evolved variables and their first derivatives. More... | |
template<typename DataType , size_t VolumeDim, typename Frame > | |
tnsr::ii< DataType, VolumeDim, Frame > | spatial_ricci_tensor (const tnsr::iaa< DataType, VolumeDim, Frame > &phi, const tnsr::ijaa< DataType, VolumeDim, Frame > &deriv_phi, const tnsr::II< DataType, VolumeDim, Frame > &inverse_spatial_metric) |
Compute spatial Ricci tensor using evolved variables and their first derivatives. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | second_time_deriv_of_spacetime_metric (gsl::not_null< tnsr::aa< DataType, SpatialDim, Frame > * > d2t2_spacetime_metric, const Scalar< DataType > &lapse, const Scalar< DataType > &dt_lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::I< DataType, SpatialDim, Frame > &dt_shift, const tnsr::iaa< DataType, SpatialDim, Frame > &phi, const tnsr::iaa< DataType, SpatialDim, Frame > &dt_phi, const tnsr::aa< DataType, SpatialDim, Frame > &pi, const tnsr::aa< DataType, SpatialDim, Frame > &dt_pi) |
Computes the second time derivative of the spacetime metric from the generalized harmonic variables, lapse, shift, and the spacetime unit normal 1-form. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::aa< DataType, SpatialDim, Frame > | second_time_deriv_of_spacetime_metric (const Scalar< DataType > &lapse, const Scalar< DataType > &dt_lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::I< DataType, SpatialDim, Frame > &dt_shift, const tnsr::iaa< DataType, SpatialDim, Frame > &phi, const tnsr::iaa< DataType, SpatialDim, Frame > &dt_phi, const tnsr::aa< DataType, SpatialDim, Frame > &pi, const tnsr::aa< DataType, SpatialDim, Frame > &dt_pi) |
Computes the second time derivative of the spacetime metric from the generalized harmonic variables, lapse, shift, and the spacetime unit normal 1-form. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | spacetime_deriv_of_det_spatial_metric (gsl::not_null< tnsr::a< DataType, SpatialDim, Frame > * > d4_det_spatial_metric, const Scalar< DataType > &sqrt_det_spatial_metric, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric, const tnsr::ii< DataType, SpatialDim, Frame > &dt_spatial_metric, const tnsr::iaa< DataType, SpatialDim, Frame > &phi) |
Computes spacetime derivatives of the determinant of spatial metric, using the generalized harmonic variables, spatial metric, and its time derivative. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::a< DataType, SpatialDim, Frame > | spacetime_deriv_of_det_spatial_metric (const Scalar< DataType > &sqrt_det_spatial_metric, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric, const tnsr::ii< DataType, SpatialDim, Frame > &dt_spatial_metric, const tnsr::iaa< DataType, SpatialDim, Frame > &phi) |
Computes spacetime derivatives of the determinant of spatial metric, using the generalized harmonic variables, spatial metric, and its time derivative. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | spacetime_deriv_of_norm_of_shift (gsl::not_null< tnsr::a< DataType, SpatialDim, Frame > * > d4_norm_of_shift, const Scalar< DataType > &lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::ii< DataType, SpatialDim, Frame > &spatial_metric, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric, const tnsr::AA< DataType, SpatialDim, Frame > &inverse_spacetime_metric, const tnsr::A< DataType, SpatialDim, Frame > &spacetime_unit_normal, const tnsr::iaa< DataType, SpatialDim, Frame > &phi, const tnsr::aa< DataType, SpatialDim, Frame > &pi) |
Computes spacetime derivatives of the norm of the shift vector. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::a< DataType, SpatialDim, Frame > | spacetime_deriv_of_norm_of_shift (const Scalar< DataType > &lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::ii< DataType, SpatialDim, Frame > &spatial_metric, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric, const tnsr::AA< DataType, SpatialDim, Frame > &inverse_spacetime_metric, const tnsr::A< DataType, SpatialDim, Frame > &spacetime_unit_normal, const tnsr::iaa< DataType, SpatialDim, Frame > &phi, const tnsr::aa< DataType, SpatialDim, Frame > &pi) |
Computes spacetime derivatives of the norm of the shift vector. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | spatial_deriv_of_lapse (gsl::not_null< tnsr::i< DataType, SpatialDim, Frame > * > deriv_lapse, const Scalar< DataType > &lapse, const tnsr::A< DataType, SpatialDim, Frame > &spacetime_unit_normal, const tnsr::iaa< DataType, SpatialDim, Frame > &phi) |
Computes spatial derivatives of lapse ( | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::i< DataType, SpatialDim, Frame > | spatial_deriv_of_lapse (const Scalar< DataType > &lapse, const tnsr::A< DataType, SpatialDim, Frame > &spacetime_unit_normal, const tnsr::iaa< DataType, SpatialDim, Frame > &phi) |
Computes spatial derivatives of lapse ( | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | spatial_deriv_of_shift (gsl::not_null< tnsr::iJ< DataType, SpatialDim, Frame > * > deriv_shift, const Scalar< DataType > &lapse, const tnsr::AA< DataType, SpatialDim, Frame > &inverse_spacetime_metric, const tnsr::A< DataType, SpatialDim, Frame > &spacetime_unit_normal, const tnsr::iaa< DataType, SpatialDim, Frame > &phi) |
Computes spatial derivatives of the shift vector from the generalized harmonic and geometric variables. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::iJ< DataType, SpatialDim, Frame > | spatial_deriv_of_shift (const Scalar< DataType > &lapse, const tnsr::AA< DataType, SpatialDim, Frame > &inverse_spacetime_metric, const tnsr::A< DataType, SpatialDim, Frame > &spacetime_unit_normal, const tnsr::iaa< DataType, SpatialDim, Frame > &phi) |
Computes spatial derivatives of the shift vector from the generalized harmonic and geometric variables. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | time_derivative_of_spacetime_metric (gsl::not_null< tnsr::aa< DataType, SpatialDim, Frame > * > dt_spacetime_metric, const Scalar< DataType > &lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::aa< DataType, SpatialDim, Frame > &pi, const tnsr::iaa< DataType, SpatialDim, Frame > &phi) |
Computes the time derivative of the spacetime metric from the generalized harmonic quantities | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::aa< DataType, SpatialDim, Frame > | time_derivative_of_spacetime_metric (const Scalar< DataType > &lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::aa< DataType, SpatialDim, Frame > &pi, const tnsr::iaa< DataType, SpatialDim, Frame > &phi) |
Computes the time derivative of the spacetime metric from the generalized harmonic quantities | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | time_deriv_of_lapse (gsl::not_null< Scalar< DataType > * > dt_lapse, const Scalar< DataType > &lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::A< DataType, SpatialDim, Frame > &spacetime_unit_normal, const tnsr::iaa< DataType, SpatialDim, Frame > &phi, const tnsr::aa< DataType, SpatialDim, Frame > &pi) |
Computes time derivative of lapse ( | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
Scalar< DataType > | time_deriv_of_lapse (const Scalar< DataType > &lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::A< DataType, SpatialDim, Frame > &spacetime_unit_normal, const tnsr::iaa< DataType, SpatialDim, Frame > &phi, const tnsr::aa< DataType, SpatialDim, Frame > &pi) |
Computes time derivative of lapse ( | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | time_deriv_of_lower_shift (gsl::not_null< tnsr::i< DataType, SpatialDim, Frame > * > dt_lower_shift, const Scalar< DataType > &lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::ii< DataType, SpatialDim, Frame > &spatial_metric, const tnsr::A< DataType, SpatialDim, Frame > &spacetime_unit_normal, const tnsr::iaa< DataType, SpatialDim, Frame > &phi, const tnsr::aa< DataType, SpatialDim, Frame > &pi) |
Computes time derivative of index lowered shift from generalized harmonic variables, spatial metric and its time derivative. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::i< DataType, SpatialDim, Frame > | time_deriv_of_lower_shift (const Scalar< DataType > &lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::ii< DataType, SpatialDim, Frame > &spatial_metric, const tnsr::A< DataType, SpatialDim, Frame > &spacetime_unit_normal, const tnsr::iaa< DataType, SpatialDim, Frame > &phi, const tnsr::aa< DataType, SpatialDim, Frame > &pi) |
Computes time derivative of index lowered shift from generalized harmonic variables, spatial metric and its time derivative. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | time_deriv_of_shift (gsl::not_null< tnsr::I< DataType, SpatialDim, Frame > * > dt_shift, const Scalar< DataType > &lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric, const tnsr::A< DataType, SpatialDim, Frame > &spacetime_unit_normal, const tnsr::iaa< DataType, SpatialDim, Frame > &phi, const tnsr::aa< DataType, SpatialDim, Frame > &pi) |
Computes time derivative of the shift vector from the generalized harmonic and geometric variables. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::I< DataType, SpatialDim, Frame > | time_deriv_of_shift (const Scalar< DataType > &lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric, const tnsr::A< DataType, SpatialDim, Frame > &spacetime_unit_normal, const tnsr::iaa< DataType, SpatialDim, Frame > &phi, const tnsr::aa< DataType, SpatialDim, Frame > &pi) |
Computes time derivative of the shift vector from the generalized harmonic and geometric variables. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | time_deriv_of_spatial_metric (gsl::not_null< tnsr::ii< DataType, SpatialDim, Frame > * > dt_spatial_metric, const Scalar< DataType > &lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::iaa< DataType, SpatialDim, Frame > &phi, const tnsr::aa< DataType, SpatialDim, Frame > &pi) |
Computes time derivative of the spatial metric. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::ii< DataType, SpatialDim, Frame > | time_deriv_of_spatial_metric (const Scalar< DataType > &lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::iaa< DataType, SpatialDim, Frame > &phi, const tnsr::aa< DataType, SpatialDim, Frame > &pi) |
Computes time derivative of the spatial metric. More... | |
Items related to evolving the first-order generalized harmonic system.
Tags::CharacteristicFields< DataVector, Dim, Frame >::type gh::characteristic_fields | ( | const Scalar< DataVector > & | gamma_2, |
const tnsr::II< DataVector, Dim, Frame > & | inverse_spatial_metric, | ||
const tnsr::aa< DataVector, Dim, Frame > & | spacetime_metric, | ||
const tnsr::aa< DataVector, Dim, Frame > & | pi, | ||
const tnsr::iaa< DataVector, Dim, Frame > & | phi, | ||
const tnsr::i< DataVector, Dim, Frame > & | unit_normal_one_form | ||
) |
Computes characteristic fields from evolved fields.
CharacteristicFieldsCompute and EvolvedFieldsFromCharacteristicFieldsCompute convert between characteristic and evolved fields for the generalized harmonic system.
CharacteristicFieldsCompute computes characteristic fields as described in "A New Generalized Harmonic Evolution System" by Lindblom et. al [123] . Their names used here differ from this paper:
The characteristic fields
where
EvolvedFieldsFromCharacteristicFieldsCompute computes evolved fields
The corresponding characteristic speeds
void gh::characteristic_fields | ( | gsl::not_null< typename Tags::CharacteristicFields< DataVector, Dim, Frame >::type * > | char_fields, |
const Scalar< DataVector > & | gamma_2, | ||
const tnsr::II< DataVector, Dim, Frame > & | inverse_spatial_metric, | ||
const tnsr::aa< DataVector, Dim, Frame > & | spacetime_metric, | ||
const tnsr::aa< DataVector, Dim, Frame > & | pi, | ||
const tnsr::iaa< DataVector, Dim, Frame > & | phi, | ||
const tnsr::i< DataVector, Dim, Frame > & | unit_normal_one_form | ||
) |
Computes characteristic fields from evolved fields.
CharacteristicFieldsCompute and EvolvedFieldsFromCharacteristicFieldsCompute convert between characteristic and evolved fields for the generalized harmonic system.
CharacteristicFieldsCompute computes characteristic fields as described in "A New Generalized Harmonic Evolution System" by Lindblom et. al [123] . Their names used here differ from this paper:
The characteristic fields
where
EvolvedFieldsFromCharacteristicFieldsCompute computes evolved fields
The corresponding characteristic speeds
std::array< DataVector, 4 > gh::characteristic_speeds | ( | const Scalar< DataVector > & | gamma_1, |
const Scalar< DataVector > & | lapse, | ||
const tnsr::I< DataVector, Dim, Frame > & | shift, | ||
const tnsr::i< DataVector, Dim, Frame > & | unit_normal_one_form, | ||
const std::optional< tnsr::I< DataVector, Dim, Frame > > & | mesh_velocity | ||
) |
Compute the characteristic speeds for the generalized harmonic system.
Computes the speeds as described in "A New Generalized Harmonic Evolution System" by Lindblom et. al [123] [see text following Eq.(34)]. The characteristic fields' names used here differ from this paper:
The corresponding characteristic speeds
where
void gh::characteristic_speeds | ( | gsl::not_null< std::array< DataVector, 4 > * > | char_speeds, |
const Scalar< DataVector > & | gamma_1, | ||
const Scalar< DataVector > & | lapse, | ||
const tnsr::I< DataVector, Dim, Frame > & | shift, | ||
const tnsr::i< DataVector, Dim, Frame > & | unit_normal_one_form, | ||
const std::optional< tnsr::I< DataVector, Dim, Frame > > & | mesh_velocity | ||
) |
Compute the characteristic speeds for the generalized harmonic system.
Computes the speeds as described in "A New Generalized Harmonic Evolution System" by Lindblom et. al [123] [see text following Eq.(34)]. The characteristic fields' names used here differ from this paper:
The corresponding characteristic speeds
where
Scalar< DataType > gh::constraint_energy | ( | const tnsr::a< DataType, SpatialDim, Frame > & | gauge_constraint, |
const tnsr::a< DataType, SpatialDim, Frame > & | f_constraint, | ||
const tnsr::ia< DataType, SpatialDim, Frame > & | two_index_constraint, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | three_index_constraint, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | four_index_constraint, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric, | ||
const Scalar< DataType > & | spatial_metric_determinant, | ||
double | gauge_constraint_multiplier = 1.0 , |
||
double | two_index_constraint_multiplier = 1.0 , |
||
double | three_index_constraint_multiplier = 1.0 , |
||
double | four_index_constraint_multiplier = 1.0 |
||
) |
Computes the generalized-harmonic (unnormalized) constraint energy.
Computes the generalized-harmonic unnormalized constraint energy [Eq. (53) of [123] with
Here
Also note that the argument four_index_constraint
is a rank-3 tensor. This is because gh::four_index_constraint()
takes advantage of the antisymmetry of the four-index constraint's first two indices to only compute and return the independent components of
where
where
To derive this expression for the constraint energy implemented here, Eq.~(53) of [123] is
Replace
Here
Adopting a Euclidean norm for the constraint space (i.e., choosing to raise and lower spacetime indices with Kronecker deltas) gives
The two-index constraint and f constraint can be viewed as the time and space components of a combined spacetime constraint. So next choose
Note that
The inverse relationship is
where
There's a subtle point here:
Then we can write the constraint energy as
The factors of
or
or, reversing up and down repeated indices again,
The metric raises and lowers the indices of
Now, in flat space (Eq. (1.23) of [190]),
But this holds for curved space as well: multiply the left hand side by
So the constraint energy is
Simplifying gives the formula implemented here:
void gh::constraint_energy | ( | gsl::not_null< Scalar< DataType > * > | energy, |
const tnsr::a< DataType, SpatialDim, Frame > & | gauge_constraint, | ||
const tnsr::a< DataType, SpatialDim, Frame > & | f_constraint, | ||
const tnsr::ia< DataType, SpatialDim, Frame > & | two_index_constraint, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | three_index_constraint, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | four_index_constraint, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric, | ||
const Scalar< DataType > & | spatial_metric_determinant, | ||
double | gauge_constraint_multiplier = 1.0 , |
||
double | two_index_constraint_multiplier = 1.0 , |
||
double | three_index_constraint_multiplier = 1.0 , |
||
double | four_index_constraint_multiplier = 1.0 |
||
) |
Computes the generalized-harmonic (unnormalized) constraint energy.
Computes the generalized-harmonic unnormalized constraint energy [Eq. (53) of [123] with
Here
Also note that the argument four_index_constraint
is a rank-3 tensor. This is because gh::four_index_constraint()
takes advantage of the antisymmetry of the four-index constraint's first two indices to only compute and return the independent components of
where
where
To derive this expression for the constraint energy implemented here, Eq.~(53) of [123] is
Replace
Here
Adopting a Euclidean norm for the constraint space (i.e., choosing to raise and lower spacetime indices with Kronecker deltas) gives
The two-index constraint and f constraint can be viewed as the time and space components of a combined spacetime constraint. So next choose
Note that
The inverse relationship is
where
There's a subtle point here:
Then we can write the constraint energy as
The factors of
or
or, reversing up and down repeated indices again,
The metric raises and lowers the indices of
Now, in flat space (Eq. (1.23) of [190]),
But this holds for curved space as well: multiply the left hand side by
So the constraint energy is
Simplifying gives the formula implemented here:
Scalar< DataType > gh::constraint_energy_normalization | ( | const tnsr::iaa< DataType, SpatialDim, Frame > & | d_spacetime_metric, |
const tnsr::iaa< DataType, SpatialDim, Frame > & | d_pi, | ||
const tnsr::ijaa< DataType, SpatialDim, Frame > & | d_phi, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric, | ||
const Scalar< DataType > & | sqrt_spatial_metric_determinant, | ||
double | dimensional_constant | ||
) |
Computes the generalized-harmonic normalized constraint energy.
Computes the generalized-harmonic normalized constraint energy integrand [Eq. (70) of [123] with
Here
void gh::constraint_energy_normalization | ( | gsl::not_null< Scalar< DataType > * > | energy_norm, |
const tnsr::iaa< DataType, SpatialDim, Frame > & | d_spacetime_metric, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | d_pi, | ||
const tnsr::ijaa< DataType, SpatialDim, Frame > & | d_phi, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric, | ||
const Scalar< DataType > & | sqrt_spatial_metric_determinant, | ||
double | dimensional_constant | ||
) |
Computes the generalized-harmonic normalized constraint energy.
Computes the generalized-harmonic normalized constraint energy integrand [Eq. (70) of [123] with
Here
tnsr::a< DataType, SpatialDim, Frame > gh::f_constraint | ( | const tnsr::a< DataType, SpatialDim, Frame > & | gauge_function, |
const tnsr::ab< DataType, SpatialDim, Frame > & | spacetime_d_gauge_function, | ||
const tnsr::a< DataType, SpatialDim, Frame > & | spacetime_normal_one_form, | ||
const tnsr::A< DataType, SpatialDim, Frame > & | spacetime_normal_vector, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric, | ||
const tnsr::AA< DataType, SpatialDim, Frame > & | inverse_spacetime_metric, | ||
const tnsr::aa< DataType, SpatialDim, Frame > & | pi, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | d_pi, | ||
const tnsr::ijaa< DataType, SpatialDim, Frame > & | d_phi, | ||
const Scalar< DataType > & | gamma2, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | three_index_constraint | ||
) |
Computes the generalized-harmonic F constraint.
Computes the generalized-harmonic F constraint [Eq. (43) of [123]],
where
To justify the stress-energy contribution to the F constraint, note that the stress-energy tensor appears in the dynamics of the Generalized Harmonic system only through
where
.
Therefore, the Stress-energy contribution can be calculated from the trace-reversed contribution appearing in grmhd::GhValenciaDivClean::add_stress_energy_term_to_dt_pi
– the trace reversal in that function and the trace-reversal that appears explicitly in
tnsr::a< DataType, SpatialDim, Frame > gh::f_constraint | ( | const tnsr::a< DataType, SpatialDim, Frame > & | gauge_function, |
const tnsr::ab< DataType, SpatialDim, Frame > & | spacetime_d_gauge_function, | ||
const tnsr::a< DataType, SpatialDim, Frame > & | spacetime_normal_one_form, | ||
const tnsr::A< DataType, SpatialDim, Frame > & | spacetime_normal_vector, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric, | ||
const tnsr::AA< DataType, SpatialDim, Frame > & | inverse_spacetime_metric, | ||
const tnsr::aa< DataType, SpatialDim, Frame > & | pi, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | d_pi, | ||
const tnsr::ijaa< DataType, SpatialDim, Frame > & | d_phi, | ||
const Scalar< DataType > & | gamma2, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | three_index_constraint, | ||
const tnsr::aa< DataType, SpatialDim, Frame > & | trace_reversed_stress_energy | ||
) |
Computes the generalized-harmonic F constraint.
Computes the generalized-harmonic F constraint [Eq. (43) of [123]],
where
To justify the stress-energy contribution to the F constraint, note that the stress-energy tensor appears in the dynamics of the Generalized Harmonic system only through
where
.
Therefore, the Stress-energy contribution can be calculated from the trace-reversed contribution appearing in grmhd::GhValenciaDivClean::add_stress_energy_term_to_dt_pi
– the trace reversal in that function and the trace-reversal that appears explicitly in
void gh::f_constraint | ( | gsl::not_null< tnsr::a< DataType, SpatialDim, Frame > * > | constraint, |
const tnsr::a< DataType, SpatialDim, Frame > & | gauge_function, | ||
const tnsr::ab< DataType, SpatialDim, Frame > & | spacetime_d_gauge_function, | ||
const tnsr::a< DataType, SpatialDim, Frame > & | spacetime_normal_one_form, | ||
const tnsr::A< DataType, SpatialDim, Frame > & | spacetime_normal_vector, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric, | ||
const tnsr::AA< DataType, SpatialDim, Frame > & | inverse_spacetime_metric, | ||
const tnsr::aa< DataType, SpatialDim, Frame > & | pi, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | d_pi, | ||
const tnsr::ijaa< DataType, SpatialDim, Frame > & | d_phi, | ||
const Scalar< DataType > & | gamma2, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | three_index_constraint | ||
) |
Computes the generalized-harmonic F constraint.
Computes the generalized-harmonic F constraint [Eq. (43) of [123]],
where
To justify the stress-energy contribution to the F constraint, note that the stress-energy tensor appears in the dynamics of the Generalized Harmonic system only through
where
.
Therefore, the Stress-energy contribution can be calculated from the trace-reversed contribution appearing in grmhd::GhValenciaDivClean::add_stress_energy_term_to_dt_pi
– the trace reversal in that function and the trace-reversal that appears explicitly in
void gh::f_constraint | ( | gsl::not_null< tnsr::a< DataType, SpatialDim, Frame > * > | constraint, |
const tnsr::a< DataType, SpatialDim, Frame > & | gauge_function, | ||
const tnsr::ab< DataType, SpatialDim, Frame > & | spacetime_d_gauge_function, | ||
const tnsr::a< DataType, SpatialDim, Frame > & | spacetime_normal_one_form, | ||
const tnsr::A< DataType, SpatialDim, Frame > & | spacetime_normal_vector, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric, | ||
const tnsr::AA< DataType, SpatialDim, Frame > & | inverse_spacetime_metric, | ||
const tnsr::aa< DataType, SpatialDim, Frame > & | pi, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | d_pi, | ||
const tnsr::ijaa< DataType, SpatialDim, Frame > & | d_phi, | ||
const Scalar< DataType > & | gamma2, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | three_index_constraint, | ||
const tnsr::aa< DataType, SpatialDim, Frame > & | trace_reversed_stress_energy | ||
) |
Computes the generalized-harmonic F constraint.
Computes the generalized-harmonic F constraint [Eq. (43) of [123]],
where
To justify the stress-energy contribution to the F constraint, note that the stress-energy tensor appears in the dynamics of the Generalized Harmonic system only through
where
.
Therefore, the Stress-energy contribution can be calculated from the trace-reversed contribution appearing in grmhd::GhValenciaDivClean::add_stress_energy_term_to_dt_pi
– the trace reversal in that function and the trace-reversal that appears explicitly in
tnsr::iaa< DataType, SpatialDim, Frame > gh::four_index_constraint | ( | const tnsr::ijaa< DataType, SpatialDim, Frame > & | d_phi | ) |
Computes the generalized-harmonic 4-index constraint.
Computes the independent components of the generalized-harmonic 4-index constraint. The constraint itself is given by Eq. (45) of [123],
where
where
void gh::four_index_constraint | ( | gsl::not_null< tnsr::iaa< DataType, SpatialDim, Frame > * > | constraint, |
const tnsr::ijaa< DataType, SpatialDim, Frame > & | d_phi | ||
) |
Computes the generalized-harmonic 4-index constraint.
Computes the independent components of the generalized-harmonic 4-index constraint. The constraint itself is given by Eq. (45) of [123],
where
where
tnsr::a< DataType, SpatialDim, Frame > gh::gauge_constraint | ( | const tnsr::a< DataType, SpatialDim, Frame > & | gauge_function, |
const tnsr::a< DataType, SpatialDim, Frame > & | spacetime_normal_one_form, | ||
const tnsr::A< DataType, SpatialDim, Frame > & | spacetime_normal_vector, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric, | ||
const tnsr::AA< DataType, SpatialDim, Frame > & | inverse_spacetime_metric, | ||
const tnsr::aa< DataType, SpatialDim, Frame > & | pi, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi | ||
) |
Computes the generalized-harmonic gauge constraint.
Computes the generalized-harmonic gauge constraint [Eq. (40) of [123]],
where
void gh::gauge_constraint | ( | gsl::not_null< tnsr::a< DataType, SpatialDim, Frame > * > | constraint, |
const tnsr::a< DataType, SpatialDim, Frame > & | gauge_function, | ||
const tnsr::a< DataType, SpatialDim, Frame > & | spacetime_normal_one_form, | ||
const tnsr::A< DataType, SpatialDim, Frame > & | spacetime_normal_vector, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric, | ||
const tnsr::AA< DataType, SpatialDim, Frame > & | inverse_spacetime_metric, | ||
const tnsr::aa< DataType, SpatialDim, Frame > & | pi, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi | ||
) |
Computes the generalized-harmonic gauge constraint.
Computes the generalized-harmonic gauge constraint [Eq. (40) of [123]],
where
void gh::initial_gh_variables_from_adm | ( | gsl::not_null< tnsr::aa< DataVector, Dim > * > | spacetime_metric, |
gsl::not_null< tnsr::aa< DataVector, Dim > * > | pi, | ||
gsl::not_null< tnsr::iaa< DataVector, Dim > * > | phi, | ||
const tnsr::ii< DataVector, Dim > & | spatial_metric, | ||
const Scalar< DataVector > & | lapse, | ||
const tnsr::I< DataVector, Dim > & | shift, | ||
const tnsr::ii< DataVector, Dim > & | extrinsic_curvature, | ||
const Mesh< Dim > & | mesh, | ||
const InverseJacobian< DataVector, Dim, Frame::ElementLogical, Frame::Inertial > & | inv_jacobian | ||
) |
Compute initial GH variables from ADM variables.
gr::spacetime_metric
for details.gh::gauges::SetPiAndPhiFromConstraints
mutator exists to override Pi later in the algorithm (it should be combined with this function). tnsr::iaa< DataType, SpatialDim, Frame > gh::three_index_constraint | ( | const tnsr::iaa< DataType, SpatialDim, Frame > & | d_spacetime_metric, |
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi | ||
) |
Computes the generalized-harmonic 3-index constraint.
Computes the generalized-harmonic 3-index constraint,
void gh::three_index_constraint | ( | gsl::not_null< tnsr::iaa< DataType, SpatialDim, Frame > * > | constraint, |
const tnsr::iaa< DataType, SpatialDim, Frame > & | d_spacetime_metric, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi | ||
) |
Computes the generalized-harmonic 3-index constraint.
Computes the generalized-harmonic 3-index constraint,
tnsr::a< DataType, SpatialDim, Frame > gh::trace_christoffel | ( | const tnsr::a< DataType, SpatialDim, Frame > & | spacetime_normal_one_form, |
const tnsr::A< DataType, SpatialDim, Frame > & | spacetime_normal_vector, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric, | ||
const tnsr::AA< DataType, SpatialDim, Frame > & | inverse_spacetime_metric, | ||
const tnsr::aa< DataType, SpatialDim, Frame > & | pi, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi | ||
) |
void gh::trace_christoffel | ( | gsl::not_null< tnsr::a< DataType, SpatialDim, Frame > * > | trace, |
const tnsr::a< DataType, SpatialDim, Frame > & | spacetime_normal_one_form, | ||
const tnsr::A< DataType, SpatialDim, Frame > & | spacetime_normal_vector, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric, | ||
const tnsr::AA< DataType, SpatialDim, Frame > & | inverse_spacetime_metric, | ||
const tnsr::aa< DataType, SpatialDim, Frame > & | pi, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi | ||
) |
tnsr::ia< DataType, SpatialDim, Frame > gh::two_index_constraint | ( | const tnsr::ab< DataType, SpatialDim, Frame > & | spacetime_d_gauge_function, |
const tnsr::a< DataType, SpatialDim, Frame > & | spacetime_normal_one_form, | ||
const tnsr::A< DataType, SpatialDim, Frame > & | spacetime_normal_vector, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric, | ||
const tnsr::AA< DataType, SpatialDim, Frame > & | inverse_spacetime_metric, | ||
const tnsr::aa< DataType, SpatialDim, Frame > & | pi, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | d_pi, | ||
const tnsr::ijaa< DataType, SpatialDim, Frame > & | d_phi, | ||
const Scalar< DataType > & | gamma2, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | three_index_constraint | ||
) |
Computes the generalized-harmonic 2-index constraint.
Computes the generalized-harmonic 2-index constraint [Eq. (44) of [123]],
where
void gh::two_index_constraint | ( | gsl::not_null< tnsr::ia< DataType, SpatialDim, Frame > * > | constraint, |
const tnsr::ab< DataType, SpatialDim, Frame > & | spacetime_d_gauge_function, | ||
const tnsr::a< DataType, SpatialDim, Frame > & | spacetime_normal_one_form, | ||
const tnsr::A< DataType, SpatialDim, Frame > & | spacetime_normal_vector, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric, | ||
const tnsr::AA< DataType, SpatialDim, Frame > & | inverse_spacetime_metric, | ||
const tnsr::aa< DataType, SpatialDim, Frame > & | pi, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | d_pi, | ||
const tnsr::ijaa< DataType, SpatialDim, Frame > & | d_phi, | ||
const Scalar< DataType > & | gamma2, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | three_index_constraint | ||
) |
Computes the generalized-harmonic 2-index constraint.
Computes the generalized-harmonic 2-index constraint [Eq. (44) of [123]],
where