SpECTRE  v2024.12.16
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
General Relativity

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, agbc. 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, Indexgr::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 Φ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 Φ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 Πab of the spacetime metric gab. 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 Πab of the spacetime metric gab. 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 ( α) 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 ( α) 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 Πab, Φiab, and the lapse α and shift β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 Πab, Φiab, and the lapse α and shift β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 ( α) 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 ( α) 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 Ψ4 using the characteristic field U 8+ and complex vector m¯i. More...
 
template<typename Frame >
Scalar< ComplexDataVectorgr::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 Ψ4 using the characteristic field U 8+ and complex vector 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 Ψ4 using Ψ4[Real]=0.5Uij8+(xixjyiyj).
 
template<typename Frame >
Scalar< DataVectorgr::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 Ψ4 using Ψ4[Real]=0.5Uij8+(xixjyiyj).
 
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, Indexgr::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 gab(g)1/2gab. 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 gab(g)1/2gab. 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 EijEij from the electric part of the Weyl tensor Eij. 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 EijEij from the electric part of the Weyl tensor Eij. 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 BijBij from the magnetic part of the Weyl tensor Bij. 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 BijBij from the magnetic part of the Weyl tensor Bij. 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 DijDij , 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 DijDij , a measure of a spacetime's devitation from type D. More...
 

Detailed Description

Contains functions used in General Relativistic simulations.

Function Documentation

◆ christoffel_first_kind() [1/2]

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.

Details

Computes Christoffel symbol Γabc as: Γcab=12(agbc+bgaccgab) where gbc is either a spatial or spacetime metric

◆ christoffel_first_kind() [2/2]

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.

Details

Computes Christoffel symbol Γabc as: Γcab=12(agbc+bgaccgab) where gbc is either a spatial or spacetime metric

◆ christoffel_second_kind() [1/4]

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.

Details

If Φkab is the generalized harmonic spatial derivative variable Φkab=kgab and γij is the inverse spatial metric, the Christoffel symbols are

Γijm=12γmk(Φijk+ΦjikΦkij).

In the not_null version, no memory allocations are performed if the output tensor already has the correct size.

◆ christoffel_second_kind() [2/4]

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.

Details

Computes Christoffel symbol Γbca as: Γabd=12gcd(agbc+bgaccgab) where gbc 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.

◆ christoffel_second_kind() [3/4]

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.

Details

If Φkab is the generalized harmonic spatial derivative variable Φkab=kgab and γij is the inverse spatial metric, the Christoffel symbols are

Γijm=12γmk(Φijk+ΦjikΦkij).

In the not_null version, no memory allocations are performed if the output tensor already has the correct size.

◆ christoffel_second_kind() [4/4]

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.

Details

Computes Christoffel symbol Γbca as: Γabd=12gcd(agbc+bgaccgab) where gbc 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.

◆ covariant_deriv_of_extrinsic_curvature()

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.

Details

If Πab and Φiab are the generalized harmonic conjugate momentum and spatial derivative variables, and if na is the spacetime normal vector, then the extrinsic curvature can be written as

(1)Kij=12Πij+Φ(ij)ana,

and its covariant derivative as

(2)kKij=kKijΓlikKljΓljkKli,

where Γkij are Christoffel symbols of the second kind. The partial derivatives of extrinsic curvature can be computed as

(3)kKij=12(kΠij+(kΦija+kΦjia)na+(Φija+Φjia)kna),

where we have access to all terms except the spatial derivatives of the spacetime unit normal vector kna. Given that na=(1/α,βi/α), the temporal portion of kna can be computed as:

kn0=1α2kα,=1α2(α/2)naΦkabnb,=12αnaΦkabnb,=12n0naΦkabnb,(4)=(g0a+12n0na)Φkabnb,

where we use the expression for kα from spatial_deriv_of_lapse; while the spatial portion of the same can be computed as:

kni=k(βi/α)=1αkβi+βiα2kα,=12βiαnaΦkabnb(gia+nina)Φkabnb,(5)=(gia+12nina)Φkabnb,

where we use the expression for kβi from spatial_deriv_of_shift. Combining the last two equations, we find that

(6)kna=(gab+12nanb)Φkbcnc,

and using Eq.( 2) and Eq.( 3) with this, we can compute the covariant derivative of the extrinsic curvature as:

(7)kKij=12(kΠij+(kΦija+kΦjia)na(Φija+Φjia)(gab+12nanb)Φkbcnc)ΓlikKljΓljkKli

.

◆ deriv_inverse_spatial_metric() [1/2]

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.

Details

Computes the derivative as:

(8)kγij=γinγmjkγnm

where γij and kγij are the inverse spatial metric and spatial derivative of the spatial metric, respectively.

◆ deriv_inverse_spatial_metric() [2/2]

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.

Details

Computes the derivative as:

(9)kγij=γinγmjkγnm

where γij and kγij are the inverse spatial metric and spatial derivative of the spatial metric, respectively.

◆ deriv_spatial_metric() [1/2]

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.

Details

If Φkab is the generalized harmonic spatial derivative variable, then the derivatives of the spatial metric are

kγij=Φkij

This quantity is needed for computing spatial Christoffel symbols.

◆ deriv_spatial_metric() [2/2]

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.

Details

If Φkab is the generalized harmonic spatial derivative variable, then the derivatives of the spatial metric are

kγij=Φkij

This quantity is needed for computing spatial Christoffel symbols.

◆ derivatives_of_spacetime_metric() [1/2]

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.

Details

Computes the derivatives as:

(10)μgtt=2αμα+2γmnβmμβn+βmβnμγmn(11)μgti=γmiμβm+βmμγmi(12)μgij=μγij

where α,βi,γij are the lapse, shift, and spatial metric respectively.

◆ derivatives_of_spacetime_metric() [2/2]

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.

Details

Computes the derivatives as:

(13)μgtt=2αμα+2γmnβmμβn+βmβnμγmn(14)μgti=γmiμβm+βmμγmi(15)μgij=μγij

where α,βi,γij are the lapse, shift, and spatial metric respectively.

◆ divergence_lapse() [1/2]

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.

Details

Computes the divergence as:

(16)iiα=ϕ2γ~ij(ijα)

where ϕ, γ~ij, and ijα 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.

◆ divergence_lapse() [2/2]

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.

Details

Computes the divergence as:

(17)iiα=ϕ2γ~ij(ijα)

where ϕ, γ~ij, and ijα 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.

◆ extrinsic_curvature() [1/4]

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.

Details

Uses the ADM evolution equation for the spatial metric,

Kij=12α(0γij+βkkγij+γkijβk+γkjiβk)

where Kij is the extrinsic curvature, α is the lapse, βi is the shift, and γij is the spatial metric. In terms of the Lie derivative of the spatial metric with respect to a unit timelike vector na normal to the spatial slice, this corresponds to the sign convention

Kab=12Lnγab

where γab is the spatial metric. See Eq. (2.53) in .

◆ extrinsic_curvature() [2/4]

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.

Details

If Πab and Φiab are the generalized harmonic conjugate momentum and spatial derivative variables, and if na is the spacetime normal vector, then the extrinsic curvature is computed as

(18)Kij=12Πij+Φ(ij)ana

◆ extrinsic_curvature() [3/4]

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.

Details

If Πab and Φiab are the generalized harmonic conjugate momentum and spatial derivative variables, and if na is the spacetime normal vector, then the extrinsic curvature is computed as

(19)Kij=12Πij+Φ(ij)ana

◆ extrinsic_curvature() [4/4]

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.

Details

Uses the ADM evolution equation for the spatial metric,

Kij=12α(0γij+βkkγij+γkijβk+γkjiβk)

where Kij is the extrinsic curvature, α is the lapse, βi is the shift, and γij is the spatial metric. In terms of the Lie derivative of the spatial metric with respect to a unit timelike vector na normal to the spatial slice, this corresponds to the sign convention

Kab=12Lnγab

where γab is the spatial metric. See Eq. (2.53) in .

◆ first_index_to_different_frame() [1/2]

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 
)

Transforms only the first index to different frame.

Examples for transforming some tensors

Flux vector to logical coordinates

A common example is taking the divergence of a flux vector Fi, where the index i is in inertial coordinates xi and the divergence is taken in logical coordinates ξi^. So to transform the flux vector to logical coordinates before taking the divergence we do this:

(20)Fi^=Fixi^xi

Here, xi^xi 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.

◆ first_index_to_different_frame() [2/2]

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 
)

Transforms only the first index to different frame.

Examples for transforming some tensors

Flux vector to logical coordinates

A common example is taking the divergence of a flux vector Fi, where the index i is in inertial coordinates xi and the divergence is taken in logical coordinates ξi^. So to transform the flux vector to logical coordinates before taking the divergence we do this:

(21)Fi^=Fixi^xi

Here, xi^xi 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.

◆ gauge_source() [1/2]

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.

Details

If α,βi,γij,Γijk,K are the lapse, shift, spatial metric, spatial Christoffel symbols, and trace of the extrinsic curvature, then we compute

(22)Hl=α2γil(tβiβkkβi)+α1lαγkmΓlkm(23)H0=α1tα+α1βkkα+βkHkαK

See Eqs. 8 and 9 of

◆ gauge_source() [2/2]

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.

Details

If α,βi,γij,Γijk,K are the lapse, shift, spatial metric, spatial Christoffel symbols, and trace of the extrinsic curvature, then we compute

(24)Hl=α2γil(tβiβkkβi)+α1lαγkmΓlkm(25)H0=α1tα+α1βkkα+βkHkαK

See Eqs. 8 and 9 of

◆ interface_null_normal() [1/2]

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.

Details

Consider an n1-dimensional boundary S of a closed region in an n-dimensional spatial hypersurface Σ. Let sa be the unit spacelike vector orthogonal to S in Σ, and na be the timelike unit vector orthogonal to Σ. This function returns the null one-form that is outgoing/incoming on S:

ka=12(na±sa).

◆ interface_null_normal() [2/2]

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.

Details

Consider an n1-dimensional boundary S of a closed region in an n-dimensional spatial hypersurface Σ. Let sa be the unit spacelike vector orthogonal to S in Σ, and na be the timelike unit vector orthogonal to Σ. This function returns the null vector that is outgoing/ingoing on S:

ka=12(na±sa).

◆ inverse_spacetime_metric() [1/2]

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.

Details

The inverse spacetime metric gab is calculated as

(26)gtt=1/α2(27)gti=βi/α2(28)gij=γijβiβj/α2

where α,βi and γij are the lapse, shift and inverse spatial metric respectively

◆ inverse_spacetime_metric() [2/2]

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.

Details

The inverse spacetime metric gab is calculated as

(29)gtt=1/α2(30)gti=βi/α2(31)gij=γijβiβj/α2

where α,βi and γij are the lapse, shift and inverse spatial metric respectively

◆ lapse() [1/2]

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.

Details

Computes

(32)α=βigitgtt

where α, βi, and gab are the lapse, shift, and spacetime metric. This can be derived, e.g., from Eqs. 2.121–2.122 of Baumgarte & Shapiro.

◆ lapse() [2/2]

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.

Details

Computes

(33)α=βigitgtt

where α, βi, and gab are the lapse, shift, and spacetime metric. This can be derived, e.g., from Eqs. 2.121–2.122 of Baumgarte & Shapiro.

◆ phi() [1/2]

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 Φiab used by the generalized harmonic formulation of Einstein's equations.

Details

If α,βi and γij are the lapse, shift and spatial metric respectively, then Φiab is computed as

(34)Φktt=2αkα+2γmnβmkβn+βmβnkγmn(35)Φkti=γmikβm+βmkγmi(36)Φkij=kγij

◆ phi() [2/2]

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 Φiab used by the generalized harmonic formulation of Einstein's equations.

Details

If α,βi and γij are the lapse, shift and spatial metric respectively, then Φiab is computed as

(37)Φktt=2αkα+2γmnβmkβn+βmβnkγmn(38)Φkti=γmikβm+βmkγmi(39)Φkij=kγij

◆ pi() [1/2]

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 Πab of the spacetime metric gab.

Details

If α,βi are the lapse and shift respectively, and Φiab=igab then Πμν=1α(tgμνβmΦmμν) where tgab is computed as

(40)tgtt=2αtα+2γmnβmtβn+βmβntγmn(41)tgti=γmitβm+βmtγmi(42)tgij=tγij

◆ pi() [2/2]

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 Πab of the spacetime metric gab.

Details

If α,βi are the lapse and shift respectively, and Φiab=igab then Πμν=1α(tgμνβmΦmμν) where tgab is computed as

(43)tgtt=2αtα+2γmnβmtβn+βmβntγmn(44)tgti=γmitβm+βmtγmi(45)tgij=tγij

◆ psi_4() [1/2]

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 Ψ4 using the characteristic field U 8+ and complex vector m¯i.

Details

Computes Ψ4 as: Ψ4=Uij8+m¯im¯j with the characteristic field U8+=(Pi(aPjb)12PijPab)(EabϵacdndBcb) and m¯i = (xi+iyi)2. xi and yi are normalized unit vectors in the frame Frame.

◆ psi_4() [2/2]

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 Ψ4 using the characteristic field U 8+ and complex vector m¯i.

Details

Computes Ψ4 as: Ψ4=Uij8+m¯im¯j with the characteristic field U8+=(Pi(aPjb)12PijPab)(EabϵacdndBcb) and m¯i = (xi+iyi)2. xi and yi are normalized unit vectors in the frame Frame.

◆ raise_or_lower_first_index() [1/2]

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.

Details

If Tabc is a tensor with Tabc=Tacb and the indices a,b,c,... can represent either spatial or spacetime indices, then the tensor Tbca=gadTabc is computed, where gab is the inverse metric, which is either a spatial or spacetime metric. If a tensor Sbca is passed as an argument than the corresponding tensor Sabc is calculated with respect to the metric gab. You may have to add a new instantiation of this template if you need a new use case.

◆ raise_or_lower_first_index() [2/2]

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.

Details

If Tabc is a tensor with Tabc=Tacb and the indices a,b,c,... can represent either spatial or spacetime indices, then the tensor Tbca=gadTabc is computed, where gab is the inverse metric, which is either a spatial or spacetime metric. If a tensor Sbca is passed as an argument than the corresponding tensor Sabc is calculated with respect to the metric gab. You may have to add a new instantiation of this template if you need a new use case.

◆ raise_or_lower_index() [1/2]

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.

Details

If Ta is a tensor and the index a can represent either a spatial or spacetime index, then the tensor Ta=gadTd is computed, where gab is the inverse metric, which is either a spatial or spacetime metric. If a tensor Sa is passed as an argument than the corresponding tensor Sa is calculated with respect to the metric gab.

◆ raise_or_lower_index() [2/2]

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.

Details

If Ta is a tensor and the index a can represent either a spatial or spacetime index, then the tensor Ta=gadTd is computed, where gab is the inverse metric, which is either a spatial or spacetime metric. If a tensor Sa is passed as an argument than the corresponding tensor Sa is calculated with respect to the metric gab.

◆ ricci_scalar() [1/2]

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.

Details

Computes Ricci scalar using the inverse metric (spatial or spacetime) and Ricci tensor R=gabRab

◆ ricci_scalar() [2/2]

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.

Details

Computes Ricci scalar using the inverse metric (spatial or spacetime) and Ricci tensor R=gabRab

◆ ricci_tensor() [1/2]

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.

Details

Computes Ricci tensor Rab as: Rab=cΓabc(bΓa)cc+ΓabdΓcdcΓacdΓbdc where Γbca is the Christoffel symbol of the second kind.

◆ ricci_tensor() [2/2]

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.

Details

Computes Ricci tensor Rab as: Rab=cΓabc(bΓa)cc+ΓabdΓcdcΓacdΓbdc where Γbca is the Christoffel symbol of the second kind.

◆ second_time_deriv_of_spacetime_metric() [1/2]

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.

Details

Let the generalized harmonic conjugate momentum and spatial derivative variables be Πab=nccgab and Φiab=igab.

Using eq.(35) of (with γ1=1) the first time derivative of the spacetime metric may be expressed in terms of the above variables:

0gab=αΠab+βkΦkab

As such, its second time derivative is simply the following:

02gab=(0α)Πabα0Πab+(0βk)Φkab+βk0Φkab

◆ second_time_deriv_of_spacetime_metric() [2/2]

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.

Details

Let the generalized harmonic conjugate momentum and spatial derivative variables be Πab=nccgab and Φiab=igab.

Using eq.(35) of (with γ1=1) the first time derivative of the spacetime metric may be expressed in terms of the above variables:

0gab=αΠab+βkΦkab

As such, its second time derivative is simply the following:

02gab=(0α)Πabα0Πab+(0βk)Φkab+βk0Φkab

◆ shift() [1/2]

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.

Details

Computes

(46)βi=γijgjt

where βi, γij, and gab are the shift, inverse spatial metric, and spacetime metric. This can be derived, e.g., from Eqs. 2.121–2.122 of Baumgarte & Shapiro.

◆ shift() [2/2]

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.

Details

Computes

(47)βi=γijgjt

where βi, γij, and gab are the shift, inverse spatial metric, and spacetime metric. This can be derived, e.g., from Eqs. 2.121–2.122 of Baumgarte & Shapiro.

◆ spacetime_deriv_of_det_spatial_metric() [1/2]

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.

Details

Using the relation aγ=γγjkaγjk

◆ spacetime_deriv_of_det_spatial_metric() [2/2]

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.

Details

Using the relation aγ=γγjkaγjk

◆ spacetime_deriv_of_goth_g() [1/2]

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 gab(g)1/2gab.

Details

Computes the spacetime derivative of gab(g)1/2gab, defined in . Using (g)1/2=α(γ)1/2, where α is the lapse and γ is the determinant of the spatial metric (), the derivative of gab expands out to

(48)cgab=[cαγ1/2+12αcγγ1/2]gabαγ1/2gadgbecgde.

◆ spacetime_deriv_of_goth_g() [2/2]

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 gab(g)1/2gab.

Details

Computes the spacetime derivative of gab(g)1/2gab, defined in . Using (g)1/2=α(γ)1/2, where α is the lapse and γ is the determinant of the spatial metric (), the derivative of gab expands out to

(49)cgab=[cαγ1/2+12αcγγ1/2]gabαγ1/2gadgbecgde.

◆ spacetime_deriv_of_norm_of_shift() [1/2]

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.

Details

The same is computed as:

a(βiβi)=(βi0βi+βi0βi,βijβi+βijβi)

◆ spacetime_deriv_of_norm_of_shift() [2/2]

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.

Details

The same is computed as:

a(βiβi)=(βi0βi+βi0βi,βijβi+βijβi)

◆ spacetime_derivative_of_spacetime_metric()

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, agbc.

tgab=αΠab+βiΦiabigab=Φiab

◆ spacetime_metric() [1/2]

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.

Details

The spacetime metric gab is calculated as

(50)gtt=α2+βmβnγmn(51)gti=γmiβm(52)gij=γij

where α,βi and γij are the lapse, shift and spatial metric respectively

◆ spacetime_metric() [2/2]

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.

Details

The spacetime metric gab is calculated as

(53)gtt=α2+βmβnγmn(54)gti=γmiβm(55)gij=γij

where α,βi and γij are the lapse, shift and spatial metric respectively

◆ spacetime_normal_vector() [1/2]

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.

Details

If α,βi are the lapse and shift respectively, then

(56)nt=1/α(57)ni=βiα

is computed.

◆ spacetime_normal_vector() [2/2]

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.

Details

If α,βi are the lapse and shift respectively, then

(58)nt=1/α(59)ni=βiα

is computed.

◆ spatial_deriv_of_lapse() [1/2]

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 ( α) from the generalized harmonic variables and spacetime unit normal 1-form.

Details

If the generalized harmonic conjugate momentum and spatial derivative variables are Πab=nccgab and Φiab=igab, the spatial derivatives of α can be obtained from:

nanbΦiab=12α[i(α2+βjβj)2βjiβj+βjβkiγjk]=2αiα,

since

i(βjβj)=2βjiβjβjβkiγjk.

iα=(α/2)naΦiabnb

◆ spatial_deriv_of_lapse() [2/2]

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 ( α) from the generalized harmonic variables and spacetime unit normal 1-form.

Details

If the generalized harmonic conjugate momentum and spatial derivative variables are Πab=nccgab and Φiab=igab, the spatial derivatives of α can be obtained from:

nanbΦiab=12α[i(α2+βjβj)2βjiβj+βjβkiγjk]=2αiα,

since

i(βjβj)=2βjiβjβjβkiγjk.

iα=(α/2)naΦiabnb

◆ spatial_deriv_of_shift() [1/2]

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.

Details

Spatial derivatives of the shift vector βi can be derived from the following steps:

iβj=γjlγkliβk=γjl(βkiγlk+γkliβkβkiγkl)=γjl(iβlβkiγlk)(γj0=0)=γja(iga0βkigak)=αγjanbigab=(γjanjna)αnbΦiab2njiα=gjaαnbΦiab2njiα=α(gja+njna)nbΦiab.

where we used the equation from spatial_deriv_of_lapse() for iα.

◆ spatial_deriv_of_shift() [2/2]

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.

Details

Spatial derivatives of the shift vector βi can be derived from the following steps:

iβj=γjlγkliβk=γjl(βkiγlk+γkliβkβkiγkl)=γjl(iβlβkiγlk)(γj0=0)=γja(iga0βkigak)=αγjanbigab=(γjanjna)αnbΦiab2njiα=gjaαnbΦiab2njiα=α(gja+njna)nbΦiab.

where we used the equation from spatial_deriv_of_lapse() for iα.

◆ spatial_metric() [1/2]

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.

Details

Simply pull out the spatial components.

◆ spatial_metric() [2/2]

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.

Details

Simply pull out the spatial components.

◆ spatial_ricci_tensor() [1/2]

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.

Details

Lets write the Christoffel symbols of the first kind as

(60)Γkij=12(iγjk+jγikkγij)=(Φ(ij)k12Φkij)

substituting kγijΦkij by subtracting out the three-index constraint Ckij=kγijΦkij from every term. We also define contractions dk=12γijΦkij and bk=12γijΦijk. This allows us to rewrite the spatial Ricci tensor as:

(61)Rij=kΓijkiΓkjk+ΓklkΓijlΓkilΓljk,=γkl(kΦ(ij)l12kΦlij)bl(Φ(ij)l12Φlij)γkl(iΦ(kj)l12iΦlkj)Φikl(Φ(kj)l12Φlkj)+γkm(Φ(kl)m12Φmkl)γln(Φ(ij)n12Φnij)(62)γkm(Φ(il)m12Φmil)γln(Φ(jk)n12Φnjk).

Gathering all terms with second derivatives:

Rij=12γkl(kΦijl+kΦjilkΦlij+iΦlkjiΦkjliΦjkl)+O(Φ),(63)=12γkl((jΦlki)(jΦi)kl+kΦ(ij)llΦkij)+O(Φ),

where we use the four-index constraint Cklij=kΦlijlΦkij=0 to swap the first and second derivatives of the spatial metric, and symmetrize Rij=R(ij). Similarly gathering the remaining terms and using the four-index constraint we get:

Rij=bk(Φijk+ΦjikΦkij)12Φikl(Φjkl+ΦkjlΦlkj)(64)+12dk(Φijk+ΦjikΦkij)(Φ(il)k12Φkil)(Φ(kj)l12Φlkj)+O(Φ)(65)=12(Φijk+ΦjikΦkij)(dk2bk)+14ΦiklΦjlk+12(ΦkilΦkjlΦkliΦlkj)+O(Φ).

Gathering everything together, we compute the spatial Ricci tensor as:

Rij=12γkl((j|Φlk|i)(jΦi)kl+kΦ(ij)llΦkij)(66)+12(Φijk+ΦjikΦkij)(dk2bk)+14ΦiklΦjlk+12(ΦkilΦkjlΦkliΦlkj).

This follows from equations (2.13) - (2.20) of .

Note that, in code, the mixed-index variables Φijk and Φijk in Eq.( 66) 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.

◆ spatial_ricci_tensor() [2/2]

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.

Details

Lets write the Christoffel symbols of the first kind as

(67)Γkij=12(iγjk+jγikkγij)=(Φ(ij)k12Φkij)

substituting kγijΦkij by subtracting out the three-index constraint Ckij=kγijΦkij from every term. We also define contractions dk=12γijΦkij and bk=12γijΦijk. This allows us to rewrite the spatial Ricci tensor as:

(68)Rij=kΓijkiΓkjk+ΓklkΓijlΓkilΓljk,=γkl(kΦ(ij)l12kΦlij)bl(Φ(ij)l12Φlij)γkl(iΦ(kj)l12iΦlkj)Φikl(Φ(kj)l12Φlkj)+γkm(Φ(kl)m12Φmkl)γln(Φ(ij)n12Φnij)(69)γkm(Φ(il)m12Φmil)γln(Φ(jk)n12Φnjk).

Gathering all terms with second derivatives:

Rij=12γkl(kΦijl+kΦjilkΦlij+iΦlkjiΦkjliΦjkl)+O(Φ),(70)=12γkl((jΦlki)(jΦi)kl+kΦ(ij)llΦkij)+O(Φ),

where we use the four-index constraint Cklij=kΦlijlΦkij=0 to swap the first and second derivatives of the spatial metric, and symmetrize Rij=R(ij). Similarly gathering the remaining terms and using the four-index constraint we get:

Rij=bk(Φijk+ΦjikΦkij)12Φikl(Φjkl+ΦkjlΦlkj)(71)+12dk(Φijk+ΦjikΦkij)(Φ(il)k12Φkil)(Φ(kj)l12Φlkj)+O(Φ)(72)=12(Φijk+ΦjikΦkij)(dk2bk)+14ΦiklΦjlk+12(ΦkilΦkjlΦkliΦlkj)+O(Φ).

Gathering everything together, we compute the spatial Ricci tensor as:

Label 'eq:rij' multiply defined

This follows from equations (2.13) - (2.20) of .

Note that, in code, the mixed-index variables Φijk and Φijk in Eq.( 66) 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.

◆ time_deriv_of_lapse() [1/2]

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 ( α) from the generalized harmonic variables, lapse, shift and the spacetime unit normal 1-form.

Details

Let the generalized harmonic conjugate momentum and spatial derivative variables be Πab=nccgab and Φiab=igab, and the operator D:=0βkk. The time derivative of α is then:

12α2nanbΠab12αβinanbΦiab=12α2nanbnccgab12αβi((2/α)iα)=12α2[(1/α3)D[γjkβjβkα2](βjβk/α3)D[γjk]+2(βj/α3)D[γjkβk]+(2/α2)(βiiα)]]=12α[D[γjkβjβkα2]βjβkD[γjk]+2αβkkα+2βjD[γjkβk]]=D[α]+βkkα=0α

where the simplification done for iα is used to substitute for the second term ( 12αβinanbΦiab).

Thus,

0α=(α/2)(αnanbΠabβinanbΦiab)

◆ time_deriv_of_lapse() [2/2]

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 ( α) from the generalized harmonic variables, lapse, shift and the spacetime unit normal 1-form.

Details

Let the generalized harmonic conjugate momentum and spatial derivative variables be Πab=nccgab and Φiab=igab, and the operator D:=0βkk. The time derivative of α is then:

12α2nanbΠab12αβinanbΦiab=12α2nanbnccgab12αβi((2/α)iα)=12α2[(1/α3)D[γjkβjβkα2](βjβk/α3)D[γjk]+2(βj/α3)D[γjkβk]+(2/α2)(βiiα)]]=12α[D[γjkβjβkα2]βjβkD[γjk]+2αβkkα+2βjD[γjkβk]]=D[α]+βkkα=0α

where the simplification done for iα is used to substitute for the second term ( 12αβinanbΦiab).

Thus,

0α=(α/2)(αnanbΠabβinanbΦiab)

◆ time_deriv_of_lower_shift() [1/2]

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.

Details

The time derivative of βi is given by:

0βi=γij0βj+βj0γij

where the first term is obtained from time_deriv_of_shift(), and the latter is a user input.

◆ time_deriv_of_lower_shift() [2/2]

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.

Details

The time derivative of βi is given by:

0βi=γij0βj+βj0γij

where the first term is obtained from time_deriv_of_shift(), and the latter is a user input.

◆ time_deriv_of_shift() [1/2]

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.

Details

The time derivative of βi can be derived from the following steps:

0βi=γik0(γkjβj)βjγik0γkj=αγiknb0gkb=αγiknb(0βjj)gkb+αγiknbβjjgkb=α2nbΠkbγik+αβjnbΦjkbγik=αγiknb(αΠkbβjΦjkb)

◆ time_deriv_of_shift() [2/2]

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.

Details

The time derivative of βi can be derived from the following steps:

0βi=γik0(γkjβj)βjγik0γkj=αγiknb0gkb=αγiknb(0βjj)gkb+αγiknbβjjgkb=α2nbΠkbγik+αβjnbΦjkbγik=αγiknb(αΠkbβjΦjkb)

◆ time_deriv_of_spatial_metric() [1/2]

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.

Details

Let the generalized harmonic conjugate momentum and spatial derivative variables be Πab=nccgab and Φiab=igab. As ni0. The time derivative of the spatial metric is given by the time derivative of the spatial sector of the spacetime metric, i.e. 0γij=0gij.

To compute the latter, we use the evolution equation for gij, c.f. eq.(35) of (with γ1=1):

0gab=αΠab+βkΦkab

◆ time_deriv_of_spatial_metric() [2/2]

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.

Details

Let the generalized harmonic conjugate momentum and spatial derivative variables be Πab=nccgab and Φiab=igab. As ni0. The time derivative of the spatial metric is given by the time derivative of the spatial sector of the spacetime metric, i.e. 0γij=0gij.

To compute the latter, we use the evolution equation for gij, c.f. eq.(35) of (with γ1=1):

0gab=αΠab+βkΦkab

◆ time_derivative_of_spacetime_metric() [1/4]

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.

Details

Computes the derivative as:

(73)tgtt=2αtα2γijβitβj+βiβjtγij(74)tgti=γjitβj+βjtγji(75)tgij=tγij,

where α,βi,γij are the lapse, shift, and spatial metric respectively.

◆ time_derivative_of_spacetime_metric() [2/4]

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 Πab, Φiab, and the lapse α and shift βi.

Details

Computes the derivative as:

(76)tgab=βiΦiabαΠab.

◆ time_derivative_of_spacetime_metric() [3/4]

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.

Details

Computes the derivative as:

(77)tgtt=2αtα2γijβitβj+βiβjtγij(78)tgti=γjitβj+βjtγji(79)tgij=tγij,

where α,βi,γij are the lapse, shift, and spatial metric respectively.

◆ time_derivative_of_spacetime_metric() [4/4]

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 Πab, Φiab, and the lapse α and shift βi.

Details

Computes the derivative as:

(80)tgab=βiΦiabαΠab.

◆ time_derivative_of_spatial_metric() [1/2]

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.

Details

Computes the derivative as (see e.g. , Eq. (2.134)):

(81)tγij=2αKij+2(iβj)=2αKij+βkkγij+γikjβk+γjkiβk

where α is the lapse, βi is the shift, γij is the spatial metric and Kij is the extrinsic curvature.

◆ time_derivative_of_spatial_metric() [2/2]

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.

Details

Computes the derivative as (see e.g. , Eq. (2.134)):

(82)tγij=2αKij+2(iβj)=2αKij+βkkγij+γikjβk+γjkiβk

where α is the lapse, βi is the shift, γij is the spatial metric and Kij is the extrinsic curvature.

◆ to_different_frame() [1/6]

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.

The tensor being transformed is always assumed to have density zero. In particular Scalar is assumed to be invariant under transformations.

Warning
The jacobian argument is the derivative of the source coordinates with respect to the destination coordinates.

◆ to_different_frame() [2/6]

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.

The tensor being transformed is always assumed to have density zero. In particular Scalar is assumed to be invariant under transformations.

Warning
The jacobian argument is the derivative of the source coordinates with respect to the destination coordinates.

◆ to_different_frame() [3/6]

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 
)

Transforms tensor to different frame.

The formula for transforming Tij is

(83)Tı¯ȷ¯=Tijxixı¯xjxȷ¯

where xi are the source coordinates and xı¯ are the destination coordinates.

Note that Jacobian<DestFrame,SrcFrame> is the same type as InverseJacobian<SrcFrame,DestFrame> and represents xi/xȷ¯.

◆ to_different_frame() [4/6]

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.

The tensor being transformed is always assumed to have density zero. In particular Scalar is assumed to be invariant under transformations.

Warning
The jacobian argument is the derivative of the source coordinates with respect to the destination coordinates.

◆ to_different_frame() [5/6]

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 >

Transforms tensor to different frame.

The formula for transforming Tij is

(84)Tı¯ȷ¯=Tijxixı¯xjxȷ¯

where xi are the source coordinates and xı¯ are the destination coordinates.

Note that Jacobian<DestFrame,SrcFrame> is the same type as InverseJacobian<SrcFrame,DestFrame> and represents xi/xȷ¯.

◆ to_different_frame() [6/6]

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.

The tensor being transformed is always assumed to have density zero. In particular Scalar is assumed to be invariant under transformations.

Warning
The jacobian argument is the derivative of the source coordinates with respect to the destination coordinates.

◆ trace() [1/2]

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.

Details

Computes gabTab or gabTab where (a,b) can be spatial or spacetime indices.

◆ trace() [2/2]

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.

Details

Computes gabTab or gabTab where (a,b) can be spatial or spacetime indices.

◆ trace_last_indices() [1/2]

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.

Details

For example, if Tabc is a tensor such that Tabc=Tacb then Ta=gbcTabc is computed, where gbc 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.

◆ trace_last_indices() [2/2]

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.

Details

For example, if Tabc is a tensor such that Tabc=Tacb then Ta=gbcTabc is computed, where gbc 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.

◆ transverse_projection_operator() [1/6]

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.

Details

Consider a d1-dimensional surface S in a d-dimensional spatial hypersurface Σ. Let sa (sa) be the unit spacelike vector (one-form) orthogonal to S in Σ, and na (na) be the timelike unit vector (one-form) orthogonal to Σ. This function returns the projection operator onto S for d+1 dimensional quantities:

Pba=δba+nanbsasb.

◆ transverse_projection_operator() [2/6]

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.

Details

Consider a d1-dimensional surface S in a d-dimensional spatial hypersurface Σ. Let sa be the unit spacelike one-form orthogonal to S in Σ, and na be the timelike unit vector orthogonal to Σ. This function returns the projection operator onto S for d+1 dimensional quantities:

Pab=gab+nanbsasb=γabsasb.

◆ transverse_projection_operator() [3/6]

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.

Details

Returns the operator Pij=γijninj, where γij is the inverse spatial metric, and ni is the normal vector to the interface in question.

◆ transverse_projection_operator() [4/6]

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.

Details

Consider a d1-dimensional surface S in a d-dimensional spatial hypersurface Σ. Let sa be the unit spacelike vector orthogonal to S in Σ, and na be the timelike unit vector orthogonal to Σ. This function returns the projection operator onto S for d+1 dimensional quantities:

Pab=gab+nanbsasb=γabsasb.

◆ transverse_projection_operator() [5/6]

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.

Details

Consider a d1-dimensional surface S in a d-dimensional spatial hypersurface Σ. Let sa (sa) be the unit spacelike vector (one-form) orthogonal to S in Σ, and na (na) be the timelike unit vector (one-form) orthogonal to Σ. This function returns the projection operator onto S for d+1 dimensional quantities:

Pba=δba+nanbsasb.

◆ transverse_projection_operator() [6/6]

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.

Details

Returns the operator Pij=γijninj, where γij is the spatial metric, and ni is the normal one-form to the interface in question.

Details

Returns the operator Pji=δjininj, where ni and ni are the normal vector and normal one-form to the interface in question.

◆ weyl_electric() [1/2]

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.

Details

Computes the electric part of the Weyl tensor in vacuum Eij as: Eij=Rij+KKijKimKmj where Rij is the spatial Ricci tensor, Kij is the extrinsic curvature, and K is the trace of Kij. An additional definition is Eij=nanbCaibj, where n is the unit-normal to the hypersurface and C is the Weyl tensor consistent with the conventions in .

Note
This needs additional terms for computations in a non-vacuum.

◆ weyl_electric() [2/2]

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.

Details

Computes the electric part of the Weyl tensor in vacuum Eij as: Eij=Rij+KKijKimKmj where Rij is the spatial Ricci tensor, Kij is the extrinsic curvature, and K is the trace of Kij. An additional definition is Eij=nanbCaibj, where n is the unit-normal to the hypersurface and C is the Weyl tensor consistent with the conventions in .

Note
This needs additional terms for computations in a non-vacuum.

◆ weyl_electric_scalar() [1/2]

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 EijEij from the electric part of the Weyl tensor Eij.

Details

Computes the scalar EijEij from the electric part of the Weyl tensor Eij and the inverse spatial metric γij, i.e. Eij=γikγjlEijEkl.

Note
The electric part of the Weyl tensor in vacuum is available via gr::weyl_electric(). The electric part of the Weyl tensor needs additional terms for matter.

◆ weyl_electric_scalar() [2/2]

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 EijEij from the electric part of the Weyl tensor Eij.

Details

Computes the scalar EijEij from the electric part of the Weyl tensor Eij and the inverse spatial metric γij, i.e. Eij=γikγjlEijEkl.

Note
The electric part of the Weyl tensor in vacuum is available via gr::weyl_electric(). The electric part of the Weyl tensor needs additional terms for matter.

◆ weyl_magnetic() [1/2]

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.

Details

Computes the magnetic part of the Weyl tensor Bij as:

(85)Bij=(1/detγ)DkKl(iγj)mϵmlk

where ϵijk is the spatial Levi-Civita symbol, Kij is the extrinsic curvature, γjm is the spatial metric, and Di is spatial covariant derivative.

◆ weyl_magnetic() [2/2]

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.

Details

Computes the magnetic part of the Weyl tensor Bij as:

(86)Bij=(1/detγ)DkKl(iγj)mϵmlk

where ϵijk is the spatial Levi-Civita symbol, Kij is the extrinsic curvature, γjm is the spatial metric, and Di is spatial covariant derivative.

◆ weyl_magnetic_scalar() [1/2]

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 BijBij from the magnetic part of the Weyl tensor Bij.

Details

Computes the scalar BijBij from the magnetic part of the Weyl tensor Bij and the inverse spatial metric γij, i.e. Bij=γikγjlBijBkl.

Note
The magnetic part of the Weyl tensor in vacuum is available via gr::weyl_magnetic(). The magnetic part of the Weyl tensor needs additional terms for matter.

◆ weyl_magnetic_scalar() [2/2]

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 BijBij from the magnetic part of the Weyl tensor Bij.

Details

Computes the scalar BijBij from the magnetic part of the Weyl tensor Bij and the inverse spatial metric γij, i.e. Bij=γikγjlBijBkl.

Note
The magnetic part of the Weyl tensor in vacuum is available via gr::weyl_magnetic(). The magnetic part of the Weyl tensor needs additional terms for matter.

◆ weyl_propagating() [1/2]

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.

Details

The Weyl tensor evolution system in vacuum has six characteristic fields, of which two ( U8±) are proportional to the Newman-Penrose components of the Weyl tensor Ψ4 and Ψ0. These represent the true gravitational-wave degrees of freedom, and can be written down in terms of 3+1 quantities as (see Eq. 75):

(87)Uij8±=(PikPjl12PijPkl)(Rkl+KKklKkmKmlnmmKkl±nm(kKl)m),(88)=(PikPjl12PijPkl)(EklnmmKkl±nm(kKl)m),

where Rij is the spatial Ricci tensor, Kij is the extrinsic curvature, K is the trace of Kij, Eij is the electric part of the Weyl tensor in vacuum, ni is the outward directed unit normal vector to the interface, i denotes the covariant derivative, and Pij and its index-raised and lowered forms project tensors transverse to ni.

◆ weyl_propagating() [2/2]

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.

Details

The Weyl tensor evolution system in vacuum has six characteristic fields, of which two ( U8±) are proportional to the Newman-Penrose components of the Weyl tensor Ψ4 and Ψ0. These represent the true gravitational-wave degrees of freedom, and can be written down in terms of 3+1 quantities as (see Eq. 75):

(89)Uij8±=(PikPjl12PijPkl)(Rkl+KKklKkmKmlnmmKkl±nm(kKl)m),(90)=(PikPjl12PijPkl)(EklnmmKkl±nm(kKl)m),

where Rij is the spatial Ricci tensor, Kij is the extrinsic curvature, K is the trace of Kij, Eij is the electric part of the Weyl tensor in vacuum, ni is the outward directed unit normal vector to the interface, i denotes the covariant derivative, and Pij and its index-raised and lowered forms project tensors transverse to ni.

◆ weyl_type_D1() [1/2]

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.

Details

Computes a quantity measuring how far from type D spacetime is, using measure D1 [Eq. (8) of ]:

(91)a12γijbaEij4EikEjk=0

where γij is the spatial metric and Eij is the electric part ofthe Weyl tensor.

◆ weyl_type_D1() [2/2]

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.

Details

Computes a quantity measuring how far from type D spacetime is, using measure D1 [Eq. (8) of ]:

(92)a12γijbaEij4EikEjk=0

where γij is the spatial metric and Eij is the electric part ofthe Weyl tensor.

◆ weyl_type_D1_scalar() [1/2]

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 DijDij , a measure of a spacetime's devitation from type D.

Details

Computes the scalar DijDij from Dij (Eq. (8) of ] and the inverse spatial metric γij, i.e. D=γikγjlDijDkl.

Note
The Weyl Type D1 Dij is available via gr::weyl_type_D1.

◆ weyl_type_D1_scalar() [2/2]

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 DijDij , a measure of a spacetime's devitation from type D.

Details

Computes the scalar DijDij from Dij (Eq. (8) of ] and the inverse spatial metric γij, i.e. D=γikγjlDijDkl.

Note
The Weyl Type D1 Dij is available via gr::weyl_type_D1.