Classes | Functions
GeneralizedHarmonic Namespace Reference

Items related to evolving the first-order generalized harmonic system. More...

Classes

struct  CharacteristicFieldsCompute
 Computes characteristic fields from evolved fields. More...
 
struct  CharacteristicSpeedsCompute
 Compute the characteristic speeds for the generalized harmonic system. More...
 
struct  ComputeDuDt
 Compute the RHS of the Generalized Harmonic formulation of Einstein's equations. More...
 
struct  ComputeNormalDotFluxes
 Compute the fluxes of the Generalized Harmonic formulation of Einstein's equations. More...
 
struct  EvolvedFieldsFromCharacteristicFieldsCompute
 For expressions used here to compute evolved fields from characteristic ones, see CharacteristicFieldsCompute. More...
 
struct  System
 

Functions

template<size_t Dim, typename Frame >
void compute_characteristic_speeds (const gsl::not_null< typename Tags::CharacteristicSpeeds< Dim, Frame >::type *> char_speeds, const Scalar< DataVector > &gamma_1, const Scalar< DataVector > &lapse, const tnsr::I< DataVector, Dim, Frame > &shift, const tnsr::i< DataVector, Dim, Frame > &normal) noexcept
 
template<size_t Dim, typename Frame >
void compute_characteristic_fields (const gsl::not_null< typename Tags::CharacteristicFields< Dim, Frame >::type *> char_fields, const Scalar< DataVector > &gamma_2, 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, const tnsr::I< DataVector, Dim, Frame > &unit_normal_vector) noexcept
 
template<size_t Dim, typename Frame >
void compute_evolved_fields_from_characteristic_fields (const gsl::not_null< typename Tags::EvolvedFieldsFromCharacteristicFields< 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) noexcept
 
template<size_t SpatialDim, typename Frame , typename DataType >
void three_index_constraint (const 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) noexcept
 
template<size_t SpatialDim, typename Frame , typename DataType >
void gauge_constraint (const 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) noexcept
 
template<size_t SpatialDim, typename Frame , typename DataType >
void two_index_constraint (const gsl::not_null< tnsr::ia< DataType, SpatialDim, Frame > *> constraint, const tnsr::ia< DataType, SpatialDim, Frame > &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) noexcept
 
template<size_t SpatialDim, typename Frame , typename DataType >
void four_index_constraint (const gsl::not_null< tnsr::iaa< DataType, SpatialDim, Frame > *> constraint, const tnsr::ijaa< DataType, SpatialDim, Frame > &d_phi) noexcept
 
template<size_t SpatialDim, typename Frame , typename DataType >
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) noexcept
 Computes the auxiliary variable \(\Phi_{iab}\) used by the generalized harmonic formulation of Einstein's equations. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
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) noexcept
 Computes the conjugate momentum \(\Pi_{ab}\) of the spacetime metric \( \psi_{ab} \). More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
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) noexcept
 Computes generalized harmonic gauge source function. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
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) noexcept
 Computes extrinsic curvature from generalized harmonic variables and the spacetime normal vector. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
void deriv_spatial_metric (const gsl::not_null< tnsr::ijj< DataType, SpatialDim, Frame > *> d_spatial_metric, const tnsr::iaa< DataType, SpatialDim, Frame > &phi) noexcept
 
template<size_t SpatialDim, typename Frame , typename DataType >
void spatial_deriv_of_lapse (const 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) noexcept
 
template<size_t SpatialDim, typename Frame , typename DataType >
void time_deriv_of_lapse (const 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) noexcept
 
template<size_t SpatialDim, typename Frame , typename DataType >
void time_deriv_of_spatial_metric (const 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) noexcept
 
template<size_t SpatialDim, typename Frame , typename DataType >
void spacetime_deriv_of_det_spatial_metric (const 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) noexcept
 
template<size_t SpatialDim, typename Frame , typename DataType >
void spatial_deriv_of_shift (const 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) noexcept
 
template<size_t SpatialDim, typename Frame , typename DataType >
void time_deriv_of_shift (const 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) noexcept
 
template<size_t SpatialDim, typename Frame , typename DataType >
void time_deriv_of_lower_shift (const 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) noexcept
 
template<size_t SpatialDim, typename Frame , typename DataType >
void spacetime_deriv_of_norm_of_shift (const 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) noexcept
 
template<size_t Dim, typename Frame >
void compute_characteristic_speeds (gsl::not_null< typename Tags::CharacteristicSpeeds< Dim, Frame >::type *> char_speeds, const Scalar< DataVector > &gamma_1, const Scalar< DataVector > &lapse, const tnsr::I< DataVector, Dim, Frame > &shift, const tnsr::i< DataVector, Dim, Frame > &normal) noexcept
 
template<size_t Dim, typename Frame >
void compute_characteristic_fields (gsl::not_null< typename Tags::CharacteristicFields< Dim, Frame >::type *> char_fields, const Scalar< DataVector > &gamma_2, 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, const tnsr::I< DataVector, Dim, Frame > &unit_normal_vector) noexcept
 
template<size_t Dim, typename Frame >
void compute_evolved_fields_from_characteristic_fields (gsl::not_null< typename Tags::EvolvedFieldsFromCharacteristicFields< 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) noexcept
 
template<size_t SpatialDim, typename Frame , typename DataType >
tnsr::iaa< DataType, SpatialDim, Frame > three_index_constraint (const tnsr::iaa< DataType, SpatialDim, Frame > &d_spacetime_metric, const tnsr::iaa< DataType, SpatialDim, Frame > &phi) noexcept
 Computes the generalized-harmonic 3-index constraint. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
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) noexcept
 Computes the generalized-harmonic 3-index constraint. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
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) noexcept
 Computes the generalized-harmonic gauge constraint. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
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) noexcept
 Computes the generalized-harmonic gauge constraint. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
tnsr::ia< DataType, SpatialDim, Frame > two_index_constraint (const tnsr::ia< DataType, SpatialDim, Frame > &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) noexcept
 Computes the generalized-harmonic 2-index constraint. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
void two_index_constraint (gsl::not_null< tnsr::ia< DataType, SpatialDim, Frame > *> constraint, const tnsr::ia< DataType, SpatialDim, Frame > &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) noexcept
 Computes the generalized-harmonic 2-index constraint. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
tnsr::iaa< DataType, SpatialDim, Frame > four_index_constraint (const tnsr::ijaa< DataType, SpatialDim, Frame > &d_phi) noexcept
 Computes the generalized-harmonic 4-index constraint. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
void four_index_constraint (gsl::not_null< tnsr::iaa< DataType, SpatialDim, Frame > *> constraint, const tnsr::ijaa< DataType, SpatialDim, Frame > &d_phi) noexcept
 Computes the generalized-harmonic 4-index constraint. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
tnsr::a< DataType, SpatialDim, Frame > f_constraint (const tnsr::a< DataType, SpatialDim, Frame > &gauge_function, const tnsr::ia< DataType, SpatialDim, Frame > &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) noexcept
 Computes the generalized-harmonic F constraint. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
void f_constraint (gsl::not_null< tnsr::a< DataType, SpatialDim, Frame > *> constraint, const tnsr::a< DataType, SpatialDim, Frame > &gauge_function, const tnsr::ia< DataType, SpatialDim, Frame > &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) noexcept
 Computes the generalized-harmonic F constraint. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
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) noexcept
 Computes the generalized-harmonic (unnormalized) constraint energy. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
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, double two_index_constraint_multiplier, double three_index_constraint_multiplier, double four_index_constraint_multiplier) noexcept
 Computes the generalized-harmonic (unnormalized) constraint energy. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
tnsr::ijj< DataType, SpatialDim, Frame > deriv_spatial_metric (const tnsr::iaa< DataType, SpatialDim, Frame > &phi) noexcept
 Computes spatial derivatives of the spatial metric from the generalized harmonic spatial derivative variable. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
void deriv_spatial_metric (gsl::not_null< tnsr::ijj< DataType, SpatialDim, Frame > *> d_spatial_metric, const tnsr::iaa< DataType, SpatialDim, Frame > &phi) noexcept
 Computes spatial derivatives of the spatial metric from the generalized harmonic spatial derivative variable. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
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) noexcept
 Computes spatial derivatives of lapse (N) from the generalized harmonic variables and spacetime unit normal 1-form. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
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) noexcept
 Computes spatial derivatives of lapse (N) from the generalized harmonic variables and spacetime unit normal 1-form. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
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) noexcept
 Computes time derivative of lapse (N) from the generalized harmonic variables, lapse, shift and the spacetime unit normal 1-form. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
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) noexcept
 Computes time derivative of lapse (N) from the generalized harmonic variables, lapse, shift and the spacetime unit normal 1-form. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
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) noexcept
 Computes time derivative of the spatial metric. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
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) noexcept
 Computes time derivative of the spatial metric. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
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) noexcept
 Computes spacetime derivatives of the determinant of spatial metric, using the generalized harmonic variables, spatial metric, and its time derivative. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
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) noexcept
 Computes spacetime derivatives of the determinant of spatial metric, using the generalized harmonic variables, spatial metric, and its time derivative. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
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) noexcept
 Computes spatial derivatives of the shift vector from the generalized harmonic and geometric variables. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
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) noexcept
 Computes spatial derivatives of the shift vector from the generalized harmonic and geometric variables. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
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) noexcept
 Computes time derivative of the shift vector from the generalized harmonic and geometric variables. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
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) noexcept
 Computes time derivative of the shift vector from the generalized harmonic and geometric variables. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
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) noexcept
 Computes time derivative of index lowered shift from generalized harmonic variables, spatial metric and its time derivative. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
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) noexcept
 Computes time derivative of index lowered shift from generalized harmonic variables, spatial metric and its time derivative. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
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) noexcept
 Computes spacetime derivatives of the norm of the shift vector. More...
 
template<size_t SpatialDim, typename Frame , typename DataType >
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) noexcept
 Computes spacetime derivatives of the norm of the shift vector. More...
 

Detailed Description

Items related to evolving the first-order generalized harmonic system.

Function Documentation

◆ constraint_energy() [1/2]

template<size_t SpatialDim, typename Frame , typename DataType >
Scalar< DataType > GeneralizedHarmonic::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 
)
noexcept

Computes the generalized-harmonic (unnormalized) constraint energy.

Details

Computes the generalized-harmonic unnormalized constraint energy [Eq. (53) of [18] with \(m^{ab}=\delta^{ab}\) and with each term in the sum scaled by an arbitrary coefficient],

\begin{eqnarray} E & = & K_1 C_a C_a + K_2\left(F_a F_a + C_{ia} C_{ja} g^{ij}\right)\nonumber\\ & + & K_3 C_{iab} C_{jab} g^{ij} + K_4 C_{ikab} C_{jlab}g^{ij} g^{kl}. \end{eqnarray}

Here \(C_a\) is the gauge constraint, \(F_a\) is the f constraint, \(C_{ia}\) is the two-index constraint, \(C_{iab}\) is the three-index constraint, \(C_{ikab}\) is the four-index constraint, \(g^{ij}\) is the inverse spatial metric, and \(K_1\), \(K_2\), \(K_3\), and \(K_4\) are constant multipliers for each term that each default to a value of 1.0. Note that in this equation, spacetime indices \(a,b\) are raised and lowered with the Kronecker delta.

Also note that the argument four_index_constraint is a rank-3 tensor. This is because GeneralizedHarmonic::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 \(C_{ijab}\), which can be written as

\begin{eqnarray} D_{iab} \equiv \frac{1}{2} \epsilon_{i}{}^{jk} C_{jkab}, \end{eqnarray}

where \(\epsilon_{ijk}\) is the flat-space Levi-Civita tensor, whose inidces are raised and lowered with the Kronecker delta. The result is

\begin{eqnarray} E & = & K_1 C_a C_a + K_2\left(F_a F_a + C_{ia} C_{ja} g^{ij}\right)\nonumber\\ & + & K_3 C_{iab} C_{jab} g^{ij}\nonumber\\ & + & 2 K_4 g D_{iab} D_{jab} g^{ij}, \end{eqnarray}

where \(g\) is the determinant of the spatial metric.

To derive this expression for the constraint energy implemented here, Eq.~(53) of [18] is

\begin{eqnarray} S_{AB} dc^A dc^B &=& m^{ab}\Bigl[d F_ad F_b +g^{ij}\bigl(d C_{ia}d C_{jb} +g^{kl}m^{cd}d C_{ikac}d C_{jlbd}\bigr) \nonumber\\ & + & \Lambda^2\bigl(d C_ad C_b +g^{ij}m^{cd}d C_{iac}d C_{jbd}\bigr) \Bigr]. \end{eqnarray}

Replace \(dc^A\rightarrow c^A\) to get

\begin{eqnarray} E&=& m^{ab}\Bigl[ F_a F_b +g^{ij}\bigl( C_{ia} C_{jb} +g^{kl}m^{cd} C_{ikac} C_{jlbd}\bigr) \nonumber\\ & + & \Lambda^2\bigl( C_a C_b +g^{ij}m^{cd} C_{iac} C_{jbd}\bigr) \Bigr]\nonumber\\ &=& m^{ab} F_a F_b +m^{ab}g^{ij} C_{ia} C_{jb} +m^{ab}g^{ij} g^{kl}m^{cd} C_{ikac} C_{jlbd} \nonumber\\ & + & m^{ab}\Lambda^2 C_a C_b +m^{ab}\Lambda^2 g^{ij}m^{cd} C_{iac} C_{jbd}. \end{eqnarray}

Here \(m^{ab}\) is an arbitrary positive-definite matrix, and \(\Lambda\) is an arbitrary real scalar. Choose \(m^{ab} = \delta^{ab}\) but allow an arbitrary coefficient to be placed in front of each term. Then, absorb \(\Lambda^2\) into one of these coefficients, to get

\begin{eqnarray} E &=& K_ F\delta^{ab} F_a F_b +K_2\delta^{ab}g^{ij} C_{ia} C_{jb} +K_4\delta^{ab}g^{ij} g^{kl}\delta^{cd} C_{ikac} C_{jlbd} \nonumber\\ & + & K_1\delta^{ab} C_a C_b +K_3\delta^{ab} g^{ij}\delta^{cd} C_{iac} C_{jbd}. \end{eqnarray}

Adopting a Euclidean norm for the constraint space (i.e., choosing to raise and lower spacetime indices with Kronecker deltas) gives

\begin{eqnarray} E &=& K_ F F_a F_a +K_2g^{ij} C_{ia} C_{ja} +K_4 g^{ij} g^{kl} C_{ikac} C_{jlac} \nonumber\\ & + & K_1 C_a C_a +K_3g^{ij} C_{iac} C_{jac}. \end{eqnarray}

The two-index constraint and f constraint can be viewed as the time and space components of a combined spacetime constraint. So next choose \(K_ F=K_2\), giving

\begin{eqnarray} E&=& K_1 C_a C_a + K_2\left(F_a F_a + C_{ia} C_{ja} g^{ij}\right)\nonumber\\ & + & K_3 C_{iab} C_{jab} g^{ij} + K_4 C_{ikab} C_{jlab}g^{ij} g^{kl}. \end{eqnarray}

Note that \(C_{ikab}\) is antisymmetric on the first two indices. Next, replace the four-index constraint \(C_{ijab}\) with \(D_{iab}\), which contains the independent components of \(C_{ijab}\). Specifically,

\begin{eqnarray} D_{iab} \equiv \frac{1}{2} \epsilon_{i}{}^{jk} C_{jkab}. \end{eqnarray}

The inverse relationship is

\begin{eqnarray} C_{jkab} = \epsilon^{i}{}_{jk} D_{iab}, \end{eqnarray}

where \(\epsilon_{ijk}\) is the flat-space Levi-Civita tensor, whose indices are raised and lowered with the Kronecker delta. Inserting this relation to replace \(C_{jkab}\) with \(D_{iab}\) gives

\begin{eqnarray} E &=& K_1 C_a C_a + K_2\left(F_a F_a + C_{ia} C_{ja} g^{ij}\right)\nonumber\\ & + & K_3 C_{iab} C_{jab} g^{ij}\nonumber\\ & + & K_4 D_{mab} D_{nab} \epsilon^{m}{}_{ik} \epsilon^{n}{}_{jl} g^{ij} g^{kl}. \end{eqnarray}

There's a subtle point here: \(g^{ij}\) is the inverse spatial metric, which is not necessarily flat. But \(\epsilon^{i}{}_{jk}\) is the flat space Levi-Civita tensor. In order to raise and lower indices of the Levi-Civita tensor with the inverse spatial metrics, put in the appropriate factors of \(\sqrt{g}\), where \(g\) is the metric determinant, to make the curved-space Levi-Civita tensor compatible with \(g^{ij}\). Let \(\varepsilon^{ijk}\) represent the curved space Levi-Civita tensor compatible with \(g^{ij}\):

\begin{eqnarray} \varepsilon^{mik} = g^{-1/2} \epsilon^{mik}\\ \varepsilon_{mik} = g^{1/2} \epsilon_{mik}. \end{eqnarray}

Then we can write the constraint energy as

\begin{eqnarray} E &=& K_1 C_a C_a + K_2\left(F_a F_a + C_{ia} C_{ja} g^{ij}\right)\nonumber\\ & + & K_3 C_{iab} C_{jab} g^{ij}\nonumber\\ & + & K_4 D_{mab} D_{nab} g g^{-1/2}\epsilon^{m}{}_{ik} g^{-1/2}\epsilon^{n}{}_{jl} g^{ij} g^{kl}. \end{eqnarray}

The factors of \(g^{-1/2}\) make the Levi-Civita tensor compatible with \(g^{ij}\). Swapping which summed indices are raised and which are lowered gives

\begin{eqnarray} E &=& K_1 C_a C_a + K_2\left(F_a F_a + C_{ia} C_{ja} g^{ij}\right)\nonumber\\ & + & K_3 C_{iab} C_{jab} g^{ij}\nonumber\\ & + & K_4 D_{mab} D_{nab} g g^{-1/2}\epsilon^{mik} g^{-1/2}\epsilon^{njl} g_{ij} g_{kl}, \end{eqnarray}

or

\begin{eqnarray} E &=& K_1 C_a C_a + K_2\left(F_a F_a + C_{ia} C_{ja} g^{ij}\right)\nonumber\\ & + & K_3 C_{iab} C_{jab} g^{ij}\nonumber\\ & + & K_4 D_{mab} D_{nab} g \varepsilon^{mik} \varepsilon^{njl} g_{ij} g_{kl}, \end{eqnarray}

or, reversing up and down repeated indices again,

\begin{eqnarray} E &=& K_1 C_a C_a + K_2\left(F_a F_a + C_{ia} C_{ja} g^{ij}\right)\nonumber\\ & + & K_3 C_{iab} C_{jab} g^{ij}\nonumber\\ & + & K_4 D_{mab} D_{nab} g \varepsilon^{m}{}_{ik} \varepsilon^{n}{}_{jl} g^{ij} g^{kl}. \end{eqnarray}

The metric raises and lowers the indices of \(\varepsilon^{ijk}\), so this can be written as

\begin{eqnarray} E &=& K_1 C_a C_a + K_2\left(F_a F_a + C_{ia} C_{ja} g^{ij}\right)\nonumber\\ & + & K_3 C_{iab} C_{jab} g^{ij}\nonumber\\ & + & K_4 g D_{mab} D^{n}{}_{ab} \varepsilon^{mjl} \varepsilon_{njl}. \end{eqnarray}

Now, in flat space (Eq. (1.23) of [27]),

\begin{eqnarray} \epsilon^{mjl} \epsilon_{njl} = \delta^{mj}_{nj} = \delta^m_n \delta^j_j - \delta^m_j \delta^j_n = 2 \delta^m_n. \end{eqnarray}

But this holds for curved space as well: multiply the left hand side by \(1 = g^{1/2} g^{-1/2}\) to get

\begin{eqnarray} g^{-1/2}\epsilon^{mjl} g^{1/2}\epsilon_{njl} = \varepsilon^{mjl} \varepsilon_{njl} = \delta^{mj}_{nj} = \delta^m_n \delta^j_j - \delta^m_j \delta^j_n = 2 \delta^m_n. \end{eqnarray}

So the constraint energy is

\begin{eqnarray} E &=& K_1 C_a C_a + K_2\left(F_a F_a + C_{ia} C_{ja} g^{ij}\right)\nonumber\\ & + & K_3 C_{iab} C_{jab} g^{ij}\nonumber\\ & + & 2 K_4 D_{mab} D^{n}{}_{ab} \delta^m_n. \end{eqnarray}

Simplifying gives the formula implemented here:

\begin{eqnarray} E &=& K_1 C_a C_a + K_2\left(F_a F_a + C_{ia} C_{ja} g^{ij}\right)\nonumber\\ & + & K_3 C_{iab} C_{jab} g^{ij}\nonumber\\ & + & 2 K_4 g D_{iab} D_{jab} g^{ij}. \end{eqnarray}

◆ constraint_energy() [2/2]

template<size_t SpatialDim, typename Frame , typename DataType >
void GeneralizedHarmonic::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,
double  two_index_constraint_multiplier,
double  three_index_constraint_multiplier,
double  four_index_constraint_multiplier 
)
noexcept

Computes the generalized-harmonic (unnormalized) constraint energy.

Details

Computes the generalized-harmonic unnormalized constraint energy [Eq. (53) of [18] with \(m^{ab}=\delta^{ab}\) and with each term in the sum scaled by an arbitrary coefficient],

\begin{eqnarray} E & = & K_1 C_a C_a + K_2\left(F_a F_a + C_{ia} C_{ja} g^{ij}\right)\nonumber\\ & + & K_3 C_{iab} C_{jab} g^{ij} + K_4 C_{ikab} C_{jlab}g^{ij} g^{kl}. \end{eqnarray}

Here \(C_a\) is the gauge constraint, \(F_a\) is the f constraint, \(C_{ia}\) is the two-index constraint, \(C_{iab}\) is the three-index constraint, \(C_{ikab}\) is the four-index constraint, \(g^{ij}\) is the inverse spatial metric, and \(K_1\), \(K_2\), \(K_3\), and \(K_4\) are constant multipliers for each term that each default to a value of 1.0. Note that in this equation, spacetime indices \(a,b\) are raised and lowered with the Kronecker delta.

Also note that the argument four_index_constraint is a rank-3 tensor. This is because GeneralizedHarmonic::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 \(C_{ijab}\), which can be written as

\begin{eqnarray} D_{iab} \equiv \frac{1}{2} \epsilon_{i}{}^{jk} C_{jkab}, \end{eqnarray}

where \(\epsilon_{ijk}\) is the flat-space Levi-Civita tensor, whose inidces are raised and lowered with the Kronecker delta. The result is

\begin{eqnarray} E & = & K_1 C_a C_a + K_2\left(F_a F_a + C_{ia} C_{ja} g^{ij}\right)\nonumber\\ & + & K_3 C_{iab} C_{jab} g^{ij}\nonumber\\ & + & 2 K_4 g D_{iab} D_{jab} g^{ij}, \end{eqnarray}

where \(g\) is the determinant of the spatial metric.

To derive this expression for the constraint energy implemented here, Eq.~(53) of [18] is

\begin{eqnarray} S_{AB} dc^A dc^B &=& m^{ab}\Bigl[d F_ad F_b +g^{ij}\bigl(d C_{ia}d C_{jb} +g^{kl}m^{cd}d C_{ikac}d C_{jlbd}\bigr) \nonumber\\ & + & \Lambda^2\bigl(d C_ad C_b +g^{ij}m^{cd}d C_{iac}d C_{jbd}\bigr) \Bigr]. \end{eqnarray}

Replace \(dc^A\rightarrow c^A\) to get

\begin{eqnarray} E&=& m^{ab}\Bigl[ F_a F_b +g^{ij}\bigl( C_{ia} C_{jb} +g^{kl}m^{cd} C_{ikac} C_{jlbd}\bigr) \nonumber\\ & + & \Lambda^2\bigl( C_a C_b +g^{ij}m^{cd} C_{iac} C_{jbd}\bigr) \Bigr]\nonumber\\ &=& m^{ab} F_a F_b +m^{ab}g^{ij} C_{ia} C_{jb} +m^{ab}g^{ij} g^{kl}m^{cd} C_{ikac} C_{jlbd} \nonumber\\ & + & m^{ab}\Lambda^2 C_a C_b +m^{ab}\Lambda^2 g^{ij}m^{cd} C_{iac} C_{jbd}. \end{eqnarray}

Here \(m^{ab}\) is an arbitrary positive-definite matrix, and \(\Lambda\) is an arbitrary real scalar. Choose \(m^{ab} = \delta^{ab}\) but allow an arbitrary coefficient to be placed in front of each term. Then, absorb \(\Lambda^2\) into one of these coefficients, to get

\begin{eqnarray} E &=& K_ F\delta^{ab} F_a F_b +K_2\delta^{ab}g^{ij} C_{ia} C_{jb} +K_4\delta^{ab}g^{ij} g^{kl}\delta^{cd} C_{ikac} C_{jlbd} \nonumber\\ & + & K_1\delta^{ab} C_a C_b +K_3\delta^{ab} g^{ij}\delta^{cd} C_{iac} C_{jbd}. \end{eqnarray}

Adopting a Euclidean norm for the constraint space (i.e., choosing to raise and lower spacetime indices with Kronecker deltas) gives

\begin{eqnarray} E &=& K_ F F_a F_a +K_2g^{ij} C_{ia} C_{ja} +K_4 g^{ij} g^{kl} C_{ikac} C_{jlac} \nonumber\\ & + & K_1 C_a C_a +K_3g^{ij} C_{iac} C_{jac}. \end{eqnarray}

The two-index constraint and f constraint can be viewed as the time and space components of a combined spacetime constraint. So next choose \(K_ F=K_2\), giving

\begin{eqnarray} E&=& K_1 C_a C_a + K_2\left(F_a F_a + C_{ia} C_{ja} g^{ij}\right)\nonumber\\ & + & K_3 C_{iab} C_{jab} g^{ij} + K_4 C_{ikab} C_{jlab}g^{ij} g^{kl}. \end{eqnarray}

Note that \(C_{ikab}\) is antisymmetric on the first two indices. Next, replace the four-index constraint \(C_{ijab}\) with \(D_{iab}\), which contains the independent components of \(C_{ijab}\). Specifically,

\begin{eqnarray} D_{iab} \equiv \frac{1}{2} \epsilon_{i}{}^{jk} C_{jkab}. \end{eqnarray}

The inverse relationship is

\begin{eqnarray} C_{jkab} = \epsilon^{i}{}_{jk} D_{iab}, \end{eqnarray}

where \(\epsilon_{ijk}\) is the flat-space Levi-Civita tensor, whose indices are raised and lowered with the Kronecker delta. Inserting this relation to replace \(C_{jkab}\) with \(D_{iab}\) gives

\begin{eqnarray} E &=& K_1 C_a C_a + K_2\left(F_a F_a + C_{ia} C_{ja} g^{ij}\right)\nonumber\\ & + & K_3 C_{iab} C_{jab} g^{ij}\nonumber\\ & + & K_4 D_{mab} D_{nab} \epsilon^{m}{}_{ik} \epsilon^{n}{}_{jl} g^{ij} g^{kl}. \end{eqnarray}

There's a subtle point here: \(g^{ij}\) is the inverse spatial metric, which is not necessarily flat. But \(\epsilon^{i}{}_{jk}\) is the flat space Levi-Civita tensor. In order to raise and lower indices of the Levi-Civita tensor with the inverse spatial metrics, put in the appropriate factors of \(\sqrt{g}\), where \(g\) is the metric determinant, to make the curved-space Levi-Civita tensor compatible with \(g^{ij}\). Let \(\varepsilon^{ijk}\) represent the curved space Levi-Civita tensor compatible with \(g^{ij}\):

\begin{eqnarray} \varepsilon^{mik} = g^{-1/2} \epsilon^{mik}\\ \varepsilon_{mik} = g^{1/2} \epsilon_{mik}. \end{eqnarray}

Then we can write the constraint energy as

\begin{eqnarray} E &=& K_1 C_a C_a + K_2\left(F_a F_a + C_{ia} C_{ja} g^{ij}\right)\nonumber\\ & + & K_3 C_{iab} C_{jab} g^{ij}\nonumber\\ & + & K_4 D_{mab} D_{nab} g g^{-1/2}\epsilon^{m}{}_{ik} g^{-1/2}\epsilon^{n}{}_{jl} g^{ij} g^{kl}. \end{eqnarray}

The factors of \(g^{-1/2}\) make the Levi-Civita tensor compatible with \(g^{ij}\). Swapping which summed indices are raised and which are lowered gives

\begin{eqnarray} E &=& K_1 C_a C_a + K_2\left(F_a F_a + C_{ia} C_{ja} g^{ij}\right)\nonumber\\ & + & K_3 C_{iab} C_{jab} g^{ij}\nonumber\\ & + & K_4 D_{mab} D_{nab} g g^{-1/2}\epsilon^{mik} g^{-1/2}\epsilon^{njl} g_{ij} g_{kl}, \end{eqnarray}

or

\begin{eqnarray} E &=& K_1 C_a C_a + K_2\left(F_a F_a + C_{ia} C_{ja} g^{ij}\right)\nonumber\\ & + & K_3 C_{iab} C_{jab} g^{ij}\nonumber\\ & + & K_4 D_{mab} D_{nab} g \varepsilon^{mik} \varepsilon^{njl} g_{ij} g_{kl}, \end{eqnarray}

or, reversing up and down repeated indices again,

\begin{eqnarray} E &=& K_1 C_a C_a + K_2\left(F_a F_a + C_{ia} C_{ja} g^{ij}\right)\nonumber\\ & + & K_3 C_{iab} C_{jab} g^{ij}\nonumber\\ & + & K_4 D_{mab} D_{nab} g \varepsilon^{m}{}_{ik} \varepsilon^{n}{}_{jl} g^{ij} g^{kl}. \end{eqnarray}

The metric raises and lowers the indices of \(\varepsilon^{ijk}\), so this can be written as

\begin{eqnarray} E &=& K_1 C_a C_a + K_2\left(F_a F_a + C_{ia} C_{ja} g^{ij}\right)\nonumber\\ & + & K_3 C_{iab} C_{jab} g^{ij}\nonumber\\ & + & K_4 g D_{mab} D^{n}{}_{ab} \varepsilon^{mjl} \varepsilon_{njl}. \end{eqnarray}

Now, in flat space (Eq. (1.23) of [27]),

\begin{eqnarray} \epsilon^{mjl} \epsilon_{njl} = \delta^{mj}_{nj} = \delta^m_n \delta^j_j - \delta^m_j \delta^j_n = 2 \delta^m_n. \end{eqnarray}

But this holds for curved space as well: multiply the left hand side by \(1 = g^{1/2} g^{-1/2}\) to get

\begin{eqnarray} g^{-1/2}\epsilon^{mjl} g^{1/2}\epsilon_{njl} = \varepsilon^{mjl} \varepsilon_{njl} = \delta^{mj}_{nj} = \delta^m_n \delta^j_j - \delta^m_j \delta^j_n = 2 \delta^m_n. \end{eqnarray}

So the constraint energy is

\begin{eqnarray} E &=& K_1 C_a C_a + K_2\left(F_a F_a + C_{ia} C_{ja} g^{ij}\right)\nonumber\\ & + & K_3 C_{iab} C_{jab} g^{ij}\nonumber\\ & + & 2 K_4 D_{mab} D^{n}{}_{ab} \delta^m_n. \end{eqnarray}

Simplifying gives the formula implemented here:

\begin{eqnarray} E &=& K_1 C_a C_a + K_2\left(F_a F_a + C_{ia} C_{ja} g^{ij}\right)\nonumber\\ & + & K_3 C_{iab} C_{jab} g^{ij}\nonumber\\ & + & 2 K_4 g D_{iab} D_{jab} g^{ij}. \end{eqnarray}

◆ f_constraint() [1/2]

template<size_t SpatialDim, typename Frame , typename DataType >
tnsr::a< DataType, SpatialDim, Frame > GeneralizedHarmonic::f_constraint ( const tnsr::a< DataType, SpatialDim, Frame > &  gauge_function,
const tnsr::ia< DataType, SpatialDim, Frame > &  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 
)
noexcept

Computes the generalized-harmonic F constraint.

Details

Computes the generalized-harmonic F constraint [Eq. (43) of [18]],

\begin{eqnarray} {\cal F}_a &\equiv& \frac{1}{2} g_a^i \psi^{bc}\partial_i \Pi_{bc} - g^{ij} \partial_i \Pi_{ja} - g^{ij} t^b \partial_i \Phi_{jba} + \frac{1}{2} t_a \psi^{bc} g^{ij} \partial_i \Phi_{jbc} \nonumber \\ && + t_a g^{ij} \partial_i H_j + g_a^i \Phi_{ijb} g^{jk}\Phi_{kcd} \psi^{bd} t^c - \frac{1}{2} g_a^i \Phi_{ijb} g^{jk} \Phi_{kcd} \psi^{cd} t^b \nonumber \\ && - g_a^i t^b \partial_i H_b + g^{ij} \Phi_{icd} \Phi_{jba} \psi^{bc} t^d - \frac{1}{2} t_a g^{ij} g^{mn} \Phi_{imc} \Phi_{njd}\psi^{cd} \nonumber \\ && - \frac{1}{4} t_a g^{ij}\Phi_{icd}\Phi_{jbe} \psi^{cb}\psi^{de} + \frac{1}{4} t_a \Pi_{cd} \Pi_{be} \psi^{cb}\psi^{de} - g^{ij} H_i \Pi_{ja} \nonumber \\ && - t^b g^{ij} \Pi_{b i} \Pi_{ja} - \frac{1}{4} g_a^i \Phi_{icd} t^c t^d \Pi_{be} \psi^{be} + \frac{1}{2} t_a \Pi_{cd} \Pi_{be}\psi^{ce} t^d t^b \nonumber \\ && + g_a^i \Phi_{icd} \Pi_{be} t^c t^b \psi^{de} - g^{ij}\Phi_{iba} t^b \Pi_{je} t^e - \frac{1}{2} g^{ij}\Phi_{icd} t^c t^d \Pi_{ja} \nonumber \\ && - g^{ij} H_i \Phi_{jba} t^b + g_{a}^i \Phi_{icd} H_b \psi^{bc} t^d +\gamma_2\bigl(g^{id}{\cal C}_{ida} -\frac{1}{2} g_a^i\psi^{cd}{\cal C}_{icd}\bigr) \nonumber \\ && + \frac{1}{2} t_a \Pi_{cd}\psi^{cd} H_b t^b - t_a g^{ij} \Phi_{ijc} H_d \psi^{cd} +\frac{1}{2} t_a g^{ij} H_i \Phi_{jcd}\psi^{cd}, \end{eqnarray}

where \(H_a\) is the gauge function, \(\psi_{ab}\) is the spacetime metric, \(\Pi_{ab}=-t^c\partial_c \psi_{ab}\), and \(\Phi_{iab} = \partial_i\psi_{ab}\); \(t^a\) is the timelike unit normal vector to the spatial slice, \(g^{ij}\) is the inverse spatial metric, and \(g^b_c = \delta^b_c + t^b t_c\).

◆ f_constraint() [2/2]

template<size_t SpatialDim, typename Frame , typename DataType >
void GeneralizedHarmonic::f_constraint ( gsl::not_null< tnsr::a< DataType, SpatialDim, Frame > *>  constraint,
const tnsr::a< DataType, SpatialDim, Frame > &  gauge_function,
const tnsr::ia< DataType, SpatialDim, Frame > &  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 
)
noexcept

Computes the generalized-harmonic F constraint.

Details

Computes the generalized-harmonic F constraint [Eq. (43) of [18]],

\begin{eqnarray} {\cal F}_a &\equiv& \frac{1}{2} g_a^i \psi^{bc}\partial_i \Pi_{bc} - g^{ij} \partial_i \Pi_{ja} - g^{ij} t^b \partial_i \Phi_{jba} + \frac{1}{2} t_a \psi^{bc} g^{ij} \partial_i \Phi_{jbc} \nonumber \\ && + t_a g^{ij} \partial_i H_j + g_a^i \Phi_{ijb} g^{jk}\Phi_{kcd} \psi^{bd} t^c - \frac{1}{2} g_a^i \Phi_{ijb} g^{jk} \Phi_{kcd} \psi^{cd} t^b \nonumber \\ && - g_a^i t^b \partial_i H_b + g^{ij} \Phi_{icd} \Phi_{jba} \psi^{bc} t^d - \frac{1}{2} t_a g^{ij} g^{mn} \Phi_{imc} \Phi_{njd}\psi^{cd} \nonumber \\ && - \frac{1}{4} t_a g^{ij}\Phi_{icd}\Phi_{jbe} \psi^{cb}\psi^{de} + \frac{1}{4} t_a \Pi_{cd} \Pi_{be} \psi^{cb}\psi^{de} - g^{ij} H_i \Pi_{ja} \nonumber \\ && - t^b g^{ij} \Pi_{b i} \Pi_{ja} - \frac{1}{4} g_a^i \Phi_{icd} t^c t^d \Pi_{be} \psi^{be} + \frac{1}{2} t_a \Pi_{cd} \Pi_{be}\psi^{ce} t^d t^b \nonumber \\ && + g_a^i \Phi_{icd} \Pi_{be} t^c t^b \psi^{de} - g^{ij}\Phi_{iba} t^b \Pi_{je} t^e - \frac{1}{2} g^{ij}\Phi_{icd} t^c t^d \Pi_{ja} \nonumber \\ && - g^{ij} H_i \Phi_{jba} t^b + g_{a}^i \Phi_{icd} H_b \psi^{bc} t^d +\gamma_2\bigl(g^{id}{\cal C}_{ida} -\frac{1}{2} g_a^i\psi^{cd}{\cal C}_{icd}\bigr) \nonumber \\ && + \frac{1}{2} t_a \Pi_{cd}\psi^{cd} H_b t^b - t_a g^{ij} \Phi_{ijc} H_d \psi^{cd} +\frac{1}{2} t_a g^{ij} H_i \Phi_{jcd}\psi^{cd}, \end{eqnarray}

where \(H_a\) is the gauge function, \(\psi_{ab}\) is the spacetime metric, \(\Pi_{ab}=-t^c\partial_c \psi_{ab}\), and \(\Phi_{iab} = \partial_i\psi_{ab}\); \(t^a\) is the timelike unit normal vector to the spatial slice, \(g^{ij}\) is the inverse spatial metric, and \(g^b_c = \delta^b_c + t^b t_c\).

◆ four_index_constraint() [1/2]

template<size_t SpatialDim, typename Frame , typename DataType >
void GeneralizedHarmonic::four_index_constraint ( gsl::not_null< tnsr::iaa< DataType, SpatialDim, Frame > *>  constraint,
const tnsr::ijaa< DataType, SpatialDim, Frame > &  d_phi 
)
noexcept

Computes the generalized-harmonic 4-index constraint.

Details

Computes the independent components of the generalized-harmonic 4-index constraint. The constraint itself is given by Eq. (45) of [18],

\begin{eqnarray} C_{ijab} = 2 \partial_{[i}\Phi_{j]ab}, \end{eqnarray}

where \(\Phi_{iab} = \partial_i\psi_{ab}\). Because the constraint is antisymmetric on the two spatial indices, here we compute and store only the independent components of \(C_{ijab}\). Specifically, we compute

\begin{eqnarray} D_{iab} \equiv \frac{1}{2} \epsilon_{i}{}^{jk} C_{jkab} = \epsilon_{i}{}^{jk} \partial_j \Phi_{kab}, \end{eqnarray}

where \(\epsilon_{ijk}\) is the flat-space Levi-Civita symbol, which is raised and lowered with the Kronecker delta. In terms of \(D_{iab}\), the full 4-index constraint is

\begin{eqnarray} C_{jkab} = \epsilon^{i}{}_{jk} D_{iab}. \end{eqnarray}

◆ four_index_constraint() [2/2]

template<size_t SpatialDim, typename Frame , typename DataType >
tnsr::iaa< DataType, SpatialDim, Frame > GeneralizedHarmonic::four_index_constraint ( const tnsr::ijaa< DataType, SpatialDim, Frame > &  d_phi)
noexcept

Computes the generalized-harmonic 4-index constraint.

Details

Computes the independent components of the generalized-harmonic 4-index constraint. The constraint itself is given by Eq. (45) of [18],

\begin{eqnarray} C_{ijab} = 2 \partial_{[i}\Phi_{j]ab}, \end{eqnarray}

where \(\Phi_{iab} = \partial_i\psi_{ab}\). Because the constraint is antisymmetric on the two spatial indices, here we compute and store only the independent components of \(C_{ijab}\). Specifically, we compute

\begin{eqnarray} D_{iab} \equiv \frac{1}{2} \epsilon_{i}{}^{jk} C_{jkab} = \epsilon_{i}{}^{jk} \partial_j \Phi_{kab}, \end{eqnarray}

where \(\epsilon_{ijk}\) is the flat-space Levi-Civita symbol, which is raised and lowered with the Kronecker delta. In terms of \(D_{iab}\), the full 4-index constraint is

\begin{eqnarray} C_{jkab} = \epsilon^{i}{}_{jk} D_{iab}. \end{eqnarray}

◆ gauge_constraint() [1/2]

template<size_t SpatialDim, typename Frame , typename DataType >
void GeneralizedHarmonic::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 
)
noexcept

Computes the generalized-harmonic gauge constraint.

Details

Computes the generalized-harmonic gauge constraint [Eq. (40) of [18]],

\[ C_a = H_a + g^{ij} \Phi_{ija} + t^b \Pi_{ba} - \frac{1}{2} g^i_a \psi^{bc} \Phi_{ibc} - \frac{1}{2} t_a \psi^{bc} \Pi_{bc}, \]

where \(H_a\) is the gauge function, \(\psi_{ab}\) is the spacetime metric, \(\Pi_{ab}=-t^c\partial_c \psi_{ab}\), and \(\Phi_{iab} = \partial_i\psi_{ab}\); \(t^a\) is the timelike unit normal vector to the spatial slice, \(g^{ij}\) is the inverse spatial metric, and \(g^b_c = \delta^b_c + t^b t_c\).

◆ gauge_constraint() [2/2]

template<size_t SpatialDim, typename Frame , typename DataType >
tnsr::a< DataType, SpatialDim, Frame > GeneralizedHarmonic::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 
)
noexcept

Computes the generalized-harmonic gauge constraint.

Details

Computes the generalized-harmonic gauge constraint [Eq. (40) of [18]],

\[ C_a = H_a + g^{ij} \Phi_{ija} + t^b \Pi_{ba} - \frac{1}{2} g^i_a \psi^{bc} \Phi_{ibc} - \frac{1}{2} t_a \psi^{bc} \Pi_{bc}, \]

where \(H_a\) is the gauge function, \(\psi_{ab}\) is the spacetime metric, \(\Pi_{ab}=-t^c\partial_c \psi_{ab}\), and \(\Phi_{iab} = \partial_i\psi_{ab}\); \(t^a\) is the timelike unit normal vector to the spatial slice, \(g^{ij}\) is the inverse spatial metric, and \(g^b_c = \delta^b_c + t^b t_c\).

◆ three_index_constraint() [1/2]

template<size_t SpatialDim, typename Frame , typename DataType >
void GeneralizedHarmonic::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 
)
noexcept

Computes the generalized-harmonic 3-index constraint.

Details

Computes the generalized-harmonic 3-index constraint, \(C_{iab} = \partial_i\psi_{ab} - \Phi_{iab},\) which is given by Eq. (26) of [18]

◆ three_index_constraint() [2/2]

template<size_t SpatialDim, typename Frame , typename DataType >
tnsr::iaa< DataType, SpatialDim, Frame > GeneralizedHarmonic::three_index_constraint ( const tnsr::iaa< DataType, SpatialDim, Frame > &  d_spacetime_metric,
const tnsr::iaa< DataType, SpatialDim, Frame > &  phi 
)
noexcept

Computes the generalized-harmonic 3-index constraint.

Details

Computes the generalized-harmonic 3-index constraint, \(C_{iab} = \partial_i\psi_{ab} - \Phi_{iab},\) which is given by Eq. (26) of [18]

◆ two_index_constraint() [1/2]

template<size_t SpatialDim, typename Frame , typename DataType >
void GeneralizedHarmonic::two_index_constraint ( gsl::not_null< tnsr::ia< DataType, SpatialDim, Frame > *>  constraint,
const tnsr::ia< DataType, SpatialDim, Frame > &  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 
)
noexcept

Computes the generalized-harmonic 2-index constraint.

Details

Computes the generalized-harmonic 2-index constraint [Eq. (44) of [18]],

\begin{eqnarray} C_{ia} &\equiv& g^{jk}\partial_j \Phi_{ika} - \frac{1}{2} g_a^j\psi^{cd}\partial_j \Phi_{icd} + t^b \partial_i \Pi_{ba} - \frac{1}{2} t_a \psi^{cd}\partial_i\Pi_{cd} \nonumber\\&& + \partial_i H_a + \frac{1}{2} g_a^j \Phi_{jcd} \Phi_{ief} \psi^{ce}\psi^{df} + \frac{1}{2} g^{jk} \Phi_{jcd} \Phi_{ike} \psi^{cd}t^e t_a \nonumber\\&& - g^{jk}g^{mn}\Phi_{jma}\Phi_{ikn} + \frac{1}{2} \Phi_{icd} \Pi_{be} t_a \left(\psi^{cb}\psi^{de} +\frac{1}{2}\psi^{be} t^c t^d\right) \nonumber\\&& - \Phi_{icd} \Pi_{ba} t^c \left(\psi^{bd} +\frac{1}{2} t^b t^d\right) + \frac{1}{2} \gamma_2 \left(t_a \psi^{cd} - 2 \delta^c_a t^d\right) C_{icd}. \end{eqnarray}

where \(H_a\) is the gauge function, \(\psi_{ab}\) is the spacetime metric, \(\Pi_{ab}=-t^c\partial_c \psi_{ab}\), and \(\Phi_{iab} = \partial_i\psi_{ab}\); \(t^a\) is the timelike unit normal vector to the spatial slice, \(g^{ij}\) is the inverse spatial metric, and \(g^b_c = \delta^b_c + t^b t_c\).

◆ two_index_constraint() [2/2]

template<size_t SpatialDim, typename Frame , typename DataType >
tnsr::ia< DataType, SpatialDim, Frame > GeneralizedHarmonic::two_index_constraint ( const tnsr::ia< DataType, SpatialDim, Frame > &  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 
)
noexcept

Computes the generalized-harmonic 2-index constraint.

Details

Computes the generalized-harmonic 2-index constraint [Eq. (44) of [18]],

\begin{eqnarray} C_{ia} &\equiv& g^{jk}\partial_j \Phi_{ika} - \frac{1}{2} g_a^j\psi^{cd}\partial_j \Phi_{icd} + t^b \partial_i \Pi_{ba} - \frac{1}{2} t_a \psi^{cd}\partial_i\Pi_{cd} \nonumber\\&& + \partial_i H_a + \frac{1}{2} g_a^j \Phi_{jcd} \Phi_{ief} \psi^{ce}\psi^{df} + \frac{1}{2} g^{jk} \Phi_{jcd} \Phi_{ike} \psi^{cd}t^e t_a \nonumber\\&& - g^{jk}g^{mn}\Phi_{jma}\Phi_{ikn} + \frac{1}{2} \Phi_{icd} \Pi_{be} t_a \left(\psi^{cb}\psi^{de} +\frac{1}{2}\psi^{be} t^c t^d\right) \nonumber\\&& - \Phi_{icd} \Pi_{ba} t^c \left(\psi^{bd} +\frac{1}{2} t^b t^d\right) + \frac{1}{2} \gamma_2 \left(t_a \psi^{cd} - 2 \delta^c_a t^d\right) C_{icd}. \end{eqnarray}

where \(H_a\) is the gauge function, \(\psi_{ab}\) is the spacetime metric, \(\Pi_{ab}=-t^c\partial_c \psi_{ab}\), and \(\Phi_{iab} = \partial_i\psi_{ab}\); \(t^a\) is the timelike unit normal vector to the spatial slice, \(g^{ij}\) is the inverse spatial metric, and \(g^b_c = \delta^b_c + t^b t_c\).