SpECTRE
v2025.03.17
|
Contains functions used in General Relativistic simulations. More...
Namespaces | |
namespace | gr |
Holds functions related to general relativity. | |
Functions | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::ijj< DataType, SpatialDim, Frame > | gh::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 | gh::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, \(\partial_a g_{bc}\). More... | |
template<typename DataType , size_t VolumeDim, typename SrcFrame , typename DestFrame > | |
void | transform::to_different_frame (const gsl::not_null< tnsr::ii< DataType, VolumeDim, DestFrame > * > dest, const tnsr::ii< DataType, VolumeDim, SrcFrame > &src, const Jacobian< DataType, VolumeDim, DestFrame, SrcFrame > &jacobian) |
template<typename DataType , size_t VolumeDim, typename SrcFrame , typename DestFrame > | |
auto | transform::to_different_frame (const tnsr::ii< DataType, VolumeDim, SrcFrame > &src, const Jacobian< DataType, VolumeDim, DestFrame, SrcFrame > &jacobian) -> tnsr::ii< DataType, VolumeDim, DestFrame > |
template<typename DataType , size_t VolumeDim, typename SrcFrame , typename DestFrame > | |
void | transform::to_different_frame (const gsl::not_null< Scalar< DataType > * > dest, const Scalar< DataType > &src, const Jacobian< DataType, VolumeDim, DestFrame, SrcFrame > &jacobian, const InverseJacobian< DataType, VolumeDim, DestFrame, SrcFrame > &inv_jacobian) |
Transforms a tensor to a different frame. More... | |
template<typename DataType , size_t VolumeDim, typename SrcFrame , typename DestFrame > | |
auto | transform::to_different_frame (Scalar< DataType > src, const Jacobian< DataType, VolumeDim, DestFrame, SrcFrame > &jacobian, const InverseJacobian< DataType, VolumeDim, DestFrame, SrcFrame > &inv_jacobian) -> Scalar< DataType > |
Transforms a tensor to a different frame. More... | |
template<typename DataType , size_t VolumeDim, typename SrcFrame , typename DestFrame > | |
void | transform::to_different_frame (const gsl::not_null< tnsr::I< DataType, VolumeDim, DestFrame > * > dest, const tnsr::I< DataType, VolumeDim, SrcFrame > &src, const Jacobian< DataType, VolumeDim, DestFrame, SrcFrame > &jacobian, const InverseJacobian< DataType, VolumeDim, DestFrame, SrcFrame > &inv_jacobian) |
Transforms a tensor to a different frame. More... | |
template<typename DataType , size_t VolumeDim, typename SrcFrame , typename DestFrame > | |
auto | transform::to_different_frame (const tnsr::I< DataType, VolumeDim, SrcFrame > &src, const Jacobian< DataType, VolumeDim, DestFrame, SrcFrame > &jacobian, const InverseJacobian< DataType, VolumeDim, DestFrame, SrcFrame > &inv_jacobian) -> tnsr::I< DataType, VolumeDim, DestFrame > |
Transforms a tensor to a different frame. More... | |
template<typename ResultTensor , typename InputTensor , typename DataType , size_t Dim, typename SourceFrame , typename TargetFrame > | |
void | transform::first_index_to_different_frame (gsl::not_null< ResultTensor * > result, const InputTensor &input, const InverseJacobian< DataType, Dim, SourceFrame, TargetFrame > &inv_jacobian) |
template<typename InputTensor , typename DataType , size_t Dim, typename SourceFrame , typename TargetFrame , typename ResultTensor = TensorMetafunctions::prepend_spatial_index< TensorMetafunctions::remove_first_index<InputTensor>, Dim, UpLo::Up, SourceFrame>> | |
ResultTensor | transform::first_index_to_different_frame (const InputTensor &input, const InverseJacobian< DataType, Dim, SourceFrame, TargetFrame > &inv_jacobian) |
template<typename DataType , typename Index0 , typename Index1 > | |
void | raise_or_lower_first_index (gsl::not_null< Tensor< DataType, Symmetry< 2, 1, 1 >, index_list< change_index_up_lo< Index0 >, Index1, Index1 > > * > result, const Tensor< DataType, Symmetry< 2, 1, 1 >, index_list< Index0, Index1, Index1 > > &tensor, const Tensor< DataType, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index0 >, change_index_up_lo< Index0 > > > &metric) |
Raises or lowers the first index of a rank 3 tensor which is symmetric in the last two indices. More... | |
template<typename DataType , typename Index0 , typename Index1 > | |
Tensor< DataType, Symmetry< 2, 1, 1 >, index_list< change_index_up_lo< Index0 >, Index1, Index1 > > | raise_or_lower_first_index (const Tensor< DataType, Symmetry< 2, 1, 1 >, index_list< Index0, Index1, Index1 > > &tensor, const Tensor< DataType, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index0 >, change_index_up_lo< Index0 > > > &metric) |
Raises or lowers the first index of a rank 3 tensor which is symmetric in the last two indices. More... | |
template<typename DataTypeTensor , typename DataTypeMetric , typename Index0 > | |
void | raise_or_lower_index (gsl::not_null< Tensor< DataTypeTensor, Symmetry< 1 >, index_list< change_index_up_lo< Index0 > > > * > result, const Tensor< DataTypeTensor, Symmetry< 1 >, index_list< Index0 > > &tensor, const Tensor< DataTypeMetric, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index0 >, change_index_up_lo< Index0 > > > &metric) |
Raises or lowers the index of a rank 1 tensor. More... | |
template<typename DataTypeTensor , typename DataTypeMetric , typename Index0 > | |
Tensor< DataTypeTensor, Symmetry< 1 >, index_list< change_index_up_lo< Index0 > > > | raise_or_lower_index (const Tensor< DataTypeTensor, Symmetry< 1 >, index_list< Index0 > > &tensor, const Tensor< DataTypeMetric, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index0 >, change_index_up_lo< Index0 > > > &metric) |
Raises or lowers the index of a rank 1 tensor. More... | |
template<typename DataType , typename Index0 , typename Index1 > | |
void | trace_last_indices (gsl::not_null< Tensor< DataType, Symmetry< 1 >, index_list< Index0 > > * > trace_of_tensor, const Tensor< DataType, Symmetry< 2, 1, 1 >, index_list< Index0, Index1, Index1 > > &tensor, const Tensor< DataType, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index1 >, change_index_up_lo< Index1 > > > &metric) |
Computes trace of a rank 3 tensor, which is symmetric in its last two indices, tracing the symmetric indices. More... | |
template<typename DataType , typename Index0 , typename Index1 > | |
Tensor< DataType, Symmetry< 1 >, index_list< Index0 > > | trace_last_indices (const Tensor< DataType, Symmetry< 2, 1, 1 >, index_list< Index0, Index1, Index1 > > &tensor, const Tensor< DataType, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index1 >, change_index_up_lo< Index1 > > > &metric) |
Computes trace of a rank 3 tensor, which is symmetric in its last two indices, tracing the symmetric indices. More... | |
template<typename DataType , typename Index0 > | |
void | trace (gsl::not_null< Scalar< DataType > * > trace, const Tensor< DataType, Symmetry< 1, 1 >, index_list< Index0, Index0 > > &tensor, const Tensor< DataType, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index0 >, change_index_up_lo< Index0 > > > &metric) |
Computes trace of a rank-2 symmetric tensor. More... | |
template<typename DataType , typename Index0 > | |
Scalar< DataType > | trace (const Tensor< DataType, Symmetry< 1, 1 >, index_list< Index0, Index0 > > &tensor, const Tensor< DataType, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index0 >, change_index_up_lo< Index0 > > > &metric) |
Computes trace of a rank-2 symmetric tensor. More... | |
template<typename DataType , size_t Dim, typename Frame > | |
void | Ccz4::divergence_lapse (const gsl::not_null< Scalar< DataType > * > result, const Scalar< DataType > &conformal_factor_squared, const tnsr::II< DataType, Dim, Frame > &inverse_conformal_metric, const tnsr::ij< DataType, Dim, Frame > &grad_grad_lapse) |
Computes the divergence of the lapse. More... | |
template<typename DataType , size_t Dim, typename Frame > | |
Scalar< DataType > | Ccz4::divergence_lapse (const Scalar< DataType > &conformal_factor_squared, const tnsr::II< DataType, Dim, Frame > &inverse_conformal_metric, const tnsr::ij< DataType, Dim, Frame > &grad_grad_lapse) |
Computes the divergence of the lapse. More... | |
template<size_t SpatialDim, typename Frame , IndexType Index, typename DataType > | |
void | gr::christoffel_first_kind (gsl::not_null< tnsr::abb< DataType, SpatialDim, Frame, Index > * > christoffel, const tnsr::abb< DataType, SpatialDim, Frame, Index > &d_metric) |
Computes Christoffel symbol of the first kind from derivative of metric. More... | |
template<size_t SpatialDim, typename Frame , IndexType Index, typename DataType > | |
tnsr::abb< DataType, SpatialDim, Frame, Index > | gr::christoffel_first_kind (const tnsr::abb< DataType, SpatialDim, Frame, Index > &d_metric) |
Computes Christoffel symbol of the first kind from derivative of metric. More... | |
template<size_t SpatialDim, typename Frame , IndexType Index, typename DataType > | |
void | gr::christoffel_second_kind (gsl::not_null< tnsr::Abb< DataType, SpatialDim, Frame, Index > * > christoffel, const tnsr::abb< DataType, SpatialDim, Frame, Index > &d_metric, const tnsr::AA< DataType, SpatialDim, Frame, Index > &inverse_metric) |
Computes Christoffel symbol of the second kind from derivative of metric and the inverse metric. More... | |
template<size_t SpatialDim, typename Frame , IndexType Index, typename DataType > | |
auto | gr::christoffel_second_kind (const tnsr::abb< DataType, SpatialDim, Frame, Index > &d_metric, const tnsr::AA< DataType, SpatialDim, Frame, Index > &inverse_metric) -> tnsr::Abb< DataType, SpatialDim, Frame, Index > |
Computes Christoffel symbol of the second kind from derivative of metric and the inverse metric. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | gr::derivatives_of_spacetime_metric (gsl::not_null< tnsr::abb< DataType, SpatialDim, Frame > * > spacetime_deriv_spacetime_metric, 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 tnsr::ii< DataType, SpatialDim, Frame > &dt_spatial_metric, const tnsr::ijj< DataType, SpatialDim, Frame > &deriv_spatial_metric) |
Computes spacetime derivative of spacetime metric from spatial metric, lapse, shift, and their space and time derivatives. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::abb< DataType, SpatialDim, Frame > | gr::derivatives_of_spacetime_metric (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 tnsr::ii< DataType, SpatialDim, Frame > &dt_spatial_metric, const tnsr::ijj< DataType, SpatialDim, Frame > &deriv_spatial_metric) |
Computes spacetime derivative of spacetime metric from spatial metric, lapse, shift, and their space and time derivatives. More... | |
template<typename DataType , size_t Dim, typename Frame > | |
void | gr::deriv_inverse_spatial_metric (gsl::not_null< tnsr::iJJ< DataType, Dim, Frame > * > result, const tnsr::II< DataType, Dim, Frame > &inverse_spatial_metric, const tnsr::ijj< DataType, Dim, Frame > &d_spatial_metric) |
Computes the spatial derivative of the inverse spatial metric from the inverse spatial metric and the spatial derivative of the spatial metric. More... | |
template<typename DataType , size_t Dim, typename Frame > | |
tnsr::iJJ< DataType, Dim, Frame > | gr::deriv_inverse_spatial_metric (const tnsr::II< DataType, Dim, Frame > &inverse_spatial_metric, const tnsr::ijj< DataType, Dim, Frame > &d_spatial_metric) |
Computes the spatial derivative of the inverse spatial metric from the inverse spatial metric and the spatial derivative of the spatial metric. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::ii< DataType, SpatialDim, Frame > | gr::extrinsic_curvature (const Scalar< DataType > &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::ii< DataType, SpatialDim, Frame > &dt_spatial_metric, const tnsr::ijj< DataType, SpatialDim, Frame > &deriv_spatial_metric) |
Computes extrinsic curvature from metric and derivatives. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | gr::extrinsic_curvature (gsl::not_null< tnsr::ii< DataType, SpatialDim, Frame > * > ex_curvature, const Scalar< DataType > &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::ii< DataType, SpatialDim, Frame > &dt_spatial_metric, const tnsr::ijj< DataType, SpatialDim, Frame > &deriv_spatial_metric) |
Computes extrinsic curvature from metric and derivatives. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | gh::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 | gh::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 > | |
void | gh::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 > | gh::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 | gh::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 > | gh::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 | gh::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 > | gh::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 | gh::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 \(\Phi_{iab}\) used by the generalized harmonic formulation of Einstein's equations. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::iaa< DataType, SpatialDim, Frame > | gh::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 \(\Phi_{iab}\) used by the generalized harmonic formulation of Einstein's equations. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | gh::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 \(\Pi_{ab}\) of the spacetime metric \( g_{ab} \). More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::aa< DataType, SpatialDim, Frame > | gh::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 \(\Pi_{ab}\) of the spacetime metric \( g_{ab} \). More... | |
template<typename DataType , size_t VolumeDim, typename Frame > | |
void | gh::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 > | gh::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 | gh::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 > | gh::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 | gh::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 > | gh::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 | gh::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 > | gh::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 | gh::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 ( \(\alpha\)) from the generalized harmonic variables and spacetime unit normal 1-form. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::i< DataType, SpatialDim, Frame > | gh::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 ( \(\alpha\)) from the generalized harmonic variables and spacetime unit normal 1-form. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | gh::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 > | gh::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 | gh::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 \(\Pi_{a b}\), \(\Phi_{i a b}\), and the lapse \(\alpha\) and shift \(\beta^i\). More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::aa< DataType, SpatialDim, Frame > | gh::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 \(\Pi_{a b}\), \(\Phi_{i a b}\), and the lapse \(\alpha\) and shift \(\beta^i\). More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | gh::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 ( \(\alpha\)) from the generalized harmonic variables, lapse, shift and the spacetime unit normal 1-form. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
Scalar< DataType > | gh::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 ( \(\alpha\)) from the generalized harmonic variables, lapse, shift and the spacetime unit normal 1-form. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | gh::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 > | gh::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 | gh::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 > | gh::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 | gh::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 > | gh::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... | |
template<typename DataType , size_t VolumeDim, typename Frame > | |
tnsr::a< DataType, VolumeDim, Frame > | gr::interface_null_normal (const tnsr::a< DataType, VolumeDim, Frame > &spacetime_normal_one_form, const tnsr::i< DataType, VolumeDim, Frame > &interface_unit_normal_one_form, double sign) |
Compute null normal one-form to the boundary of a closed region in a spatial slice of spacetime. More... | |
template<typename DataType , size_t VolumeDim, typename Frame > | |
void | gr::interface_null_normal (gsl::not_null< tnsr::A< DataType, VolumeDim, Frame > * > null_vector, const tnsr::A< DataType, VolumeDim, Frame > &spacetime_normal_vector, const tnsr::I< DataType, VolumeDim, Frame > &interface_unit_normal_vector, double sign) |
Compute null normal vector to the boundary of a closed region in a spatial slice of spacetime. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | gr::inverse_spacetime_metric (gsl::not_null< tnsr::AA< DataType, SpatialDim, Frame > * > inverse_spacetime_metric, const Scalar< DataType > &lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric) |
Compute inverse spacetime metric from inverse spatial metric, lapse and shift. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::AA< DataType, SpatialDim, Frame > | gr::inverse_spacetime_metric (const Scalar< DataType > &lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric) |
Compute inverse spacetime metric from inverse spatial metric, lapse and shift. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
Scalar< DataType > | gr::lapse (const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::aa< DataType, SpatialDim, Frame > &spacetime_metric) |
Compute lapse from shift and spacetime metric. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | gr::lapse (gsl::not_null< Scalar< DataType > * > lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::aa< DataType, SpatialDim, Frame > &spacetime_metric) |
Compute lapse from shift and spacetime metric. More... | |
template<typename DataType , size_t VolumeDim, typename Frame > | |
tnsr::II< DataType, VolumeDim, Frame > | gr::transverse_projection_operator (const tnsr::II< DataType, VolumeDim, Frame > &inverse_spatial_metric, const tnsr::I< DataType, VolumeDim, Frame > &normal_vector) |
Compute projection operator onto an interface. More... | |
template<typename DataType , size_t VolumeDim, typename Frame > | |
void | gr::transverse_projection_operator (gsl::not_null< tnsr::ii< DataType, VolumeDim, Frame > * > projection_tensor, const tnsr::ii< DataType, VolumeDim, Frame > &spatial_metric, const tnsr::i< DataType, VolumeDim, Frame > &normal_one_form) |
Compute projection operator onto an interface. More... | |
template<typename DataType , size_t VolumeDim, typename Frame > | |
tnsr::aa< DataType, VolumeDim, Frame > | gr::transverse_projection_operator (const tnsr::aa< DataType, VolumeDim, Frame > &spacetime_metric, const tnsr::a< DataType, VolumeDim, Frame > &spacetime_normal_one_form, const tnsr::i< DataType, VolumeDim, Frame > &interface_unit_normal_one_form) |
Compute spacetime projection operator onto an interface. More... | |
template<typename DataType , size_t VolumeDim, typename Frame > | |
void | gr::transverse_projection_operator (gsl::not_null< tnsr::AA< DataType, VolumeDim, Frame > * > projection_tensor, const tnsr::AA< DataType, VolumeDim, Frame > &inverse_spacetime_metric, const tnsr::A< DataType, VolumeDim, Frame > &spacetime_normal_vector, const tnsr::I< DataType, VolumeDim, Frame > &interface_unit_normal_vector) |
Compute spacetime projection operator onto an interface. More... | |
template<typename DataType , size_t VolumeDim, typename Frame > | |
tnsr::Ab< DataType, VolumeDim, Frame > | gr::transverse_projection_operator (const tnsr::A< DataType, VolumeDim, Frame > &spacetime_normal_vector, const tnsr::a< DataType, VolumeDim, Frame > &spacetime_normal_one_form, const tnsr::I< DataType, VolumeDim, Frame > &interface_unit_normal_vector, const tnsr::i< DataType, VolumeDim, Frame > &interface_unit_normal_one_form) |
Compute spacetime projection operator onto an interface. More... | |
template<typename DataType , size_t VolumeDim, typename Frame > | |
void | gr::transverse_projection_operator (gsl::not_null< tnsr::Ab< DataType, VolumeDim, Frame > * > projection_tensor, const tnsr::A< DataType, VolumeDim, Frame > &spacetime_normal_vector, const tnsr::a< DataType, VolumeDim, Frame > &spacetime_normal_one_form, const tnsr::I< DataType, VolumeDim, Frame > &interface_unit_normal_vector, const tnsr::i< DataType, VolumeDim, Frame > &interface_unit_normal_one_form) |
Compute spacetime projection operator onto an interface. More... | |
template<typename Frame > | |
void | gr::psi_4 (gsl::not_null< Scalar< ComplexDataVector > * > psi_4_result, const tnsr::ii< DataVector, 3, Frame > &spatial_ricci, const tnsr::ii< DataVector, 3, Frame > &extrinsic_curvature, const tnsr::ijj< DataVector, 3, Frame > &cov_deriv_extrinsic_curvature, const tnsr::ii< DataVector, 3, Frame > &spatial_metric, const tnsr::II< DataVector, 3, Frame > &inverse_spatial_metric, const tnsr::I< DataVector, 3, Frame > &inertial_coords) |
Computes Newman Penrose quantity \(\Psi_4\) using the characteristic field U \(^{8+}\) and complex vector \(\bar{m}^i\). More... | |
template<typename Frame > | |
Scalar< ComplexDataVector > | gr::psi_4 (const tnsr::ii< DataVector, 3, Frame > &spatial_ricci, const tnsr::ii< DataVector, 3, Frame > &extrinsic_curvature, const tnsr::ijj< DataVector, 3, Frame > &cov_deriv_extrinsic_curvature, const tnsr::ii< DataVector, 3, Frame > &spatial_metric, const tnsr::II< DataVector, 3, Frame > &inverse_spatial_metric, const tnsr::I< DataVector, 3, Frame > &inertial_coords) |
Computes Newman Penrose quantity \(\Psi_4\) using the characteristic field U \(^{8+}\) and complex vector \(\bar{m}^i\). More... | |
template<typename Frame > | |
void | gr::psi_4_real (gsl::not_null< Scalar< DataVector > * > psi_4_real_result, const tnsr::ii< DataVector, 3, Frame > &spatial_ricci, const tnsr::ii< DataVector, 3, Frame > &extrinsic_curvature, const tnsr::ijj< DataVector, 3, Frame > &cov_deriv_extrinsic_curvature, const tnsr::ii< DataVector, 3, Frame > &spatial_metric, const tnsr::II< DataVector, 3, Frame > &inverse_spatial_metric, const tnsr::I< DataVector, 3, Frame > &inertial_coords) |
Computes the real part of the Newman Penrose quantity \(\Psi_4\) using \(\Psi_4[Real] = -0.5*U^{8+}_{ij}*(x^ix^j - y^iy^j)\). | |
template<typename Frame > | |
Scalar< DataVector > | gr::psi_4_real (const tnsr::ii< DataVector, 3, Frame > &spatial_ricci, const tnsr::ii< DataVector, 3, Frame > &extrinsic_curvature, const tnsr::ijj< DataVector, 3, Frame > &cov_deriv_extrinsic_curvature, const tnsr::ii< DataVector, 3, Frame > &spatial_metric, const tnsr::II< DataVector, 3, Frame > &inverse_spatial_metric, const tnsr::I< DataVector, 3, Frame > &inertial_coords) |
Computes the real part of the Newman Penrose quantity \(\Psi_4\) using \(\Psi_4[Real] = -0.5*U^{8+}_{ij}*(x^ix^j - y^iy^j)\). | |
template<size_t SpatialDim, typename Frame , IndexType Index, typename DataType > | |
void | gr::ricci_tensor (gsl::not_null< tnsr::aa< DataType, SpatialDim, Frame, Index > * > result, const tnsr::Abb< DataType, SpatialDim, Frame, Index > &christoffel_2nd_kind, const tnsr::aBcc< DataType, SpatialDim, Frame, Index > &d_christoffel_2nd_kind) |
Computes Ricci tensor from the (spatial or spacetime) Christoffel symbol of the second kind and its derivative. More... | |
template<size_t SpatialDim, typename Frame , IndexType Index, typename DataType > | |
tnsr::aa< DataType, SpatialDim, Frame, Index > | gr::ricci_tensor (const tnsr::Abb< DataType, SpatialDim, Frame, Index > &christoffel_2nd_kind, const tnsr::aBcc< DataType, SpatialDim, Frame, Index > &d_christoffel_2nd_kind) |
Computes Ricci tensor from the (spatial or spacetime) Christoffel symbol of the second kind and its derivative. More... | |
template<size_t SpatialDim, typename Frame , IndexType Index, typename DataType > | |
void | gr::ricci_scalar (gsl::not_null< Scalar< DataType > * > ricci_scalar_result, const tnsr::aa< DataType, SpatialDim, Frame, Index > &ricci_tensor, const tnsr::AA< DataType, SpatialDim, Frame, Index > &inverse_metric) |
Computes the Ricci Scalar from the (spatial or spacetime) Ricci Tensor and inverse metrics. More... | |
template<size_t SpatialDim, typename Frame , IndexType Index, typename DataType > | |
Scalar< DataType > | gr::ricci_scalar (const tnsr::aa< DataType, SpatialDim, Frame, Index > &ricci_tensor, const tnsr::AA< DataType, SpatialDim, Frame, Index > &inverse_metric) |
Computes the Ricci Scalar from the (spatial or spacetime) Ricci Tensor and inverse metrics. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::I< DataType, SpatialDim, Frame > | gr::shift (const tnsr::aa< DataType, SpatialDim, Frame > &spacetime_metric, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric) |
Compute shift from spacetime metric and inverse spatial metric. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | gr::shift (gsl::not_null< tnsr::I< DataType, SpatialDim, Frame > * > shift, const tnsr::aa< DataType, SpatialDim, Frame > &spacetime_metric, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric) |
Compute shift from spacetime metric and inverse spatial metric. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | gr::spacetime_deriv_of_goth_g (gsl::not_null< tnsr::aBB< DataType, SpatialDim, Frame > * > da_goth_g, const tnsr::AA< DataType, SpatialDim, Frame > &inverse_spacetime_metric, const tnsr::abb< DataType, SpatialDim, Frame > &da_spacetime_metric, const Scalar< DataType > &lapse, const tnsr::a< DataType, SpatialDim, Frame > &da_lapse, const Scalar< DataType > &sqrt_det_spatial_metric, const tnsr::a< DataType, SpatialDim, Frame > &da_det_spatial_metric) |
Computes spacetime derivative of \( \mathfrak{g}^{ab}\equiv (-g)^{1/2} g^{ab} \). More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::aBB< DataType, SpatialDim, Frame > | gr::spacetime_deriv_of_goth_g (const tnsr::AA< DataType, SpatialDim, Frame > &inverse_spacetime_metric, const tnsr::abb< DataType, SpatialDim, Frame > &da_spacetime_metric, const Scalar< DataType > &lapse, const tnsr::a< DataType, SpatialDim, Frame > &da_lapse, const Scalar< DataType > &sqrt_det_spatial_metric, const tnsr::a< DataType, SpatialDim, Frame > &da_det_spatial_metric) |
Computes spacetime derivative of \( \mathfrak{g}^{ab}\equiv (-g)^{1/2} g^{ab} \). More... | |
template<typename DataType , size_t Dim, typename Frame > | |
void | gr::spacetime_metric (gsl::not_null< tnsr::aa< DataType, Dim, Frame > * > spacetime_metric, const Scalar< DataType > &lapse, const tnsr::I< DataType, Dim, Frame > &shift, const tnsr::ii< DataType, Dim, Frame > &spatial_metric) |
Computes the spacetime metric from the spatial metric, lapse, and shift. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::aa< DataType, SpatialDim, Frame > | gr::spacetime_metric (const Scalar< DataType > &lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::ii< DataType, SpatialDim, Frame > &spatial_metric) |
Computes the spacetime metric from the spatial metric, lapse, and shift. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::A< DataType, SpatialDim, Frame > | gr::spacetime_normal_vector (const Scalar< DataType > &lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift) |
Computes spacetime normal vector from lapse and shift. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | gr::spacetime_normal_vector (gsl::not_null< tnsr::A< DataType, SpatialDim, Frame > * > spacetime_normal_vector, const Scalar< DataType > &lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift) |
Computes spacetime normal vector from lapse and shift. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::ii< DataType, SpatialDim, Frame > | gr::spatial_metric (const tnsr::aa< DataType, SpatialDim, Frame > &spacetime_metric) |
Compute spatial metric from spacetime metric. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | gr::spatial_metric (gsl::not_null< tnsr::ii< DataType, SpatialDim, Frame > * > spatial_metric, const tnsr::aa< DataType, SpatialDim, Frame > &spacetime_metric) |
Compute spatial metric from spacetime metric. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | gr::time_derivative_of_spacetime_metric (gsl::not_null< tnsr::aa< DataType, SpatialDim, Frame > * > dt_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::ii< DataType, SpatialDim, Frame > &spatial_metric, const tnsr::ii< DataType, SpatialDim, Frame > &dt_spatial_metric) |
Computes the time derivative of the spacetime metric from spatial metric, lapse, shift, and their time derivatives. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::aa< DataType, SpatialDim, Frame > | gr::time_derivative_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::ii< DataType, SpatialDim, Frame > &spatial_metric, const tnsr::ii< DataType, SpatialDim, Frame > &dt_spatial_metric) |
Computes the time derivative of the spacetime metric from spatial metric, lapse, shift, and their time derivatives. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | gr::time_derivative_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::iJ< DataType, SpatialDim, Frame > &deriv_shift, const tnsr::ii< DataType, SpatialDim, Frame > &spatial_metric, const tnsr::ijj< DataType, SpatialDim, Frame > &deriv_spatial_metric, const tnsr::ii< DataType, SpatialDim, Frame > &extrinsic_curvature) |
Computes the time derivative of the spatial metric from extrinsic curvature, lapse, shift, and their time derivatives. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::ii< DataType, SpatialDim, Frame > | gr::time_derivative_of_spatial_metric (const Scalar< DataType > &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, const tnsr::ii< DataType, SpatialDim, Frame > &extrinsic_curvature) |
Computes the time derivative of the spatial metric from extrinsic curvature, lapse, shift, and their time derivatives. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::ii< DataType, SpatialDim, Frame > | gr::weyl_electric (const tnsr::ii< DataType, SpatialDim, Frame > &spatial_ricci, const tnsr::ii< DataType, SpatialDim, Frame > &extrinsic_curvature, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric) |
Computes the electric part of the Weyl tensor in vacuum. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | gr::weyl_electric (gsl::not_null< tnsr::ii< DataType, SpatialDim, Frame > * > weyl_electric_part, const tnsr::ii< DataType, SpatialDim, Frame > &spatial_ricci, const tnsr::ii< DataType, SpatialDim, Frame > &extrinsic_curvature, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric) |
Computes the electric part of the Weyl tensor in vacuum. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
Scalar< DataType > | gr::weyl_electric_scalar (const tnsr::ii< DataType, SpatialDim, Frame > &weyl_electric, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric) |
Computes the scalar \(E_{ij} E^{ij}\) from the electric part of the Weyl tensor \(E_{ij}\). More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | gr::weyl_electric_scalar (gsl::not_null< Scalar< DataType > * > weyl_electric_scalar_result, const tnsr::ii< DataType, SpatialDim, Frame > &weyl_electric, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric) |
Computes the scalar \(E_{ij} E^{ij}\) from the electric part of the Weyl tensor \(E_{ij}\). More... | |
template<typename Frame , typename DataType > | |
tnsr::ii< DataType, 3, Frame > | gr::weyl_magnetic (const tnsr::ijj< DataType, 3, Frame > &grad_extrinsic_curvature, const tnsr::ii< DataType, 3, Frame > &spatial_metric, const Scalar< DataType > &sqrt_det_spatial_metric) |
Computes the magnetic part of the Weyl tensor. More... | |
template<typename Frame , typename DataType > | |
void | gr::weyl_magnetic (gsl::not_null< tnsr::ii< DataType, 3, Frame > * > weyl_magnetic_part, const tnsr::ijj< DataType, 3, Frame > &grad_extrinsic_curvature, const tnsr::ii< DataType, 3, Frame > &spatial_metric, const Scalar< DataType > &sqrt_det_spatial_metric) |
Computes the magnetic part of the Weyl tensor. More... | |
template<typename Frame , typename DataType > | |
Scalar< DataType > | gr::weyl_magnetic_scalar (const tnsr::ii< DataType, 3, Frame > &weyl_magnetic, const tnsr::II< DataType, 3, Frame > &inverse_spatial_metric) |
Computes the scalar \(B_{ij} B^{ij}\) from the magnetic part of the Weyl tensor \(B_{ij}\). More... | |
template<typename Frame , typename DataType > | |
void | gr::weyl_magnetic_scalar (gsl::not_null< Scalar< DataType > * > weyl_magnetic_scalar_result, const tnsr::ii< DataType, 3, Frame > &weyl_magnetic, const tnsr::II< DataType, 3, Frame > &inverse_spatial_metric) |
Computes the scalar \(B_{ij} B^{ij}\) from the magnetic part of the Weyl tensor \(B_{ij}\). More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::ii< DataType, SpatialDim, Frame > | gr::weyl_propagating (const tnsr::ii< DataType, SpatialDim, Frame > &ricci, const tnsr::ii< DataType, SpatialDim, Frame > &extrinsic_curvature, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric, const tnsr::ijj< DataType, SpatialDim, Frame > &cov_deriv_extrinsic_curvature, const tnsr::I< DataType, SpatialDim, Frame > &unit_interface_normal_vector, const tnsr::II< DataType, SpatialDim, Frame > &projection_IJ, const tnsr::ii< DataType, SpatialDim, Frame > &projection_ij, const tnsr::Ij< DataType, SpatialDim, Frame > &projection_Ij, double sign) |
Computes the propagating modes of the Weyl tensor. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | gr::weyl_propagating (gsl::not_null< tnsr::ii< DataType, SpatialDim, Frame > * > weyl_prop_u8, const tnsr::ii< DataType, SpatialDim, Frame > &ricci, const tnsr::ii< DataType, SpatialDim, Frame > &extrinsic_curvature, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric, const tnsr::ijj< DataType, SpatialDim, Frame > &cov_deriv_extrinsic_curvature, const tnsr::I< DataType, SpatialDim, Frame > &unit_interface_normal_vector, const tnsr::II< DataType, SpatialDim, Frame > &projection_IJ, const tnsr::ii< DataType, SpatialDim, Frame > &projection_ij, const tnsr::Ij< DataType, SpatialDim, Frame > &projection_Ij, double sign) |
Computes the propagating modes of the Weyl tensor. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::ii< DataType, SpatialDim, Frame > | gr::weyl_type_D1 (const tnsr::ii< DataType, SpatialDim, Frame > &weyl_electric, const tnsr::ii< DataType, SpatialDim, Frame > &spatial_metric, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric) |
Computes a quantity measuring how far from type D spacetime is. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | gr::weyl_type_D1 (gsl::not_null< tnsr::ii< DataType, SpatialDim, Frame > * > weyl_type_D1, const tnsr::ii< DataType, SpatialDim, Frame > &weyl_electric, const tnsr::ii< DataType, SpatialDim, Frame > &spatial_metric, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric) |
Computes a quantity measuring how far from type D spacetime is. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | gr::weyl_type_D1_scalar (gsl::not_null< Scalar< DataType > * > weyl_type_D1_scalar_result, const tnsr::ii< DataType, SpatialDim, Frame > &weyl_type_D1, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric) |
Computes the scalar \(D_{ij} D^{ij}\) , a measure of a spacetime's devitation from type D. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
Scalar< DataType > | gr::weyl_type_D1_scalar (const tnsr::ii< DataType, SpatialDim, Frame > &weyl_type_D1, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric) |
Computes the scalar \(D_{ij} D^{ij}\) , a measure of a spacetime's devitation from type D. More... | |
Contains functions used in General Relativistic simulations.
tnsr::abb< DataType, SpatialDim, Frame, Index > gr::christoffel_first_kind | ( | const tnsr::abb< DataType, SpatialDim, Frame, Index > & | d_metric | ) |
Computes Christoffel symbol of the first kind from derivative of metric.
Computes Christoffel symbol \(\Gamma_{abc}\) as: \( \Gamma_{cab} = \frac{1}{2} ( \partial_a g_{bc} + \partial_b g_{ac} - \partial_c g_{ab}) \) where \(g_{bc}\) is either a spatial or spacetime metric
void gr::christoffel_first_kind | ( | gsl::not_null< tnsr::abb< DataType, SpatialDim, Frame, Index > * > | christoffel, |
const tnsr::abb< DataType, SpatialDim, Frame, Index > & | d_metric | ||
) |
Computes Christoffel symbol of the first kind from derivative of metric.
Computes Christoffel symbol \(\Gamma_{abc}\) as: \( \Gamma_{cab} = \frac{1}{2} ( \partial_a g_{bc} + \partial_b g_{ac} - \partial_c g_{ab}) \) where \(g_{bc}\) is either a spatial or spacetime metric
void gh::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.
If \( \Phi_{kab} \) is the generalized harmonic spatial derivative variable \( \Phi_{kab} = \partial_k g_{ab}\) and \(\gamma^{ij}\) is the inverse spatial metric, the Christoffel symbols are
\[ \Gamma^m_{ij} = \frac{1}{2}\gamma^{mk}(\Phi_{ijk}+\Phi_{jik}-\Phi_{kij}). \]
In the not_null version, no memory allocations are performed if the output tensor already has the correct size.
auto gr::christoffel_second_kind | ( | const tnsr::abb< DataType, SpatialDim, Frame, Index > & | d_metric, |
const tnsr::AA< DataType, SpatialDim, Frame, Index > & | inverse_metric | ||
) | -> tnsr::Abb< DataType, SpatialDim, Frame, Index > |
Computes Christoffel symbol of the second kind from derivative of metric and the inverse metric.
Computes Christoffel symbol \(\Gamma^a_{bc}\) as: \( \Gamma^d_{ab} = \frac{1}{2} g^{cd} (\partial_a g_{bc} + \partial_b g_{ac} - \partial_c g_{ab}) \) where \(g_{bc}\) is either a spatial or spacetime metric.
Avoids the extra memory allocation that occurs by computing the Christoffel symbol of the first kind and then raising the index.
auto gh::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.
If \( \Phi_{kab} \) is the generalized harmonic spatial derivative variable \( \Phi_{kab} = \partial_k g_{ab}\) and \(\gamma^{ij}\) is the inverse spatial metric, the Christoffel symbols are
\[ \Gamma^m_{ij} = \frac{1}{2}\gamma^{mk}(\Phi_{ijk}+\Phi_{jik}-\Phi_{kij}). \]
In the not_null version, no memory allocations are performed if the output tensor already has the correct size.
void gr::christoffel_second_kind | ( | gsl::not_null< tnsr::Abb< DataType, SpatialDim, Frame, Index > * > | christoffel, |
const tnsr::abb< DataType, SpatialDim, Frame, Index > & | d_metric, | ||
const tnsr::AA< DataType, SpatialDim, Frame, Index > & | inverse_metric | ||
) |
Computes Christoffel symbol of the second kind from derivative of metric and the inverse metric.
Computes Christoffel symbol \(\Gamma^a_{bc}\) as: \( \Gamma^d_{ab} = \frac{1}{2} g^{cd} (\partial_a g_{bc} + \partial_b g_{ac} - \partial_c g_{ab}) \) where \(g_{bc}\) is either a spatial or spacetime metric.
Avoids the extra memory allocation that occurs by computing the Christoffel symbol of the first kind and then raising the index.
tnsr::ijj< DataType, SpatialDim, Frame > gh::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.
If \( \Pi_{ab} \) and \( \Phi_{iab} \) are the generalized harmonic conjugate momentum and spatial derivative variables, and if \(n^a\) is the spacetime normal vector, then the extrinsic curvature can be written as
\begin{equation}\label{eq:kij} K_{ij} = \frac{1}{2} \Pi_{ij} + \Phi_{(ij)a} n^a, \end{equation}
and its covariant derivative as
\begin{equation}\label{eq:covkij} \nabla_k K_{ij} = \partial_k K_{ij} - \Gamma^l{}_{ik} K_{lj} - \Gamma^l{}_{jk} K_{li}, \end{equation}
where \(\Gamma^k{}_{ij}\) are Christoffel symbols of the second kind. The partial derivatives of extrinsic curvature can be computed as
\begin{equation}\label{eq:pdkij} \partial_k K_{ij} = \frac{1}{2}\left(\partial_k \Pi_{ij} + \left(\partial_k \Phi_{ija} + \partial_k \Phi_{jia}\right) n^a + \left(\Phi_{ija} + \Phi_{jia}\right) \partial_k n^a \right), \end{equation}
where we have access to all terms except the spatial derivatives of the spacetime unit normal vector \(\partial_k n^a\). Given that \(n^a=(1/\alpha, -\beta^i /\alpha)\), the temporal portion of \(\partial_k n^a\) can be computed as:
\begin{align} \partial_k n^0 =& -\frac{1}{\alpha^2} \partial_k \alpha, \nonumber \\ =& -\frac{1}{\alpha^2} (-\alpha/2) n^a \Phi_{kab} n^b, \nonumber \\ =& \frac{1}{2\alpha} n^a \Phi_{kab} n^b, \nonumber \\ =& \frac{1}{2} n^0 n^a \Phi_{kab} n^b, \nonumber \\ =& -\left(g^{0a} + \frac{1}{2}n^0 n^a\right) \Phi_{kab} n^b, \end{align}
where we use the expression for \(\partial_k \alpha\) from spatial_deriv_of_lapse; while the spatial portion of the same can be computed as:
\begin{align} \partial_k n^i =& -\partial_k (\beta^i/\alpha) = -\frac{1}{\alpha}\partial_k \beta^i + \frac{\beta^i}{\alpha^2}\partial_k \alpha ,\nonumber \\ =& -\frac{1}{2}\frac{\beta^i}{\alpha} n^a\Phi_{kab}n^b -\left(g^{ia} + n^i n^a\right) \Phi_{kab} n^b, \nonumber\\ =& -\left(g^{ia} + \frac{1}{2}n^i n^a\right) \Phi_{kab}n^b, \end{align}
where we use the expression for \(\partial_k \beta^i\) from spatial_deriv_of_shift. Combining the last two equations, we find that
\begin{equation} \partial_k n^a = -\left(g^{ab} + \frac{1}{2}n^a n^b\right)\Phi_{kbc}n^c, \end{equation}
and using Eq.( \(\ref{eq:covkij}\)) and Eq.( \(\ref{eq:pdkij}\)) with this, we can compute the covariant derivative of the extrinsic curvature as:
\begin{equation} \nabla_k K_{ij} = \frac{1}{2}\left(\partial_k \Pi_{ij} + \left(\partial_k \Phi_{ija} + \partial_k \Phi_{jia}\right) n^a - \left(\Phi_{ija} + \Phi_{jia}\right) \left(g^{ab} + \frac{1}{2}n^a n^b\right) \Phi_{kbc}n^c \right) - \Gamma^l{}_{ik} K_{lj} - \Gamma^l{}_{jk} K_{li} \end{equation}
.
tnsr::iJJ< DataType, Dim, Frame > gr::deriv_inverse_spatial_metric | ( | const tnsr::II< DataType, Dim, Frame > & | inverse_spatial_metric, |
const tnsr::ijj< DataType, Dim, Frame > & | d_spatial_metric | ||
) |
Computes the spatial derivative of the inverse spatial metric from the inverse spatial metric and the spatial derivative of the spatial metric.
Computes the derivative as:
\begin{align} \partial_k \gamma^{ij} &= -\gamma^{in} \gamma^{mj} \partial_k \gamma_{nm} \end{align}
where \(\gamma^{ij}\) and \(\partial_k \gamma_{ij}\) are the inverse spatial metric and spatial derivative of the spatial metric, respectively.
void gr::deriv_inverse_spatial_metric | ( | gsl::not_null< tnsr::iJJ< DataType, Dim, Frame > * > | result, |
const tnsr::II< DataType, Dim, Frame > & | inverse_spatial_metric, | ||
const tnsr::ijj< DataType, Dim, Frame > & | d_spatial_metric | ||
) |
Computes the spatial derivative of the inverse spatial metric from the inverse spatial metric and the spatial derivative of the spatial metric.
Computes the derivative as:
\begin{align} \partial_k \gamma^{ij} &= -\gamma^{in} \gamma^{mj} \partial_k \gamma_{nm} \end{align}
where \(\gamma^{ij}\) and \(\partial_k \gamma_{ij}\) are the inverse spatial metric and spatial derivative of the spatial metric, respectively.
tnsr::ijj< DataType, SpatialDim, Frame > gh::deriv_spatial_metric | ( | const tnsr::iaa< DataType, SpatialDim, Frame > & | phi | ) |
Computes spatial derivatives of the spatial metric from the generalized harmonic spatial derivative variable.
If \( \Phi_{kab} \) is the generalized harmonic spatial derivative variable, then the derivatives of the spatial metric are
\[ \partial_k \gamma_{ij} = \Phi_{kij} \]
This quantity is needed for computing spatial Christoffel symbols.
void gh::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.
If \( \Phi_{kab} \) is the generalized harmonic spatial derivative variable, then the derivatives of the spatial metric are
\[ \partial_k \gamma_{ij} = \Phi_{kij} \]
This quantity is needed for computing spatial Christoffel symbols.
tnsr::abb< DataType, SpatialDim, Frame > gr::derivatives_of_spacetime_metric | ( | 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 tnsr::ii< DataType, SpatialDim, Frame > & | dt_spatial_metric, | ||
const tnsr::ijj< DataType, SpatialDim, Frame > & | deriv_spatial_metric | ||
) |
Computes spacetime derivative of spacetime metric from spatial metric, lapse, shift, and their space and time derivatives.
Computes the derivatives as:
\begin{align} \partial_\mu g_{tt} &= - 2 \alpha \partial_\mu \alpha + 2 \gamma_{mn} \beta^m \partial_\mu \beta^n + \beta^m \beta^n \partial_\mu \gamma_{mn} \\ \partial_\mu g_{ti} &= \gamma_{mi} \partial_\mu \beta^m + \beta^m \partial_\mu \gamma_{mi} \\ \partial_\mu g_{ij} &= \partial_\mu \gamma_{ij} \end{align}
where \( \alpha, \beta^i, \gamma_{ij} \) are the lapse, shift, and spatial metric respectively.
void gr::derivatives_of_spacetime_metric | ( | gsl::not_null< tnsr::abb< DataType, SpatialDim, Frame > * > | spacetime_deriv_spacetime_metric, |
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 tnsr::ii< DataType, SpatialDim, Frame > & | dt_spatial_metric, | ||
const tnsr::ijj< DataType, SpatialDim, Frame > & | deriv_spatial_metric | ||
) |
Computes spacetime derivative of spacetime metric from spatial metric, lapse, shift, and their space and time derivatives.
Computes the derivatives as:
\begin{align} \partial_\mu g_{tt} &= - 2 \alpha \partial_\mu \alpha + 2 \gamma_{mn} \beta^m \partial_\mu \beta^n + \beta^m \beta^n \partial_\mu \gamma_{mn} \\ \partial_\mu g_{ti} &= \gamma_{mi} \partial_\mu \beta^m + \beta^m \partial_\mu \gamma_{mi} \\ \partial_\mu g_{ij} &= \partial_\mu \gamma_{ij} \end{align}
where \( \alpha, \beta^i, \gamma_{ij} \) are the lapse, shift, and spatial metric respectively.
void Ccz4::divergence_lapse | ( | const gsl::not_null< Scalar< DataType > * > | result, |
const Scalar< DataType > & | conformal_factor_squared, | ||
const tnsr::II< DataType, Dim, Frame > & | inverse_conformal_metric, | ||
const tnsr::ij< DataType, Dim, Frame > & | grad_grad_lapse | ||
) |
Computes the divergence of the lapse.
Computes the divergence as:
\begin{align} \nabla^i \nabla_i \alpha &= \phi^2 \tilde{\gamma}^{ij} (\nabla_i \nabla_j \alpha) \end{align}
where \(\phi\), \(\tilde{\gamma}^{ij}\), and \(\nabla_i \nabla_j \alpha\) are the conformal factor, inverse conformal spatial metric, and the gradient of the gradient of the lapse defined by Ccz4::Tags::ConformalFactor
, Ccz4::Tags::InverseConformalMetric
, and Ccz4::Tags::GradGradLapse
, respectively.
Scalar< DataType > Ccz4::divergence_lapse | ( | const Scalar< DataType > & | conformal_factor_squared, |
const tnsr::II< DataType, Dim, Frame > & | inverse_conformal_metric, | ||
const tnsr::ij< DataType, Dim, Frame > & | grad_grad_lapse | ||
) |
Computes the divergence of the lapse.
Computes the divergence as:
\begin{align} \nabla^i \nabla_i \alpha &= \phi^2 \tilde{\gamma}^{ij} (\nabla_i \nabla_j \alpha) \end{align}
where \(\phi\), \(\tilde{\gamma}^{ij}\), and \(\nabla_i \nabla_j \alpha\) are the conformal factor, inverse conformal spatial metric, and the gradient of the gradient of the lapse defined by Ccz4::Tags::ConformalFactor
, Ccz4::Tags::InverseConformalMetric
, and Ccz4::Tags::GradGradLapse
, respectively.
tnsr::ii< DataType, SpatialDim, Frame > gr::extrinsic_curvature | ( | const Scalar< DataType > & | 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::ii< DataType, SpatialDim, Frame > & | dt_spatial_metric, | ||
const tnsr::ijj< DataType, SpatialDim, Frame > & | deriv_spatial_metric | ||
) |
Computes extrinsic curvature from metric and derivatives.
Uses the ADM evolution equation for the spatial metric,
\[ K_{ij} = \frac{1}{2 \alpha} \left ( -\partial_0 \gamma_{ij} + \beta^k \partial_k \gamma_{ij} + \gamma_{ki} \partial_j \beta^k + \gamma_{kj} \partial_i \beta^k \right ) \]
where \(K_{ij}\) is the extrinsic curvature, \(\alpha\) is the lapse, \(\beta^i\) is the shift, and \(\gamma_{ij}\) is the spatial metric. In terms of the Lie derivative of the spatial metric with respect to a unit timelike vector \(n^a\) normal to the spatial slice, this corresponds to the sign convention
\[ K_{ab} = - \frac{1}{2} \mathcal{L}_{\mathbf{n}} \gamma_{ab} \]
where \(\gamma_{ab}\) is the spatial metric. See Eq. (2.53) in [14].
tnsr::ii< DataType, SpatialDim, Frame > gh::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.
If \( \Pi_{ab} \) and \( \Phi_{iab} \) are the generalized harmonic conjugate momentum and spatial derivative variables, and if \(n^a\) is the spacetime normal vector, then the extrinsic curvature is computed as
\begin{align} K_{ij} &= \frac{1}{2} \Pi_{ij} + \Phi_{(ij)a} n^a \end{align}
void gh::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.
If \( \Pi_{ab} \) and \( \Phi_{iab} \) are the generalized harmonic conjugate momentum and spatial derivative variables, and if \(n^a\) is the spacetime normal vector, then the extrinsic curvature is computed as
\begin{align} K_{ij} &= \frac{1}{2} \Pi_{ij} + \Phi_{(ij)a} n^a \end{align}
void gr::extrinsic_curvature | ( | gsl::not_null< tnsr::ii< DataType, SpatialDim, Frame > * > | ex_curvature, |
const Scalar< DataType > & | 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::ii< DataType, SpatialDim, Frame > & | dt_spatial_metric, | ||
const tnsr::ijj< DataType, SpatialDim, Frame > & | deriv_spatial_metric | ||
) |
Computes extrinsic curvature from metric and derivatives.
Uses the ADM evolution equation for the spatial metric,
\[ K_{ij} = \frac{1}{2 \alpha} \left ( -\partial_0 \gamma_{ij} + \beta^k \partial_k \gamma_{ij} + \gamma_{ki} \partial_j \beta^k + \gamma_{kj} \partial_i \beta^k \right ) \]
where \(K_{ij}\) is the extrinsic curvature, \(\alpha\) is the lapse, \(\beta^i\) is the shift, and \(\gamma_{ij}\) is the spatial metric. In terms of the Lie derivative of the spatial metric with respect to a unit timelike vector \(n^a\) normal to the spatial slice, this corresponds to the sign convention
\[ K_{ab} = - \frac{1}{2} \mathcal{L}_{\mathbf{n}} \gamma_{ab} \]
where \(\gamma_{ab}\) is the spatial metric. See Eq. (2.53) in [14].
ResultTensor transform::first_index_to_different_frame | ( | const InputTensor & | input, |
const InverseJacobian< DataType, Dim, SourceFrame, TargetFrame > & | inv_jacobian | ||
) |
Transforms only the first index to different frame.
A common example is taking the divergence of a flux vector \(F^i\), where the index \(i\) is in inertial coordinates \(x^i\) and the divergence is taken in logical coordinates \(\xi^\hat{i}\). So to transform the flux vector to logical coordinates before taking the divergence we do this:
\begin{align} F^\hat{i} &= F^i \frac{\partial x^\hat{i}}{\partial x^i} \end{align}
Here, \(\frac{\partial x^\hat{i}}{\partial x^i}\) is the inverse Jacobian (see definitions in TypeAliases.hpp).
Currently, this function is tested for any tensor with a first upper spatial index. It can be extended/generalized to other tensor types if needed.
void transform::first_index_to_different_frame | ( | gsl::not_null< ResultTensor * > | result, |
const InputTensor & | input, | ||
const InverseJacobian< DataType, Dim, SourceFrame, TargetFrame > & | inv_jacobian | ||
) |
Transforms only the first index to different frame.
A common example is taking the divergence of a flux vector \(F^i\), where the index \(i\) is in inertial coordinates \(x^i\) and the divergence is taken in logical coordinates \(\xi^\hat{i}\). So to transform the flux vector to logical coordinates before taking the divergence we do this:
\begin{align} F^\hat{i} &= F^i \frac{\partial x^\hat{i}}{\partial x^i} \end{align}
Here, \(\frac{\partial x^\hat{i}}{\partial x^i}\) is the inverse Jacobian (see definitions in TypeAliases.hpp).
Currently, this function is tested for any tensor with a first upper spatial index. It can be extended/generalized to other tensor types if needed.
tnsr::a< DataType, SpatialDim, Frame > gh::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.
If \(\alpha, \beta^i, \gamma_{ij}, \Gamma_{ijk}, K\) are the lapse, shift, spatial metric, spatial Christoffel symbols, and trace of the extrinsic curvature, then we compute
\begin{align} H_l &= \alpha^{-2} \gamma_{il}(\partial_t \beta^i - \beta^k \partial_k \beta^i) + \alpha^{-1} \partial_l \alpha - \gamma^{km}\Gamma_{lkm} \\ H_0 &= -\alpha^{-1} \partial_t \alpha + \alpha^{-1} \beta^k\partial_k \alpha + \beta^k H_k - \alpha K \end{align}
See Eqs. 8 and 9 of [127]
void gh::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.
If \(\alpha, \beta^i, \gamma_{ij}, \Gamma_{ijk}, K\) are the lapse, shift, spatial metric, spatial Christoffel symbols, and trace of the extrinsic curvature, then we compute
\begin{align} H_l &= \alpha^{-2} \gamma_{il}(\partial_t \beta^i - \beta^k \partial_k \beta^i) + \alpha^{-1} \partial_l \alpha - \gamma^{km}\Gamma_{lkm} \\ H_0 &= -\alpha^{-1} \partial_t \alpha + \alpha^{-1} \beta^k\partial_k \alpha + \beta^k H_k - \alpha K \end{align}
See Eqs. 8 and 9 of [127]
tnsr::a< DataType, VolumeDim, Frame > gr::interface_null_normal | ( | const tnsr::a< DataType, VolumeDim, Frame > & | spacetime_normal_one_form, |
const tnsr::i< DataType, VolumeDim, Frame > & | interface_unit_normal_one_form, | ||
double | sign | ||
) |
Compute null normal one-form to the boundary of a closed region in a spatial slice of spacetime.
Consider an \(n-1\)-dimensional boundary \(S\) of a closed region in an \(n\)-dimensional spatial hypersurface \(\Sigma\). Let \(s^a\) be the unit spacelike vector orthogonal to \(S\) in \(\Sigma\), and \(n^a\) be the timelike unit vector orthogonal to \(\Sigma\). This function returns the null one-form that is outgoing/incoming on \(S\):
\begin{align*} k_a = \frac{1}{\sqrt{2}}\left(n_a \pm s_a\right). \end{align*}
void gr::interface_null_normal | ( | gsl::not_null< tnsr::A< DataType, VolumeDim, Frame > * > | null_vector, |
const tnsr::A< DataType, VolumeDim, Frame > & | spacetime_normal_vector, | ||
const tnsr::I< DataType, VolumeDim, Frame > & | interface_unit_normal_vector, | ||
double | sign | ||
) |
Compute null normal vector to the boundary of a closed region in a spatial slice of spacetime.
Consider an \(n-1\)-dimensional boundary \(S\) of a closed region in an \(n\)-dimensional spatial hypersurface \(\Sigma\). Let \(s^a\) be the unit spacelike vector orthogonal to \(S\) in \(\Sigma\), and \(n^a\) be the timelike unit vector orthogonal to \(\Sigma\). This function returns the null vector that is outgoing/ingoing on \(S\):
\begin{align*} k^a = \frac{1}{\sqrt{2}}\left(n^a \pm s^a\right). \end{align*}
tnsr::AA< DataType, SpatialDim, Frame > gr::inverse_spacetime_metric | ( | const Scalar< DataType > & | lapse, |
const tnsr::I< DataType, SpatialDim, Frame > & | shift, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric | ||
) |
Compute inverse spacetime metric from inverse spatial metric, lapse and shift.
The inverse spacetime metric \( g^{ab} \) is calculated as
\begin{align} g^{tt} &= - 1/\alpha^2 \\ g^{ti} &= \beta^i / \alpha^2 \\ g^{ij} &= \gamma^{ij} - \beta^i \beta^j / \alpha^2 \end{align}
where \( \alpha, \beta^i\) and \( \gamma^{ij}\) are the lapse, shift and inverse spatial metric respectively
void gr::inverse_spacetime_metric | ( | gsl::not_null< tnsr::AA< DataType, SpatialDim, Frame > * > | inverse_spacetime_metric, |
const Scalar< DataType > & | lapse, | ||
const tnsr::I< DataType, SpatialDim, Frame > & | shift, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric | ||
) |
Compute inverse spacetime metric from inverse spatial metric, lapse and shift.
The inverse spacetime metric \( g^{ab} \) is calculated as
\begin{align} g^{tt} &= - 1/\alpha^2 \\ g^{ti} &= \beta^i / \alpha^2 \\ g^{ij} &= \gamma^{ij} - \beta^i \beta^j / \alpha^2 \end{align}
where \( \alpha, \beta^i\) and \( \gamma^{ij}\) are the lapse, shift and inverse spatial metric respectively
Scalar< DataType > gr::lapse | ( | const tnsr::I< DataType, SpatialDim, Frame > & | shift, |
const tnsr::aa< DataType, SpatialDim, Frame > & | spacetime_metric | ||
) |
Compute lapse from shift and spacetime metric.
Computes
\begin{align} \alpha &= \sqrt{\beta^i g_{it}-g_{tt}} \end{align}
where \( \alpha \), \( \beta^i\), and \(g_{ab}\) are the lapse, shift, and spacetime metric. This can be derived, e.g., from Eqs. 2.121–2.122 of Baumgarte & Shapiro.
void gr::lapse | ( | gsl::not_null< Scalar< DataType > * > | lapse, |
const tnsr::I< DataType, SpatialDim, Frame > & | shift, | ||
const tnsr::aa< DataType, SpatialDim, Frame > & | spacetime_metric | ||
) |
Compute lapse from shift and spacetime metric.
Computes
\begin{align} \alpha &= \sqrt{\beta^i g_{it}-g_{tt}} \end{align}
where \( \alpha \), \( \beta^i\), and \(g_{ab}\) are the lapse, shift, and spacetime metric. This can be derived, e.g., from Eqs. 2.121–2.122 of Baumgarte & Shapiro.
tnsr::iaa< DataType, SpatialDim, Frame > gh::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 \(\Phi_{iab}\) used by the generalized harmonic formulation of Einstein's equations.
If \( \alpha, \beta^i\) and \( \gamma_{ij} \) are the lapse, shift and spatial metric respectively, then \(\Phi_{iab} \) is computed as
\begin{align} \Phi_{ktt} &= - 2 \alpha \partial_k \alpha + 2 \gamma_{mn} \beta^m \partial_k \beta^n + \beta^m \beta^n \partial_k \gamma_{mn} \\ \Phi_{kti} &= \gamma_{mi} \partial_k \beta^m + \beta^m \partial_k \gamma_{mi} \\ \Phi_{kij} &= \partial_k \gamma_{ij} \end{align}
void gh::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 \(\Phi_{iab}\) used by the generalized harmonic formulation of Einstein's equations.
If \( \alpha, \beta^i\) and \( \gamma_{ij} \) are the lapse, shift and spatial metric respectively, then \(\Phi_{iab} \) is computed as
\begin{align} \Phi_{ktt} &= - 2 \alpha \partial_k \alpha + 2 \gamma_{mn} \beta^m \partial_k \beta^n + \beta^m \beta^n \partial_k \gamma_{mn} \\ \Phi_{kti} &= \gamma_{mi} \partial_k \beta^m + \beta^m \partial_k \gamma_{mi} \\ \Phi_{kij} &= \partial_k \gamma_{ij} \end{align}
tnsr::aa< DataType, SpatialDim, Frame > gh::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 \(\Pi_{ab}\) of the spacetime metric \( g_{ab} \).
If \( \alpha, \beta^i\) are the lapse and shift respectively, and \( \Phi_{iab} = \partial_i g_{ab} \) then \(\Pi_{\mu\nu} = -\frac{1}{\alpha} ( \partial_t g_{\mu\nu} - \beta^m \Phi_{m\mu\nu}) \) where \( \partial_t g_{ab} \) is computed as
\begin{align} \partial_t g_{tt} &= - 2 \alpha \partial_t \alpha + 2 \gamma_{mn} \beta^m \partial_t \beta^n + \beta^m \beta^n \partial_t \gamma_{mn} \\ \partial_t g_{ti} &= \gamma_{mi} \partial_t \beta^m + \beta^m \partial_t \gamma_{mi} \\ \partial_t g_{ij} &= \partial_t \gamma_{ij} \end{align}
void gh::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 \(\Pi_{ab}\) of the spacetime metric \( g_{ab} \).
If \( \alpha, \beta^i\) are the lapse and shift respectively, and \( \Phi_{iab} = \partial_i g_{ab} \) then \(\Pi_{\mu\nu} = -\frac{1}{\alpha} ( \partial_t g_{\mu\nu} - \beta^m \Phi_{m\mu\nu}) \) where \( \partial_t g_{ab} \) is computed as
\begin{align} \partial_t g_{tt} &= - 2 \alpha \partial_t \alpha + 2 \gamma_{mn} \beta^m \partial_t \beta^n + \beta^m \beta^n \partial_t \gamma_{mn} \\ \partial_t g_{ti} &= \gamma_{mi} \partial_t \beta^m + \beta^m \partial_t \gamma_{mi} \\ \partial_t g_{ij} &= \partial_t \gamma_{ij} \end{align}
Scalar< ComplexDataVector > gr::psi_4 | ( | const tnsr::ii< DataVector, 3, Frame > & | spatial_ricci, |
const tnsr::ii< DataVector, 3, Frame > & | extrinsic_curvature, | ||
const tnsr::ijj< DataVector, 3, Frame > & | cov_deriv_extrinsic_curvature, | ||
const tnsr::ii< DataVector, 3, Frame > & | spatial_metric, | ||
const tnsr::II< DataVector, 3, Frame > & | inverse_spatial_metric, | ||
const tnsr::I< DataVector, 3, Frame > & | inertial_coords | ||
) |
Computes Newman Penrose quantity \(\Psi_4\) using the characteristic field U \(^{8+}\) and complex vector \(\bar{m}^i\).
Computes \(\Psi_4\) as: \(\Psi_4 = U^{8+}_{ij}\bar{m}^i\bar{m}^j\) with the characteristic field \(U^{8+} = (P^{(a}_i P^{b)}_j - \frac{1}{2}P_{ij}P^{ab}) (E_{ab} - \epsilon_a^{cd}n_dB_{cb}\)) and \(\bar{m}^i\) = \(\frac{(x^i + iy^i)}{\sqrt{2}}\). \(x^i\) and \(y^i\) are normalized unit vectors in the frame Frame.
void gr::psi_4 | ( | gsl::not_null< Scalar< ComplexDataVector > * > | psi_4_result, |
const tnsr::ii< DataVector, 3, Frame > & | spatial_ricci, | ||
const tnsr::ii< DataVector, 3, Frame > & | extrinsic_curvature, | ||
const tnsr::ijj< DataVector, 3, Frame > & | cov_deriv_extrinsic_curvature, | ||
const tnsr::ii< DataVector, 3, Frame > & | spatial_metric, | ||
const tnsr::II< DataVector, 3, Frame > & | inverse_spatial_metric, | ||
const tnsr::I< DataVector, 3, Frame > & | inertial_coords | ||
) |
Computes Newman Penrose quantity \(\Psi_4\) using the characteristic field U \(^{8+}\) and complex vector \(\bar{m}^i\).
Computes \(\Psi_4\) as: \(\Psi_4 = U^{8+}_{ij}\bar{m}^i\bar{m}^j\) with the characteristic field \(U^{8+} = (P^{(a}_i P^{b)}_j - \frac{1}{2}P_{ij}P^{ab}) (E_{ab} - \epsilon_a^{cd}n_dB_{cb}\)) and \(\bar{m}^i\) = \(\frac{(x^i + iy^i)}{\sqrt{2}}\). \(x^i\) and \(y^i\) are normalized unit vectors in the frame Frame.
Tensor< DataType, Symmetry< 2, 1, 1 >, index_list< change_index_up_lo< Index0 >, Index1, Index1 > > raise_or_lower_first_index | ( | const Tensor< DataType, Symmetry< 2, 1, 1 >, index_list< Index0, Index1, Index1 > > & | tensor, |
const Tensor< DataType, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index0 >, change_index_up_lo< Index0 > > > & | metric | ||
) |
Raises or lowers the first index of a rank 3 tensor which is symmetric in the last two indices.
If \(T_{abc}\) is a tensor with \(T_{abc} = T_{acb}\) and the indices \(a,b,c,...\) can represent either spatial or spacetime indices, then the tensor \( T^a_{bc} = g^{ad} T_{abc} \) is computed, where \( g^{ab}\) is the inverse metric, which is either a spatial or spacetime metric. If a tensor \( S^a_{bc} \) is passed as an argument than the corresponding tensor \( S_{abc} \) is calculated with respect to the metric \(g_{ab}\). You may have to add a new instantiation of this template if you need a new use case.
void raise_or_lower_first_index | ( | gsl::not_null< Tensor< DataType, Symmetry< 2, 1, 1 >, index_list< change_index_up_lo< Index0 >, Index1, Index1 > > * > | result, |
const Tensor< DataType, Symmetry< 2, 1, 1 >, index_list< Index0, Index1, Index1 > > & | tensor, | ||
const Tensor< DataType, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index0 >, change_index_up_lo< Index0 > > > & | metric | ||
) |
Raises or lowers the first index of a rank 3 tensor which is symmetric in the last two indices.
If \(T_{abc}\) is a tensor with \(T_{abc} = T_{acb}\) and the indices \(a,b,c,...\) can represent either spatial or spacetime indices, then the tensor \( T^a_{bc} = g^{ad} T_{abc} \) is computed, where \( g^{ab}\) is the inverse metric, which is either a spatial or spacetime metric. If a tensor \( S^a_{bc} \) is passed as an argument than the corresponding tensor \( S_{abc} \) is calculated with respect to the metric \(g_{ab}\). You may have to add a new instantiation of this template if you need a new use case.
Tensor< DataTypeTensor, Symmetry< 1 >, index_list< change_index_up_lo< Index0 > > > raise_or_lower_index | ( | const Tensor< DataTypeTensor, Symmetry< 1 >, index_list< Index0 > > & | tensor, |
const Tensor< DataTypeMetric, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index0 >, change_index_up_lo< Index0 > > > & | metric | ||
) |
Raises or lowers the index of a rank 1 tensor.
If \(T_{a}\) is a tensor and the index \(a\) can represent either a spatial or spacetime index, then the tensor \( T^a = g^{ad} T_{d} \) is computed, where \( g^{ab}\) is the inverse metric, which is either a spatial or spacetime metric. If a tensor \( S^a \) is passed as an argument than the corresponding tensor \( S_{a} \) is calculated with respect to the metric \(g_{ab}\).
void raise_or_lower_index | ( | gsl::not_null< Tensor< DataTypeTensor, Symmetry< 1 >, index_list< change_index_up_lo< Index0 > > > * > | result, |
const Tensor< DataTypeTensor, Symmetry< 1 >, index_list< Index0 > > & | tensor, | ||
const Tensor< DataTypeMetric, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index0 >, change_index_up_lo< Index0 > > > & | metric | ||
) |
Raises or lowers the index of a rank 1 tensor.
If \(T_{a}\) is a tensor and the index \(a\) can represent either a spatial or spacetime index, then the tensor \( T^a = g^{ad} T_{d} \) is computed, where \( g^{ab}\) is the inverse metric, which is either a spatial or spacetime metric. If a tensor \( S^a \) is passed as an argument than the corresponding tensor \( S_{a} \) is calculated with respect to the metric \(g_{ab}\).
Scalar< DataType > gr::ricci_scalar | ( | const tnsr::aa< DataType, SpatialDim, Frame, Index > & | ricci_tensor, |
const tnsr::AA< DataType, SpatialDim, Frame, Index > & | inverse_metric | ||
) |
Computes the Ricci Scalar from the (spatial or spacetime) Ricci Tensor and inverse metrics.
Computes Ricci scalar using the inverse metric (spatial or spacetime) and Ricci tensor \(R = g^{ab}R_{ab}\)
void gr::ricci_scalar | ( | gsl::not_null< Scalar< DataType > * > | ricci_scalar_result, |
const tnsr::aa< DataType, SpatialDim, Frame, Index > & | ricci_tensor, | ||
const tnsr::AA< DataType, SpatialDim, Frame, Index > & | inverse_metric | ||
) |
Computes the Ricci Scalar from the (spatial or spacetime) Ricci Tensor and inverse metrics.
Computes Ricci scalar using the inverse metric (spatial or spacetime) and Ricci tensor \(R = g^{ab}R_{ab}\)
tnsr::aa< DataType, SpatialDim, Frame, Index > gr::ricci_tensor | ( | const tnsr::Abb< DataType, SpatialDim, Frame, Index > & | christoffel_2nd_kind, |
const tnsr::aBcc< DataType, SpatialDim, Frame, Index > & | d_christoffel_2nd_kind | ||
) |
Computes Ricci tensor from the (spatial or spacetime) Christoffel symbol of the second kind and its derivative.
Computes Ricci tensor \(R_{ab}\) as: \( R_{ab} = \partial_c \Gamma^{c}_{ab} - \partial_{(b} \Gamma^{c}_{a)c} + \Gamma^{d}_{ab}\Gamma^{c}_{cd} - \Gamma^{d}_{ac} \Gamma^{c}_{bd} \) where \(\Gamma^{a}_{bc}\) is the Christoffel symbol of the second kind.
void gr::ricci_tensor | ( | gsl::not_null< tnsr::aa< DataType, SpatialDim, Frame, Index > * > | result, |
const tnsr::Abb< DataType, SpatialDim, Frame, Index > & | christoffel_2nd_kind, | ||
const tnsr::aBcc< DataType, SpatialDim, Frame, Index > & | d_christoffel_2nd_kind | ||
) |
Computes Ricci tensor from the (spatial or spacetime) Christoffel symbol of the second kind and its derivative.
Computes Ricci tensor \(R_{ab}\) as: \( R_{ab} = \partial_c \Gamma^{c}_{ab} - \partial_{(b} \Gamma^{c}_{a)c} + \Gamma^{d}_{ab}\Gamma^{c}_{cd} - \Gamma^{d}_{ac} \Gamma^{c}_{bd} \) where \(\Gamma^{a}_{bc}\) is the Christoffel symbol of the second kind.
tnsr::aa< DataType, SpatialDim, Frame > gh::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.
Let the generalized harmonic conjugate momentum and spatial derivative variables be \(\Pi_{ab} = -n^c \partial_c g_{ab} \) and \(\Phi_{iab} = \partial_i g_{ab} \).
Using eq.(35) of [127] (with \(\gamma_1 = -1\)) the first time derivative of the spacetime metric may be expressed in terms of the above variables:
\[ \partial_0 g_{ab} = - \alpha \Pi_{ab} + \beta^k \Phi_{kab} \]
As such, its second time derivative is simply the following:
\[ \partial^2_0 g_{ab} = - (\partial_0 \alpha) \Pi_{ab} - \alpha \partial_0 \Pi_{ab} + (\partial_0 \beta^k) \Phi_{kab} + \beta^k \partial_0 \Phi_{kab} \]
void gh::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.
Let the generalized harmonic conjugate momentum and spatial derivative variables be \(\Pi_{ab} = -n^c \partial_c g_{ab} \) and \(\Phi_{iab} = \partial_i g_{ab} \).
Using eq.(35) of [127] (with \(\gamma_1 = -1\)) the first time derivative of the spacetime metric may be expressed in terms of the above variables:
\[ \partial_0 g_{ab} = - \alpha \Pi_{ab} + \beta^k \Phi_{kab} \]
As such, its second time derivative is simply the following:
\[ \partial^2_0 g_{ab} = - (\partial_0 \alpha) \Pi_{ab} - \alpha \partial_0 \Pi_{ab} + (\partial_0 \beta^k) \Phi_{kab} + \beta^k \partial_0 \Phi_{kab} \]
tnsr::I< DataType, SpatialDim, Frame > gr::shift | ( | const tnsr::aa< DataType, SpatialDim, Frame > & | spacetime_metric, |
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric | ||
) |
Compute shift from spacetime metric and inverse spatial metric.
Computes
\begin{align} \beta^i &= \gamma^{ij} g_{jt} \end{align}
where \( \beta^i\), \( \gamma^{ij}\), and \(g_{ab}\) are the shift, inverse spatial metric, and spacetime metric. This can be derived, e.g., from Eqs. 2.121–2.122 of Baumgarte & Shapiro.
void gr::shift | ( | gsl::not_null< tnsr::I< DataType, SpatialDim, Frame > * > | shift, |
const tnsr::aa< DataType, SpatialDim, Frame > & | spacetime_metric, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric | ||
) |
Compute shift from spacetime metric and inverse spatial metric.
Computes
\begin{align} \beta^i &= \gamma^{ij} g_{jt} \end{align}
where \( \beta^i\), \( \gamma^{ij}\), and \(g_{ab}\) are the shift, inverse spatial metric, and spacetime metric. This can be derived, e.g., from Eqs. 2.121–2.122 of Baumgarte & Shapiro.
tnsr::a< DataType, SpatialDim, Frame > gh::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.
Using the relation \( \partial_a \gamma = \gamma \gamma^{jk} \partial_a \gamma_{jk} \)
void gh::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.
Using the relation \( \partial_a \gamma = \gamma \gamma^{jk} \partial_a \gamma_{jk} \)
tnsr::aBB< DataType, SpatialDim, Frame > gr::spacetime_deriv_of_goth_g | ( | const tnsr::AA< DataType, SpatialDim, Frame > & | inverse_spacetime_metric, |
const tnsr::abb< DataType, SpatialDim, Frame > & | da_spacetime_metric, | ||
const Scalar< DataType > & | lapse, | ||
const tnsr::a< DataType, SpatialDim, Frame > & | da_lapse, | ||
const Scalar< DataType > & | sqrt_det_spatial_metric, | ||
const tnsr::a< DataType, SpatialDim, Frame > & | da_det_spatial_metric | ||
) |
Computes spacetime derivative of \( \mathfrak{g}^{ab}\equiv (-g)^{1/2} g^{ab} \).
Computes the spacetime derivative of \( \mathfrak{g}^{ab}\equiv (-g)^{1/2} g^{ab} \), defined in [140]. Using \( (-g)^{1/2} = \alpha (\gamma)^{1/2} \), where \( \alpha \) is the lapse and \( \gamma \) is the determinant of the spatial metric ([14]), the derivative of \( \mathfrak{g}^{ab} \) expands out to
\begin{align} \partial_c \mathfrak{g}^{ab} &= \left[\partial_c \alpha \gamma^{1/2} + \frac{1}{2} \alpha \partial_c \gamma \gamma^{-1/2} \right] g^{ab} - \alpha \gamma^{1/2} g^{ad} g^{be} \partial_c g_{de}. \end{align}
void gr::spacetime_deriv_of_goth_g | ( | gsl::not_null< tnsr::aBB< DataType, SpatialDim, Frame > * > | da_goth_g, |
const tnsr::AA< DataType, SpatialDim, Frame > & | inverse_spacetime_metric, | ||
const tnsr::abb< DataType, SpatialDim, Frame > & | da_spacetime_metric, | ||
const Scalar< DataType > & | lapse, | ||
const tnsr::a< DataType, SpatialDim, Frame > & | da_lapse, | ||
const Scalar< DataType > & | sqrt_det_spatial_metric, | ||
const tnsr::a< DataType, SpatialDim, Frame > & | da_det_spatial_metric | ||
) |
Computes spacetime derivative of \( \mathfrak{g}^{ab}\equiv (-g)^{1/2} g^{ab} \).
Computes the spacetime derivative of \( \mathfrak{g}^{ab}\equiv (-g)^{1/2} g^{ab} \), defined in [140]. Using \( (-g)^{1/2} = \alpha (\gamma)^{1/2} \), where \( \alpha \) is the lapse and \( \gamma \) is the determinant of the spatial metric ([14]), the derivative of \( \mathfrak{g}^{ab} \) expands out to
\begin{align} \partial_c \mathfrak{g}^{ab} &= \left[\partial_c \alpha \gamma^{1/2} + \frac{1}{2} \alpha \partial_c \gamma \gamma^{-1/2} \right] g^{ab} - \alpha \gamma^{1/2} g^{ad} g^{be} \partial_c g_{de}. \end{align}
tnsr::a< DataType, SpatialDim, Frame > gh::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.
The same is computed as:
\begin{align*} \partial_a (\beta^i \beta_i) = (\beta_i \partial_0 \beta^i + \beta^i \partial_0 \beta_i, \beta_i \partial_j \beta^i + \beta^i \partial_j \beta_i) \end{align*}
void gh::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.
The same is computed as:
\begin{align*} \partial_a (\beta^i \beta_i) = (\beta_i \partial_0 \beta^i + \beta^i \partial_0 \beta_i, \beta_i \partial_j \beta^i + \beta^i \partial_j \beta_i) \end{align*}
void gh::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, \(\partial_a g_{bc}\).
\begin{align*} \partial_t g_{ab}&=-\alpha \Pi_{ab} + \beta^i \Phi_{iab} \\ \partial_i g_{ab}&=\Phi_{iab} \end{align*}
tnsr::aa< DataType, SpatialDim, Frame > gr::spacetime_metric | ( | const Scalar< DataType > & | lapse, |
const tnsr::I< DataType, SpatialDim, Frame > & | shift, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | spatial_metric | ||
) |
Computes the spacetime metric from the spatial metric, lapse, and shift.
The spacetime metric \( g_{ab} \) is calculated as
\begin{align} g_{tt} &= - \alpha^2 + \beta^m \beta^n \gamma_{mn} \\ g_{ti} &= \gamma_{mi} \beta^m \\ g_{ij} &= \gamma_{ij} \end{align}
where \( \alpha, \beta^i\) and \( \gamma_{ij}\) are the lapse, shift and spatial metric respectively
void gr::spacetime_metric | ( | gsl::not_null< tnsr::aa< DataType, Dim, Frame > * > | spacetime_metric, |
const Scalar< DataType > & | lapse, | ||
const tnsr::I< DataType, Dim, Frame > & | shift, | ||
const tnsr::ii< DataType, Dim, Frame > & | spatial_metric | ||
) |
Computes the spacetime metric from the spatial metric, lapse, and shift.
The spacetime metric \( g_{ab} \) is calculated as
\begin{align} g_{tt} &= - \alpha^2 + \beta^m \beta^n \gamma_{mn} \\ g_{ti} &= \gamma_{mi} \beta^m \\ g_{ij} &= \gamma_{ij} \end{align}
where \( \alpha, \beta^i\) and \( \gamma_{ij}\) are the lapse, shift and spatial metric respectively
tnsr::A< DataType, SpatialDim, Frame > gr::spacetime_normal_vector | ( | const Scalar< DataType > & | lapse, |
const tnsr::I< DataType, SpatialDim, Frame > & | shift | ||
) |
Computes spacetime normal vector from lapse and shift.
If \(\alpha, \beta^i\) are the lapse and shift respectively, then
\begin{align} n^t &= 1/\alpha \\ n^i &= -\frac{\beta^i}{\alpha} \end{align}
is computed.
void gr::spacetime_normal_vector | ( | gsl::not_null< tnsr::A< DataType, SpatialDim, Frame > * > | spacetime_normal_vector, |
const Scalar< DataType > & | lapse, | ||
const tnsr::I< DataType, SpatialDim, Frame > & | shift | ||
) |
Computes spacetime normal vector from lapse and shift.
If \(\alpha, \beta^i\) are the lapse and shift respectively, then
\begin{align} n^t &= 1/\alpha \\ n^i &= -\frac{\beta^i}{\alpha} \end{align}
is computed.
tnsr::i< DataType, SpatialDim, Frame > gh::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 ( \(\alpha\)) from the generalized harmonic variables and spacetime unit normal 1-form.
If the generalized harmonic conjugate momentum and spatial derivative variables are \(\Pi_{ab} = -n^c \partial_c g_{ab} \) and \(\Phi_{iab} = \partial_i g_{ab} \), the spatial derivatives of \(\alpha\) can be obtained from:
\begin{align*} n^a n^b \Phi_{iab} = -\frac{1}{2\alpha} [\partial_i (-\alpha^2 + \beta_j\beta^j)- 2 \beta^j \partial_i \beta_j + \beta^j \beta^k \partial_i \gamma_{jk}] = -\frac{2}{\alpha} \partial_i \alpha, \end{align*}
since
\[ \partial_i (\beta_j\beta^j) = 2\beta^j \partial_i \beta_j - \beta^j \beta^k \partial_i \gamma_{jk}. \]
\[ \Longrightarrow \partial_i \alpha = -(\alpha/2) n^a \Phi_{iab} n^b \]
void gh::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 ( \(\alpha\)) from the generalized harmonic variables and spacetime unit normal 1-form.
If the generalized harmonic conjugate momentum and spatial derivative variables are \(\Pi_{ab} = -n^c \partial_c g_{ab} \) and \(\Phi_{iab} = \partial_i g_{ab} \), the spatial derivatives of \(\alpha\) can be obtained from:
\begin{align*} n^a n^b \Phi_{iab} = -\frac{1}{2\alpha} [\partial_i (-\alpha^2 + \beta_j\beta^j)- 2 \beta^j \partial_i \beta_j + \beta^j \beta^k \partial_i \gamma_{jk}] = -\frac{2}{\alpha} \partial_i \alpha, \end{align*}
since
\[ \partial_i (\beta_j\beta^j) = 2\beta^j \partial_i \beta_j - \beta^j \beta^k \partial_i \gamma_{jk}. \]
\[ \Longrightarrow \partial_i \alpha = -(\alpha/2) n^a \Phi_{iab} n^b \]
tnsr::iJ< DataType, SpatialDim, Frame > gh::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.
Spatial derivatives of the shift vector \(\beta^i\) can be derived from the following steps:
\begin{align*} \partial_i \beta^j =& \gamma^{jl} \gamma_{kl} \partial_i \beta^k \\ =& \gamma^{jl} (\beta^k \partial_i \gamma_{lk} + \gamma_{kl}\partial_i \beta^k - \beta^k \partial_i \gamma_{kl}) \\ =& \gamma^{jl} (\partial_i \beta_l - \beta^k \partial_i \gamma_{lk}) (\because \gamma^{j0} = 0) \\ =& \gamma^{ja} (\partial_i g_{a0} - \beta^k \partial _i g_{ak}) \\ =& \alpha \gamma^{ja} n^b \partial_i g_{ab} \\ =& (\gamma^{ja} - n^j n^a) \alpha n^b \Phi_{iab} - 2 n^j \partial_i \alpha \\ =& g^{ja} \alpha n^b \Phi_{iab} - 2 n^j \partial_i \alpha \\ =& \alpha (g^{ja} + n^j n^a) n^b \Phi_{iab}. \end{align*}
where we used the equation from spatial_deriv_of_lapse() for \(\partial_i \alpha\).
void gh::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.
Spatial derivatives of the shift vector \(\beta^i\) can be derived from the following steps:
\begin{align*} \partial_i \beta^j =& \gamma^{jl} \gamma_{kl} \partial_i \beta^k \\ =& \gamma^{jl} (\beta^k \partial_i \gamma_{lk} + \gamma_{kl}\partial_i \beta^k - \beta^k \partial_i \gamma_{kl}) \\ =& \gamma^{jl} (\partial_i \beta_l - \beta^k \partial_i \gamma_{lk}) (\because \gamma^{j0} = 0) \\ =& \gamma^{ja} (\partial_i g_{a0} - \beta^k \partial _i g_{ak}) \\ =& \alpha \gamma^{ja} n^b \partial_i g_{ab} \\ =& (\gamma^{ja} - n^j n^a) \alpha n^b \Phi_{iab} - 2 n^j \partial_i \alpha \\ =& g^{ja} \alpha n^b \Phi_{iab} - 2 n^j \partial_i \alpha \\ =& \alpha (g^{ja} + n^j n^a) n^b \Phi_{iab}. \end{align*}
where we used the equation from spatial_deriv_of_lapse() for \(\partial_i \alpha\).
tnsr::ii< DataType, SpatialDim, Frame > gr::spatial_metric | ( | const tnsr::aa< DataType, SpatialDim, Frame > & | spacetime_metric | ) |
Compute spatial metric from spacetime metric.
Simply pull out the spatial components.
void gr::spatial_metric | ( | gsl::not_null< tnsr::ii< DataType, SpatialDim, Frame > * > | spatial_metric, |
const tnsr::aa< DataType, SpatialDim, Frame > & | spacetime_metric | ||
) |
Compute spatial metric from spacetime metric.
Simply pull out the spatial components.
tnsr::ii< DataType, VolumeDim, Frame > gh::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.
Lets write the Christoffel symbols of the first kind as
\begin{align} \Gamma_{kij} = \frac{1}{2}(\partial_i \gamma_{jk} + \partial_j \gamma_{ik} - \partial_k \gamma_{ij}) = (\Phi_{(ij)k} - \frac{1}{2}\Phi_{kij}) \end{align}
substituting \(\partial_k \gamma_{ij}\rightarrow{}\Phi_{kij}\) by subtracting out the three-index constraint \(C_{kij}=\partial_{k}\gamma_{ij}-\Phi_{kij}\) from every term. We also define contractions \(d_k=\frac{1}{2}\gamma^{ij}\Phi_{kij}\) and \(b_k=\frac{1}{2}\gamma^{ij}\Phi_{ijk}\). This allows us to rewrite the spatial Ricci tensor as:
\begin{align} R_{i j} =& \partial_k \Gamma^{k}_{ij} - \partial_i \Gamma^{k}_{kj} + \Gamma^{k}_{kl}\Gamma^{l}_{ij} - \Gamma^{l}_{ki}\Gamma^{k}_{lj},\\ =& \gamma^{kl}\left(\partial_{k}\Phi_{(ij)l} - \frac{1}{2}\partial_{k}\Phi_{lij}\right) - b^{l} (\Phi_{(ij)l} - \frac{1}{2}\Phi_{lij})\nonumber\\ & - \gamma^{kl}\left(\partial_{i}\Phi_{(kj)l} - \frac{1}{2}\partial_{i}\Phi_{lkj}\right) - \Phi_{i}{}^{kl}\left(\Phi_{(kj)l} - \frac{1}{2}\Phi_{lkj} \right)\nonumber\\ & + \gamma^{km}\left(\Phi_{(kl)m} - \frac{1}{2}\Phi_{mkl}\right) \gamma^{ln}\left(\Phi_{(ij)n} - \frac{1}{2}\Phi_{nij}\right) \nonumber\\ & - \gamma^{km}\left(\Phi_{(il)m} - \frac{1}{2}\Phi_{mil}\right) \gamma^{ln}\left(\Phi_{(jk)n} - \frac{1}{2}\Phi_{njk}\right). \end{align}
Gathering all terms with second derivatives:
\begin{align} R_{i j} =& \frac{1}{2} \gamma^{k l} \left(\partial_k\Phi_{ijl} + \partial_k\Phi_{jil} - \partial_k\Phi_{lij} + \partial_i\Phi_{lkj} - \partial_i\Phi_{kjl} - \partial_i\Phi_{jkl}\right) + \mathcal{O}(\Phi), \nonumber\\ =& \frac{1}{2} \gamma^{kl} \left(\partial_{(j}\Phi_{lki)} - \partial_{(j}\Phi_{i)kl} + \partial_k \Phi_{(ij)l} - \partial_l \Phi_{kij} \right) + \mathcal{O}(\Phi), \end{align}
where we use the four-index constraint \(C_{klij}=\partial_k\Phi_{lij}-\partial_l\Phi_{kij}=0\) to swap the first and second derivatives of the spatial metric, and symmetrize \(R_{ij} = R_{(ij)}\). Similarly gathering the remaining terms and using the four-index constraint we get:
\begin{align} R_{i j} =& - b^k\left(\Phi_{ijk} + \Phi_{jik} - \Phi_{kij}\right) -\frac{1}{2} \Phi_i{}^{kl} \left(\Phi_{jkl} + \Phi_{kjl} - \Phi_{lkj}\right)\nonumber\\ &+ \frac{1}{2} d^k \left(\Phi_{ijk} + \Phi_{jik} - \Phi_{kij}\right) - \left(\Phi_{(il)}{}^k - \frac{1}{2} \Phi^k{}_{il}\right) \left(\Phi_{(kj)}{}^l - \frac{1}{2} \Phi^l{}_{kj}\right) + \mathcal{O}(\partial\Phi) \\ =& \frac{1}{2} \left(\Phi_{ijk} + \Phi_{jik} - \Phi_{kij}\right) (d^k - 2 b^k) + \frac{1}{4} \Phi_{ik}{}^l \Phi_{jl}{}^k + \frac{1}{2} \left(\Phi^k{}_{il} \Phi_{kj}{}^l - \Phi^k{}_{li} \Phi^l{}_{kj}\right) + \mathcal{O}(\partial\Phi). \end{align}
Gathering everything together, we compute the spatial Ricci tensor as:
\begin{eqnarray} R_{i j} &=& \frac{1}{2} \gamma^{kl} \left(\partial_{(j|}\Phi_{lk|i)} - \partial_{(j}\Phi_{i)kl} + \partial_k \Phi_{(ij)l} - \partial_l \Phi_{kij}\right)\nonumber\\ &+& \frac{1}{2} \left(\Phi_{ijk} + \Phi_{jik} - \Phi_{kij}\right) (d^k - 2 b^k) + \frac{1}{4} \Phi_{ik}{}^l \Phi_{jl}{}^k + \frac{1}{2} \left(\Phi^k{}_{il} \Phi_{kj}{}^l - \Phi^k{}_{li} \Phi^l{}_{kj}\right). \label{eq:rij} \end{eqnarray}
This follows from equations (2.13) - (2.20) of [109] .
Note that, in code, the mixed-index variables \(\Phi_{ij}{}^k\) and \(\Phi^i{}_{jk}\) in Eq.( \(\ref{eq:rij}\)) are computed with a factor of \(1/2\) and so the last 3 terms in the same equation that are quadratic in these terms occur multiplied by a factor of \(4\).
void gh::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.
Lets write the Christoffel symbols of the first kind as
\begin{align} \Gamma_{kij} = \frac{1}{2}(\partial_i \gamma_{jk} + \partial_j \gamma_{ik} - \partial_k \gamma_{ij}) = (\Phi_{(ij)k} - \frac{1}{2}\Phi_{kij}) \end{align}
substituting \(\partial_k \gamma_{ij}\rightarrow{}\Phi_{kij}\) by subtracting out the three-index constraint \(C_{kij}=\partial_{k}\gamma_{ij}-\Phi_{kij}\) from every term. We also define contractions \(d_k=\frac{1}{2}\gamma^{ij}\Phi_{kij}\) and \(b_k=\frac{1}{2}\gamma^{ij}\Phi_{ijk}\). This allows us to rewrite the spatial Ricci tensor as:
\begin{align} R_{i j} =& \partial_k \Gamma^{k}_{ij} - \partial_i \Gamma^{k}_{kj} + \Gamma^{k}_{kl}\Gamma^{l}_{ij} - \Gamma^{l}_{ki}\Gamma^{k}_{lj},\\ =& \gamma^{kl}\left(\partial_{k}\Phi_{(ij)l} - \frac{1}{2}\partial_{k}\Phi_{lij}\right) - b^{l} (\Phi_{(ij)l} - \frac{1}{2}\Phi_{lij})\nonumber\\ & - \gamma^{kl}\left(\partial_{i}\Phi_{(kj)l} - \frac{1}{2}\partial_{i}\Phi_{lkj}\right) - \Phi_{i}{}^{kl}\left(\Phi_{(kj)l} - \frac{1}{2}\Phi_{lkj} \right)\nonumber\\ & + \gamma^{km}\left(\Phi_{(kl)m} - \frac{1}{2}\Phi_{mkl}\right) \gamma^{ln}\left(\Phi_{(ij)n} - \frac{1}{2}\Phi_{nij}\right) \nonumber\\ & - \gamma^{km}\left(\Phi_{(il)m} - \frac{1}{2}\Phi_{mil}\right) \gamma^{ln}\left(\Phi_{(jk)n} - \frac{1}{2}\Phi_{njk}\right). \end{align}
Gathering all terms with second derivatives:
\begin{align} R_{i j} =& \frac{1}{2} \gamma^{k l} \left(\partial_k\Phi_{ijl} + \partial_k\Phi_{jil} - \partial_k\Phi_{lij} + \partial_i\Phi_{lkj} - \partial_i\Phi_{kjl} - \partial_i\Phi_{jkl}\right) + \mathcal{O}(\Phi), \nonumber\\ =& \frac{1}{2} \gamma^{kl} \left(\partial_{(j}\Phi_{lki)} - \partial_{(j}\Phi_{i)kl} + \partial_k \Phi_{(ij)l} - \partial_l \Phi_{kij} \right) + \mathcal{O}(\Phi), \end{align}
where we use the four-index constraint \(C_{klij}=\partial_k\Phi_{lij}-\partial_l\Phi_{kij}=0\) to swap the first and second derivatives of the spatial metric, and symmetrize \(R_{ij} = R_{(ij)}\). Similarly gathering the remaining terms and using the four-index constraint we get:
\begin{align} R_{i j} =& - b^k\left(\Phi_{ijk} + \Phi_{jik} - \Phi_{kij}\right) -\frac{1}{2} \Phi_i{}^{kl} \left(\Phi_{jkl} + \Phi_{kjl} - \Phi_{lkj}\right)\nonumber\\ &+ \frac{1}{2} d^k \left(\Phi_{ijk} + \Phi_{jik} - \Phi_{kij}\right) - \left(\Phi_{(il)}{}^k - \frac{1}{2} \Phi^k{}_{il}\right) \left(\Phi_{(kj)}{}^l - \frac{1}{2} \Phi^l{}_{kj}\right) + \mathcal{O}(\partial\Phi) \\ =& \frac{1}{2} \left(\Phi_{ijk} + \Phi_{jik} - \Phi_{kij}\right) (d^k - 2 b^k) + \frac{1}{4} \Phi_{ik}{}^l \Phi_{jl}{}^k + \frac{1}{2} \left(\Phi^k{}_{il} \Phi_{kj}{}^l - \Phi^k{}_{li} \Phi^l{}_{kj}\right) + \mathcal{O}(\partial\Phi). \end{align}
Gathering everything together, we compute the spatial Ricci tensor as:
\begin{eqnarray} R_{i j} &=& \frac{1}{2} \gamma^{kl} \left(\partial_{(j|}\Phi_{lk|i)} - \partial_{(j}\Phi_{i)kl} + \partial_k \Phi_{(ij)l} - \partial_l \Phi_{kij}\right)\nonumber\\ &+& \frac{1}{2} \left(\Phi_{ijk} + \Phi_{jik} - \Phi_{kij}\right) (d^k - 2 b^k) + \frac{1}{4} \Phi_{ik}{}^l \Phi_{jl}{}^k + \frac{1}{2} \left(\Phi^k{}_{il} \Phi_{kj}{}^l - \Phi^k{}_{li} \Phi^l{}_{kj}\right). \label{eq:rij} \end{eqnarray}
This follows from equations (2.13) - (2.20) of [109] .
Note that, in code, the mixed-index variables \(\Phi_{ij}{}^k\) and \(\Phi^i{}_{jk}\) in Eq.( \(\ref{eq:rij}\)) are computed with a factor of \(1/2\) and so the last 3 terms in the same equation that are quadratic in these terms occur multiplied by a factor of \(4\).
Scalar< DataType > gh::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 ( \(\alpha\)) from the generalized harmonic variables, lapse, shift and the spacetime unit normal 1-form.
Let the generalized harmonic conjugate momentum and spatial derivative variables be \(\Pi_{ab} = -n^c \partial_c g_{ab} \) and \(\Phi_{iab} = \partial_i g_{ab} \), and the operator \(D := \partial_0 - \beta^k \partial_k \). The time derivative of \(\alpha\) is then:
\begin{align*} \frac{1}{2} \alpha^2 n^a n^b \Pi_{ab} - \frac{1}{2} \alpha \beta^i n^a n^b \Phi_{iab} =& \frac{1}{2} \alpha^2 n^a n^b n^c \partial_c g_{ab} - \frac{1}{2} \alpha \beta^i (-(2/\alpha) \partial_i \alpha) \\ =& \frac{1}{2} \alpha^2 [ \\ &-(1/\alpha^3) D[\gamma_{jk} \beta^j \beta^k - \alpha^2] \\ &- (\beta^j \beta^k / \alpha^3)D[\gamma_{jk}] \\ &+ 2 (\beta^j / \alpha^3) D[\gamma_{jk} \beta^k] \\ &+ (2 / \alpha^2)(\beta^i \partial_i \alpha)]] \\ =& \frac{1}{2\alpha} [-D[\gamma_{jk}\beta^j\beta^k - \alpha^2] - \beta^j\beta^k D[\gamma_{jk}] + 2\alpha \beta^k\partial_k \alpha + 2\beta^j D[\gamma_{jk}\beta^k]] \\ =& D[\alpha] + \beta^k\partial_k \alpha \\ =& \partial_0 \alpha \end{align*}
where the simplification done for \(\partial_i \alpha\) is used to substitute for the second term ( \(\frac{1}{2} \alpha \beta^i n^a n^b \Phi_{iab}\)).
Thus,
\[ \partial_0 \alpha = (\alpha/2)(\alpha n^a n^b \Pi_{ab} - \beta^i n^a n^b \Phi_{iab}) \]
void gh::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 ( \(\alpha\)) from the generalized harmonic variables, lapse, shift and the spacetime unit normal 1-form.
Let the generalized harmonic conjugate momentum and spatial derivative variables be \(\Pi_{ab} = -n^c \partial_c g_{ab} \) and \(\Phi_{iab} = \partial_i g_{ab} \), and the operator \(D := \partial_0 - \beta^k \partial_k \). The time derivative of \(\alpha\) is then:
\begin{align*} \frac{1}{2} \alpha^2 n^a n^b \Pi_{ab} - \frac{1}{2} \alpha \beta^i n^a n^b \Phi_{iab} =& \frac{1}{2} \alpha^2 n^a n^b n^c \partial_c g_{ab} - \frac{1}{2} \alpha \beta^i (-(2/\alpha) \partial_i \alpha) \\ =& \frac{1}{2} \alpha^2 [ \\ &-(1/\alpha^3) D[\gamma_{jk} \beta^j \beta^k - \alpha^2] \\ &- (\beta^j \beta^k / \alpha^3)D[\gamma_{jk}] \\ &+ 2 (\beta^j / \alpha^3) D[\gamma_{jk} \beta^k] \\ &+ (2 / \alpha^2)(\beta^i \partial_i \alpha)]] \\ =& \frac{1}{2\alpha} [-D[\gamma_{jk}\beta^j\beta^k - \alpha^2] - \beta^j\beta^k D[\gamma_{jk}] + 2\alpha \beta^k\partial_k \alpha + 2\beta^j D[\gamma_{jk}\beta^k]] \\ =& D[\alpha] + \beta^k\partial_k \alpha \\ =& \partial_0 \alpha \end{align*}
where the simplification done for \(\partial_i \alpha\) is used to substitute for the second term ( \(\frac{1}{2} \alpha \beta^i n^a n^b \Phi_{iab}\)).
Thus,
\[ \partial_0 \alpha = (\alpha/2)(\alpha n^a n^b \Pi_{ab} - \beta^i n^a n^b \Phi_{iab}) \]
tnsr::i< DataType, SpatialDim, Frame > gh::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.
The time derivative of \( \beta_i \) is given by:
\begin{align*} \partial_0 \beta_i = \gamma_{ij} \partial_0 \beta^j + \beta^j \partial_0 \gamma_{ij} \end{align*}
where the first term is obtained from time_deriv_of_shift()
, and the latter is a user input.
void gh::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.
The time derivative of \( \beta_i \) is given by:
\begin{align*} \partial_0 \beta_i = \gamma_{ij} \partial_0 \beta^j + \beta^j \partial_0 \gamma_{ij} \end{align*}
where the first term is obtained from time_deriv_of_shift()
, and the latter is a user input.
tnsr::I< DataType, SpatialDim, Frame > gh::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.
The time derivative of \( \beta^i \) can be derived from the following steps:
\begin{align*} \partial_0 \beta^i =& \gamma^{ik} \partial_0 (\gamma_{kj} \beta^j) - \beta^j \gamma^{ik} \partial_0 \gamma_{kj} \\ =& \alpha \gamma^{ik} n^b \partial_0 g_{kb} \\ =& \alpha \gamma^{ik} n^b (\partial_0 - \beta^j\partial_j) g_{kb} + \alpha \gamma^{ik} n^b \beta^j\partial_j g_{kb} \\ =& -\alpha^2 n^b\Pi_{kb} \gamma^{ik} + \alpha \beta^j n^b\Phi_{jkb} \gamma^{ik} \\ =& -\alpha \gamma^{ik} n^b (\alpha \Pi_{kb} - \beta^j \Phi_{jkb}) \\ \end{align*}
void gh::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.
The time derivative of \( \beta^i \) can be derived from the following steps:
\begin{align*} \partial_0 \beta^i =& \gamma^{ik} \partial_0 (\gamma_{kj} \beta^j) - \beta^j \gamma^{ik} \partial_0 \gamma_{kj} \\ =& \alpha \gamma^{ik} n^b \partial_0 g_{kb} \\ =& \alpha \gamma^{ik} n^b (\partial_0 - \beta^j\partial_j) g_{kb} + \alpha \gamma^{ik} n^b \beta^j\partial_j g_{kb} \\ =& -\alpha^2 n^b\Pi_{kb} \gamma^{ik} + \alpha \beta^j n^b\Phi_{jkb} \gamma^{ik} \\ =& -\alpha \gamma^{ik} n^b (\alpha \Pi_{kb} - \beta^j \Phi_{jkb}) \\ \end{align*}
tnsr::ii< DataType, SpatialDim, Frame > gh::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.
Let the generalized harmonic conjugate momentum and spatial derivative variables be \(\Pi_{ab} = -n^c \partial_c g_{ab} \) and \(\Phi_{iab} = \partial_i g_{ab} \). As \( n_i \equiv 0 \). The time derivative of the spatial metric is given by the time derivative of the spatial sector of the spacetime metric, i.e. \( \partial_0 \gamma_{ij} = \partial_0 g_{ij} \).
To compute the latter, we use the evolution equation for \( g_{ij} \), c.f. eq.(35) of [127] (with \(\gamma_1 = -1\)):
\[ \partial_0 g_{ab} = - \alpha \Pi_{ab} + \beta^k \Phi_{kab} \]
void gh::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.
Let the generalized harmonic conjugate momentum and spatial derivative variables be \(\Pi_{ab} = -n^c \partial_c g_{ab} \) and \(\Phi_{iab} = \partial_i g_{ab} \). As \( n_i \equiv 0 \). The time derivative of the spatial metric is given by the time derivative of the spatial sector of the spacetime metric, i.e. \( \partial_0 \gamma_{ij} = \partial_0 g_{ij} \).
To compute the latter, we use the evolution equation for \( g_{ij} \), c.f. eq.(35) of [127] (with \(\gamma_1 = -1\)):
\[ \partial_0 g_{ab} = - \alpha \Pi_{ab} + \beta^k \Phi_{kab} \]
tnsr::aa< DataType, SpatialDim, Frame > gr::time_derivative_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::ii< DataType, SpatialDim, Frame > & | spatial_metric, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | dt_spatial_metric | ||
) |
Computes the time derivative of the spacetime metric from spatial metric, lapse, shift, and their time derivatives.
Computes the derivative as:
\begin{align} \partial_t g_{tt} &= - 2 \alpha \partial_t \alpha - 2 \gamma_{i j} \beta^i \partial_t \beta^j + \beta^i \beta^j \partial_t \gamma_{i j}\\ \partial_t g_{t i} &= \gamma_{j i} \partial_t \beta^j + \beta^j \partial_t \gamma_{j i}\\ \partial_t g_{i j} &= \partial_t \gamma_{i j}, \end{align}
where \(\alpha, \beta^i, \gamma_{ij}\) are the lapse, shift, and spatial metric respectively.
tnsr::aa< DataType, SpatialDim, Frame > gh::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 \(\Pi_{a b}\), \(\Phi_{i a b}\), and the lapse \(\alpha\) and shift \(\beta^i\).
Computes the derivative as:
\begin{align} \partial_t g_{a b} = \beta^i \Phi_{i a b} - \alpha \Pi_{a b}. \end{align}
void gr::time_derivative_of_spacetime_metric | ( | gsl::not_null< tnsr::aa< DataType, SpatialDim, Frame > * > | dt_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::ii< DataType, SpatialDim, Frame > & | spatial_metric, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | dt_spatial_metric | ||
) |
Computes the time derivative of the spacetime metric from spatial metric, lapse, shift, and their time derivatives.
Computes the derivative as:
\begin{align} \partial_t g_{tt} &= - 2 \alpha \partial_t \alpha - 2 \gamma_{i j} \beta^i \partial_t \beta^j + \beta^i \beta^j \partial_t \gamma_{i j}\\ \partial_t g_{t i} &= \gamma_{j i} \partial_t \beta^j + \beta^j \partial_t \gamma_{j i}\\ \partial_t g_{i j} &= \partial_t \gamma_{i j}, \end{align}
where \(\alpha, \beta^i, \gamma_{ij}\) are the lapse, shift, and spatial metric respectively.
void gh::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 \(\Pi_{a b}\), \(\Phi_{i a b}\), and the lapse \(\alpha\) and shift \(\beta^i\).
Computes the derivative as:
\begin{align} \partial_t g_{a b} = \beta^i \Phi_{i a b} - \alpha \Pi_{a b}. \end{align}
tnsr::ii< DataType, SpatialDim, Frame > gr::time_derivative_of_spatial_metric | ( | const Scalar< DataType > & | 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, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | extrinsic_curvature | ||
) |
Computes the time derivative of the spatial metric from extrinsic curvature, lapse, shift, and their time derivatives.
Computes the derivative as (see e.g. [14], Eq. (2.134)):
\begin{equation} \partial_t \gamma_{ij} = -2 \alpha K_{ij} + 2 \nabla_{(i} \beta_{j)} = -2 \alpha K_{ij} + \beta^k \partial_k \gamma_{ij} + \gamma_{ik} \partial_j \beta^k + \gamma_{jk} \partial_i \beta^k \end{equation}
where \(\alpha\) is the lapse, \(\beta^i\) is the shift, \(\gamma_{ij}\) is the spatial metric and \(K_{ij}\) is the extrinsic curvature.
void gr::time_derivative_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::iJ< DataType, SpatialDim, Frame > & | deriv_shift, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | spatial_metric, | ||
const tnsr::ijj< DataType, SpatialDim, Frame > & | deriv_spatial_metric, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | extrinsic_curvature | ||
) |
Computes the time derivative of the spatial metric from extrinsic curvature, lapse, shift, and their time derivatives.
Computes the derivative as (see e.g. [14], Eq. (2.134)):
\begin{equation} \partial_t \gamma_{ij} = -2 \alpha K_{ij} + 2 \nabla_{(i} \beta_{j)} = -2 \alpha K_{ij} + \beta^k \partial_k \gamma_{ij} + \gamma_{ik} \partial_j \beta^k + \gamma_{jk} \partial_i \beta^k \end{equation}
where \(\alpha\) is the lapse, \(\beta^i\) is the shift, \(\gamma_{ij}\) is the spatial metric and \(K_{ij}\) is the extrinsic curvature.
void transform::to_different_frame | ( | const gsl::not_null< Scalar< DataType > * > | dest, |
const Scalar< DataType > & | src, | ||
const Jacobian< DataType, VolumeDim, DestFrame, SrcFrame > & | jacobian, | ||
const InverseJacobian< DataType, VolumeDim, DestFrame, SrcFrame > & | inv_jacobian | ||
) |
Transforms a tensor to a different frame.
The tensor being transformed is always assumed to have density zero. In particular Scalar
is assumed to be invariant under transformations.
jacobian
argument is the derivative of the source coordinates with respect to the destination coordinates. void transform::to_different_frame | ( | const gsl::not_null< tnsr::I< DataType, VolumeDim, DestFrame > * > | dest, |
const tnsr::I< DataType, VolumeDim, SrcFrame > & | src, | ||
const Jacobian< DataType, VolumeDim, DestFrame, SrcFrame > & | jacobian, | ||
const InverseJacobian< DataType, VolumeDim, DestFrame, SrcFrame > & | inv_jacobian | ||
) |
Transforms a tensor to a different frame.
The tensor being transformed is always assumed to have density zero. In particular Scalar
is assumed to be invariant under transformations.
jacobian
argument is the derivative of the source coordinates with respect to the destination coordinates. void transform::to_different_frame | ( | const gsl::not_null< tnsr::ii< DataType, VolumeDim, DestFrame > * > | dest, |
const tnsr::ii< DataType, VolumeDim, SrcFrame > & | src, | ||
const Jacobian< DataType, VolumeDim, DestFrame, SrcFrame > & | jacobian | ||
) |
Transforms tensor to different frame.
The formula for transforming \(T_{ij}\) is
\begin{align} T_{\bar{\imath}\bar{\jmath}} &= T_{ij} \frac{\partial x^i}{\partial x^{\bar{\imath}}} \frac{\partial x^j}{\partial x^{\bar{\jmath}}} \end{align}
where \(x^i\) are the source coordinates and \(x^{\bar{\imath}}\) are the destination coordinates.
Note that Jacobian<DestFrame,SrcFrame>
is the same type as InverseJacobian<SrcFrame,DestFrame>
and represents \(\partial x^i/\partial x^{\bar{\jmath}}\).
auto transform::to_different_frame | ( | const tnsr::I< DataType, VolumeDim, SrcFrame > & | src, |
const Jacobian< DataType, VolumeDim, DestFrame, SrcFrame > & | jacobian, | ||
const InverseJacobian< DataType, VolumeDim, DestFrame, SrcFrame > & | inv_jacobian | ||
) | -> tnsr::I< DataType, VolumeDim, DestFrame > |
Transforms a tensor to a different frame.
The tensor being transformed is always assumed to have density zero. In particular Scalar
is assumed to be invariant under transformations.
jacobian
argument is the derivative of the source coordinates with respect to the destination coordinates. auto transform::to_different_frame | ( | const tnsr::ii< DataType, VolumeDim, SrcFrame > & | src, |
const Jacobian< DataType, VolumeDim, DestFrame, SrcFrame > & | jacobian | ||
) | -> tnsr::ii< DataType, VolumeDim, DestFrame > |
Transforms tensor to different frame.
The formula for transforming \(T_{ij}\) is
\begin{align} T_{\bar{\imath}\bar{\jmath}} &= T_{ij} \frac{\partial x^i}{\partial x^{\bar{\imath}}} \frac{\partial x^j}{\partial x^{\bar{\jmath}}} \end{align}
where \(x^i\) are the source coordinates and \(x^{\bar{\imath}}\) are the destination coordinates.
Note that Jacobian<DestFrame,SrcFrame>
is the same type as InverseJacobian<SrcFrame,DestFrame>
and represents \(\partial x^i/\partial x^{\bar{\jmath}}\).
auto transform::to_different_frame | ( | Scalar< DataType > | src, |
const Jacobian< DataType, VolumeDim, DestFrame, SrcFrame > & | jacobian, | ||
const InverseJacobian< DataType, VolumeDim, DestFrame, SrcFrame > & | inv_jacobian | ||
) | -> Scalar< DataType > |
Transforms a tensor to a different frame.
The tensor being transformed is always assumed to have density zero. In particular Scalar
is assumed to be invariant under transformations.
jacobian
argument is the derivative of the source coordinates with respect to the destination coordinates. Scalar< DataType > trace | ( | const Tensor< DataType, Symmetry< 1, 1 >, index_list< Index0, Index0 > > & | tensor, |
const Tensor< DataType, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index0 >, change_index_up_lo< Index0 > > > & | metric | ||
) |
Computes trace of a rank-2 symmetric tensor.
Computes \(g^{ab}T_{ab}\) or \(g_{ab}T^{ab}\) where \((a,b)\) can be spatial or spacetime indices.
void trace | ( | gsl::not_null< Scalar< DataType > * > | trace, |
const Tensor< DataType, Symmetry< 1, 1 >, index_list< Index0, Index0 > > & | tensor, | ||
const Tensor< DataType, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index0 >, change_index_up_lo< Index0 > > > & | metric | ||
) |
Computes trace of a rank-2 symmetric tensor.
Computes \(g^{ab}T_{ab}\) or \(g_{ab}T^{ab}\) where \((a,b)\) can be spatial or spacetime indices.
Tensor< DataType, Symmetry< 1 >, index_list< Index0 > > trace_last_indices | ( | const Tensor< DataType, Symmetry< 2, 1, 1 >, index_list< Index0, Index1, Index1 > > & | tensor, |
const Tensor< DataType, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index1 >, change_index_up_lo< Index1 > > > & | metric | ||
) |
Computes trace of a rank 3 tensor, which is symmetric in its last two indices, tracing the symmetric indices.
For example, if \( T_{abc} \) is a tensor such that \(T_{abc} = T_{acb} \) then \( T_a = g^{bc}T_{abc} \) is computed, where \( g^{bc} \) is the inverse metric. Note that indices \(a,b,c,...\) can represent either spatial or spacetime indices, and can have either valence. You may have to add a new instantiation of this template if you need a new use case.
void trace_last_indices | ( | gsl::not_null< Tensor< DataType, Symmetry< 1 >, index_list< Index0 > > * > | trace_of_tensor, |
const Tensor< DataType, Symmetry< 2, 1, 1 >, index_list< Index0, Index1, Index1 > > & | tensor, | ||
const Tensor< DataType, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index1 >, change_index_up_lo< Index1 > > > & | metric | ||
) |
Computes trace of a rank 3 tensor, which is symmetric in its last two indices, tracing the symmetric indices.
For example, if \( T_{abc} \) is a tensor such that \(T_{abc} = T_{acb} \) then \( T_a = g^{bc}T_{abc} \) is computed, where \( g^{bc} \) is the inverse metric. Note that indices \(a,b,c,...\) can represent either spatial or spacetime indices, and can have either valence. You may have to add a new instantiation of this template if you need a new use case.
tnsr::Ab< DataType, VolumeDim, Frame > gr::transverse_projection_operator | ( | const tnsr::A< DataType, VolumeDim, Frame > & | spacetime_normal_vector, |
const tnsr::a< DataType, VolumeDim, Frame > & | spacetime_normal_one_form, | ||
const tnsr::I< DataType, VolumeDim, Frame > & | interface_unit_normal_vector, | ||
const tnsr::i< DataType, VolumeDim, Frame > & | interface_unit_normal_one_form | ||
) |
Compute spacetime projection operator onto an interface.
Consider a \(d-1\)-dimensional surface \(S\) in a \(d\)-dimensional spatial hypersurface \(\Sigma\). Let \(s^a\) \((s_a)\) be the unit spacelike vector (one-form) orthogonal to \(S\) in \(\Sigma\), and \(n^a\) \((n_a)\) be the timelike unit vector (one-form) orthogonal to \(\Sigma\). This function returns the projection operator onto \(S\) for \(d+1\) dimensional quantities:
\begin{align*} P^a_b = \delta^a_b + n^a n_b - s^a s_b. \end{align*}
tnsr::aa< DataType, VolumeDim, Frame > gr::transverse_projection_operator | ( | const tnsr::aa< DataType, VolumeDim, Frame > & | spacetime_metric, |
const tnsr::a< DataType, VolumeDim, Frame > & | spacetime_normal_one_form, | ||
const tnsr::i< DataType, VolumeDim, Frame > & | interface_unit_normal_one_form | ||
) |
Compute spacetime projection operator onto an interface.
Consider a \(d-1\)-dimensional surface \(S\) in a \(d\)-dimensional spatial hypersurface \(\Sigma\). Let \(s_a\) be the unit spacelike one-form orthogonal to \(S\) in \(\Sigma\), and \(n_a\) be the timelike unit vector orthogonal to \(\Sigma\). This function returns the projection operator onto \(S\) for \(d+1\) dimensional quantities:
\begin{align*} P_{ab} = g_{ab} + n_a n_b - s_a s_b = \gamma_{ab} - s_a s_b. \end{align*}
tnsr::II< DataType, VolumeDim, Frame > gr::transverse_projection_operator | ( | const tnsr::II< DataType, VolumeDim, Frame > & | inverse_spatial_metric, |
const tnsr::I< DataType, VolumeDim, Frame > & | normal_vector | ||
) |
Compute projection operator onto an interface.
Returns the operator \(P^{ij} = \gamma^{ij} - n^i n^j\), where \(\gamma^{ij}\) is the inverse spatial metric, and \(n^i\) is the normal vector to the interface in question.
void gr::transverse_projection_operator | ( | gsl::not_null< tnsr::AA< DataType, VolumeDim, Frame > * > | projection_tensor, |
const tnsr::AA< DataType, VolumeDim, Frame > & | inverse_spacetime_metric, | ||
const tnsr::A< DataType, VolumeDim, Frame > & | spacetime_normal_vector, | ||
const tnsr::I< DataType, VolumeDim, Frame > & | interface_unit_normal_vector | ||
) |
Compute spacetime projection operator onto an interface.
Consider a \(d-1\)-dimensional surface \(S\) in a \(d\)-dimensional spatial hypersurface \(\Sigma\). Let \(s^a\) be the unit spacelike vector orthogonal to \(S\) in \(\Sigma\), and \(n^a\) be the timelike unit vector orthogonal to \(\Sigma\). This function returns the projection operator onto \(S\) for \(d+1\) dimensional quantities:
\begin{align*} P^{ab} = g^{ab} + n^a n^b - s^a s^b = \gamma_{ab} - s_a s_b. \end{align*}
void gr::transverse_projection_operator | ( | gsl::not_null< tnsr::Ab< DataType, VolumeDim, Frame > * > | projection_tensor, |
const tnsr::A< DataType, VolumeDim, Frame > & | spacetime_normal_vector, | ||
const tnsr::a< DataType, VolumeDim, Frame > & | spacetime_normal_one_form, | ||
const tnsr::I< DataType, VolumeDim, Frame > & | interface_unit_normal_vector, | ||
const tnsr::i< DataType, VolumeDim, Frame > & | interface_unit_normal_one_form | ||
) |
Compute spacetime projection operator onto an interface.
Consider a \(d-1\)-dimensional surface \(S\) in a \(d\)-dimensional spatial hypersurface \(\Sigma\). Let \(s^a\) \((s_a)\) be the unit spacelike vector (one-form) orthogonal to \(S\) in \(\Sigma\), and \(n^a\) \((n_a)\) be the timelike unit vector (one-form) orthogonal to \(\Sigma\). This function returns the projection operator onto \(S\) for \(d+1\) dimensional quantities:
\begin{align*} P^a_b = \delta^a_b + n^a n_b - s^a s_b. \end{align*}
void gr::transverse_projection_operator | ( | gsl::not_null< tnsr::ii< DataType, VolumeDim, Frame > * > | projection_tensor, |
const tnsr::ii< DataType, VolumeDim, Frame > & | spatial_metric, | ||
const tnsr::i< DataType, VolumeDim, Frame > & | normal_one_form | ||
) |
Compute projection operator onto an interface.
Returns the operator \(P_{ij} = \gamma_{ij} - n_i n_j\), where \( \gamma_{ij}\) is the spatial metric, and \( n_i\) is the normal one-form to the interface in question.
Returns the operator \(P^{i}_{j} = \delta^{i}_{j} - n^i n_j\), where \(n^i\) and \(n_i\) are the normal vector and normal one-form to the interface in question.
tnsr::ii< DataType, SpatialDim, Frame > gr::weyl_electric | ( | const tnsr::ii< DataType, SpatialDim, Frame > & | spatial_ricci, |
const tnsr::ii< DataType, SpatialDim, Frame > & | extrinsic_curvature, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric | ||
) |
Computes the electric part of the Weyl tensor in vacuum.
Computes the electric part of the Weyl tensor in vacuum \(E_{ij}\) as: \( E_{ij} = R_{ij} + KK_{ij} - K^m_{i}K_{mj}\) where \(R_{ij}\) is the spatial Ricci tensor, \(K_{ij}\) is the extrinsic curvature, and \(K\) is the trace of \(K_{ij}\). An additional definition is \(E_{ij} = n^a n^b C_{a i b j}\), where \(n\) is the unit-normal to the hypersurface and \(C\) is the Weyl tensor consistent with the conventions in [26].
void gr::weyl_electric | ( | gsl::not_null< tnsr::ii< DataType, SpatialDim, Frame > * > | weyl_electric_part, |
const tnsr::ii< DataType, SpatialDim, Frame > & | spatial_ricci, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | extrinsic_curvature, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric | ||
) |
Computes the electric part of the Weyl tensor in vacuum.
Computes the electric part of the Weyl tensor in vacuum \(E_{ij}\) as: \( E_{ij} = R_{ij} + KK_{ij} - K^m_{i}K_{mj}\) where \(R_{ij}\) is the spatial Ricci tensor, \(K_{ij}\) is the extrinsic curvature, and \(K\) is the trace of \(K_{ij}\). An additional definition is \(E_{ij} = n^a n^b C_{a i b j}\), where \(n\) is the unit-normal to the hypersurface and \(C\) is the Weyl tensor consistent with the conventions in [26].
Scalar< DataType > gr::weyl_electric_scalar | ( | const tnsr::ii< DataType, SpatialDim, Frame > & | weyl_electric, |
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric | ||
) |
Computes the scalar \(E_{ij} E^{ij}\) from the electric part of the Weyl tensor \(E_{ij}\).
Computes the scalar \(E_{ij} E^{ij}\) from the electric part of the Weyl tensor \(E_{ij}\) and the inverse spatial metric \(\gamma^{ij}\), i.e. \(E_{ij} = \gamma^{ik}\gamma^{jl}E_{ij}E_{kl}\).
void gr::weyl_electric_scalar | ( | gsl::not_null< Scalar< DataType > * > | weyl_electric_scalar_result, |
const tnsr::ii< DataType, SpatialDim, Frame > & | weyl_electric, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric | ||
) |
Computes the scalar \(E_{ij} E^{ij}\) from the electric part of the Weyl tensor \(E_{ij}\).
Computes the scalar \(E_{ij} E^{ij}\) from the electric part of the Weyl tensor \(E_{ij}\) and the inverse spatial metric \(\gamma^{ij}\), i.e. \(E_{ij} = \gamma^{ik}\gamma^{jl}E_{ij}E_{kl}\).
tnsr::ii< DataType, 3, Frame > gr::weyl_magnetic | ( | const tnsr::ijj< DataType, 3, Frame > & | grad_extrinsic_curvature, |
const tnsr::ii< DataType, 3, Frame > & | spatial_metric, | ||
const Scalar< DataType > & | sqrt_det_spatial_metric | ||
) |
Computes the magnetic part of the Weyl tensor.
Computes the magnetic part of the Weyl tensor \(B_{ij}\) as:
\begin{align} B_{ij} = \left(1/\sqrt{\det\gamma}\right)D_{k}K_{l(i}\gamma_{j)m}\epsilon^{mlk} \end{align}
where \(\epsilon^{ijk}\) is the spatial Levi-Civita symbol, \(K_{ij}\) is the extrinsic curvature, \(\gamma_{jm} \) is the spatial metric, and \(D_i\) is spatial covariant derivative.
void gr::weyl_magnetic | ( | gsl::not_null< tnsr::ii< DataType, 3, Frame > * > | weyl_magnetic_part, |
const tnsr::ijj< DataType, 3, Frame > & | grad_extrinsic_curvature, | ||
const tnsr::ii< DataType, 3, Frame > & | spatial_metric, | ||
const Scalar< DataType > & | sqrt_det_spatial_metric | ||
) |
Computes the magnetic part of the Weyl tensor.
Computes the magnetic part of the Weyl tensor \(B_{ij}\) as:
\begin{align} B_{ij} = \left(1/\sqrt{\det\gamma}\right)D_{k}K_{l(i}\gamma_{j)m}\epsilon^{mlk} \end{align}
where \(\epsilon^{ijk}\) is the spatial Levi-Civita symbol, \(K_{ij}\) is the extrinsic curvature, \(\gamma_{jm} \) is the spatial metric, and \(D_i\) is spatial covariant derivative.
Scalar< DataType > gr::weyl_magnetic_scalar | ( | const tnsr::ii< DataType, 3, Frame > & | weyl_magnetic, |
const tnsr::II< DataType, 3, Frame > & | inverse_spatial_metric | ||
) |
Computes the scalar \(B_{ij} B^{ij}\) from the magnetic part of the Weyl tensor \(B_{ij}\).
Computes the scalar \(B_{ij} B^{ij}\) from the magnetic part of the Weyl tensor \(B_{ij}\) and the inverse spatial metric \(\gamma^{ij}\), i.e. \(B_{ij} = \gamma^{ik}\gamma^{jl}B_{ij}B_{kl}\).
gr::weyl_magnetic()
. The magnetic part of the Weyl tensor needs additional terms for matter. void gr::weyl_magnetic_scalar | ( | gsl::not_null< Scalar< DataType > * > | weyl_magnetic_scalar_result, |
const tnsr::ii< DataType, 3, Frame > & | weyl_magnetic, | ||
const tnsr::II< DataType, 3, Frame > & | inverse_spatial_metric | ||
) |
Computes the scalar \(B_{ij} B^{ij}\) from the magnetic part of the Weyl tensor \(B_{ij}\).
Computes the scalar \(B_{ij} B^{ij}\) from the magnetic part of the Weyl tensor \(B_{ij}\) and the inverse spatial metric \(\gamma^{ij}\), i.e. \(B_{ij} = \gamma^{ik}\gamma^{jl}B_{ij}B_{kl}\).
gr::weyl_magnetic()
. The magnetic part of the Weyl tensor needs additional terms for matter. tnsr::ii< DataType, SpatialDim, Frame > gr::weyl_propagating | ( | const tnsr::ii< DataType, SpatialDim, Frame > & | ricci, |
const tnsr::ii< DataType, SpatialDim, Frame > & | extrinsic_curvature, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric, | ||
const tnsr::ijj< DataType, SpatialDim, Frame > & | cov_deriv_extrinsic_curvature, | ||
const tnsr::I< DataType, SpatialDim, Frame > & | unit_interface_normal_vector, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | projection_IJ, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | projection_ij, | ||
const tnsr::Ij< DataType, SpatialDim, Frame > & | projection_Ij, | ||
double | sign | ||
) |
Computes the propagating modes of the Weyl tensor.
The Weyl tensor evolution system in vacuum has six characteristic fields, of which two ( \( U^{8\pm}\)) are proportional to the Newman-Penrose components of the Weyl tensor \(\Psi_4\) and \(\Psi_0\). These represent the true gravitational-wave degrees of freedom, and can be written down in terms of \(3+1\) quantities as [110] (see Eq. 75):
\begin{align} U^{8\pm}_{ij} &= \left(P^{k}_i P^{l}_j - \frac{1}{2} P_{ij} P^{kl}\right) \left(R_{kl} + K K_{kl} - K_k^m K_{ml} \mp n^m \nabla_m K_{kl} \pm n^m \nabla_{(k}K_{l)m} \right),\\ &= \left(P^{k}_i P^{l}_j - \frac{1}{2} P_{ij} P^{kl}\right) \left(E_{kl} \mp n^m \nabla_m K_{kl} \pm n^m \nabla_{(k}K_{l)m}\right), \end{align}
where \(R_{ij}\) is the spatial Ricci tensor, \(K_{ij}\) is the extrinsic curvature, \(K\) is the trace of \(K_{ij}\), \(E_{ij}\) is the electric part of the Weyl tensor in vacuum, \(n^i\) is the outward directed unit normal vector to the interface, \(\nabla_i\) denotes the covariant derivative, and \(P^{ij}\) and its index-raised and lowered forms project tensors transverse to \(n^i\).
void gr::weyl_propagating | ( | gsl::not_null< tnsr::ii< DataType, SpatialDim, Frame > * > | weyl_prop_u8, |
const tnsr::ii< DataType, SpatialDim, Frame > & | ricci, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | extrinsic_curvature, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric, | ||
const tnsr::ijj< DataType, SpatialDim, Frame > & | cov_deriv_extrinsic_curvature, | ||
const tnsr::I< DataType, SpatialDim, Frame > & | unit_interface_normal_vector, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | projection_IJ, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | projection_ij, | ||
const tnsr::Ij< DataType, SpatialDim, Frame > & | projection_Ij, | ||
double | sign | ||
) |
Computes the propagating modes of the Weyl tensor.
The Weyl tensor evolution system in vacuum has six characteristic fields, of which two ( \( U^{8\pm}\)) are proportional to the Newman-Penrose components of the Weyl tensor \(\Psi_4\) and \(\Psi_0\). These represent the true gravitational-wave degrees of freedom, and can be written down in terms of \(3+1\) quantities as [110] (see Eq. 75):
\begin{align} U^{8\pm}_{ij} &= \left(P^{k}_i P^{l}_j - \frac{1}{2} P_{ij} P^{kl}\right) \left(R_{kl} + K K_{kl} - K_k^m K_{ml} \mp n^m \nabla_m K_{kl} \pm n^m \nabla_{(k}K_{l)m} \right),\\ &= \left(P^{k}_i P^{l}_j - \frac{1}{2} P_{ij} P^{kl}\right) \left(E_{kl} \mp n^m \nabla_m K_{kl} \pm n^m \nabla_{(k}K_{l)m}\right), \end{align}
where \(R_{ij}\) is the spatial Ricci tensor, \(K_{ij}\) is the extrinsic curvature, \(K\) is the trace of \(K_{ij}\), \(E_{ij}\) is the electric part of the Weyl tensor in vacuum, \(n^i\) is the outward directed unit normal vector to the interface, \(\nabla_i\) denotes the covariant derivative, and \(P^{ij}\) and its index-raised and lowered forms project tensors transverse to \(n^i\).
tnsr::ii< DataType, SpatialDim, Frame > gr::weyl_type_D1 | ( | const tnsr::ii< DataType, SpatialDim, Frame > & | weyl_electric, |
const tnsr::ii< DataType, SpatialDim, Frame > & | spatial_metric, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric | ||
) |
Computes a quantity measuring how far from type D spacetime is.
Computes a quantity measuring how far from type D spacetime is, using measure D1 [Eq. (8) of [20]]:
\begin{align} \frac{a}{12} \gamma_{ij} - \frac{b}{a} E_{ij} - 4 E_{i}^{k} E_{jk} = 0 \end{align}
where \(\gamma_{ij}\) is the spatial metric and \(E_{ij}\) is the electric part ofthe Weyl tensor.
void gr::weyl_type_D1 | ( | gsl::not_null< tnsr::ii< DataType, SpatialDim, Frame > * > | weyl_type_D1, |
const tnsr::ii< DataType, SpatialDim, Frame > & | weyl_electric, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | spatial_metric, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric | ||
) |
Computes a quantity measuring how far from type D spacetime is.
Computes a quantity measuring how far from type D spacetime is, using measure D1 [Eq. (8) of [20]]:
\begin{align} \frac{a}{12} \gamma_{ij} - \frac{b}{a} E_{ij} - 4 E_{i}^{k} E_{jk} = 0 \end{align}
where \(\gamma_{ij}\) is the spatial metric and \(E_{ij}\) is the electric part ofthe Weyl tensor.
Scalar< DataType > gr::weyl_type_D1_scalar | ( | const tnsr::ii< DataType, SpatialDim, Frame > & | weyl_type_D1, |
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric | ||
) |
Computes the scalar \(D_{ij} D^{ij}\) , a measure of a spacetime's devitation from type D.
Computes the scalar \(D_{ij} D^{ij}\) from \(D_{ij}\) (Eq. (8) of [20]] and the inverse spatial metric \(\gamma^{ij}\), i.e. \(D = \gamma^{ik}\gamma^{jl}D_{ij}D_{kl}\).
void gr::weyl_type_D1_scalar | ( | gsl::not_null< Scalar< DataType > * > | weyl_type_D1_scalar_result, |
const tnsr::ii< DataType, SpatialDim, Frame > & | weyl_type_D1, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric | ||
) |
Computes the scalar \(D_{ij} D^{ij}\) , a measure of a spacetime's devitation from type D.
Computes the scalar \(D_{ij} D^{ij}\) from \(D_{ij}\) (Eq. (8) of [20]] and the inverse spatial metric \(\gamma^{ij}\), i.e. \(D = \gamma^{ik}\gamma^{jl}D_{ij}D_{kl}\).