SpECTRE
v2024.12.16
|
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, | |
template<typename DataType , size_t VolumeDim, typename SrcFrame , typename DestFrame > | |
void | transform::to_different_frame (const gsl::not_null< tnsr::ii< DataType, VolumeDim, DestFrame > * > dest, const tnsr::ii< DataType, VolumeDim, SrcFrame > &src, const Jacobian< DataType, VolumeDim, DestFrame, SrcFrame > &jacobian) |
template<typename DataType , size_t VolumeDim, typename SrcFrame , typename DestFrame > | |
auto | transform::to_different_frame (const tnsr::ii< DataType, VolumeDim, SrcFrame > &src, const Jacobian< DataType, VolumeDim, DestFrame, SrcFrame > &jacobian) -> tnsr::ii< DataType, VolumeDim, DestFrame > |
template<typename DataType , size_t VolumeDim, typename SrcFrame , typename DestFrame > | |
void | transform::to_different_frame (const gsl::not_null< Scalar< DataType > * > dest, const Scalar< DataType > &src, const Jacobian< DataType, VolumeDim, DestFrame, SrcFrame > &jacobian, const InverseJacobian< DataType, VolumeDim, DestFrame, SrcFrame > &inv_jacobian) |
Transforms a tensor to a different frame. More... | |
template<typename DataType , size_t VolumeDim, typename SrcFrame , typename DestFrame > | |
auto | transform::to_different_frame (Scalar< DataType > src, const Jacobian< DataType, VolumeDim, DestFrame, SrcFrame > &jacobian, const InverseJacobian< DataType, VolumeDim, DestFrame, SrcFrame > &inv_jacobian) -> Scalar< DataType > |
Transforms a tensor to a different frame. More... | |
template<typename DataType , size_t VolumeDim, typename SrcFrame , typename DestFrame > | |
void | transform::to_different_frame (const gsl::not_null< tnsr::I< DataType, VolumeDim, DestFrame > * > dest, const tnsr::I< DataType, VolumeDim, SrcFrame > &src, const Jacobian< DataType, VolumeDim, DestFrame, SrcFrame > &jacobian, const InverseJacobian< DataType, VolumeDim, DestFrame, SrcFrame > &inv_jacobian) |
Transforms a tensor to a different frame. More... | |
template<typename DataType , size_t VolumeDim, typename SrcFrame , typename DestFrame > | |
auto | transform::to_different_frame (const tnsr::I< DataType, VolumeDim, SrcFrame > &src, const Jacobian< DataType, VolumeDim, DestFrame, SrcFrame > &jacobian, const InverseJacobian< DataType, VolumeDim, DestFrame, SrcFrame > &inv_jacobian) -> tnsr::I< DataType, VolumeDim, DestFrame > |
Transforms a tensor to a different frame. More... | |
template<typename ResultTensor , typename InputTensor , typename DataType , size_t Dim, typename SourceFrame , typename TargetFrame > | |
void | transform::first_index_to_different_frame (gsl::not_null< ResultTensor * > result, const InputTensor &input, const InverseJacobian< DataType, Dim, SourceFrame, TargetFrame > &inv_jacobian) |
template<typename InputTensor , typename DataType , size_t Dim, typename SourceFrame , typename TargetFrame , typename ResultTensor = TensorMetafunctions::prepend_spatial_index< TensorMetafunctions::remove_first_index<InputTensor>, Dim, UpLo::Up, SourceFrame>> | |
ResultTensor | transform::first_index_to_different_frame (const InputTensor &input, const InverseJacobian< DataType, Dim, SourceFrame, TargetFrame > &inv_jacobian) |
template<typename DataType , typename Index0 , typename Index1 > | |
void | raise_or_lower_first_index (gsl::not_null< Tensor< DataType, Symmetry< 2, 1, 1 >, index_list< change_index_up_lo< Index0 >, Index1, Index1 > > * > result, const Tensor< DataType, Symmetry< 2, 1, 1 >, index_list< Index0, Index1, Index1 > > &tensor, const Tensor< DataType, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index0 >, change_index_up_lo< Index0 > > > &metric) |
Raises or lowers the first index of a rank 3 tensor which is symmetric in the last two indices. More... | |
template<typename DataType , typename Index0 , typename Index1 > | |
Tensor< DataType, Symmetry< 2, 1, 1 >, index_list< change_index_up_lo< Index0 >, Index1, Index1 > > | raise_or_lower_first_index (const Tensor< DataType, Symmetry< 2, 1, 1 >, index_list< Index0, Index1, Index1 > > &tensor, const Tensor< DataType, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index0 >, change_index_up_lo< Index0 > > > &metric) |
Raises or lowers the first index of a rank 3 tensor which is symmetric in the last two indices. More... | |
template<typename DataTypeTensor , typename DataTypeMetric , typename Index0 > | |
void | raise_or_lower_index (gsl::not_null< Tensor< DataTypeTensor, Symmetry< 1 >, index_list< change_index_up_lo< Index0 > > > * > result, const Tensor< DataTypeTensor, Symmetry< 1 >, index_list< Index0 > > &tensor, const Tensor< DataTypeMetric, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index0 >, change_index_up_lo< Index0 > > > &metric) |
Raises or lowers the index of a rank 1 tensor. More... | |
template<typename DataTypeTensor , typename DataTypeMetric , typename Index0 > | |
Tensor< DataTypeTensor, Symmetry< 1 >, index_list< change_index_up_lo< Index0 > > > | raise_or_lower_index (const Tensor< DataTypeTensor, Symmetry< 1 >, index_list< Index0 > > &tensor, const Tensor< DataTypeMetric, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index0 >, change_index_up_lo< Index0 > > > &metric) |
Raises or lowers the index of a rank 1 tensor. More... | |
template<typename DataType , typename Index0 , typename Index1 > | |
void | trace_last_indices (gsl::not_null< Tensor< DataType, Symmetry< 1 >, index_list< Index0 > > * > trace_of_tensor, const Tensor< DataType, Symmetry< 2, 1, 1 >, index_list< Index0, Index1, Index1 > > &tensor, const Tensor< DataType, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index1 >, change_index_up_lo< Index1 > > > &metric) |
Computes trace of a rank 3 tensor, which is symmetric in its last two indices, tracing the symmetric indices. More... | |
template<typename DataType , typename Index0 , typename Index1 > | |
Tensor< DataType, Symmetry< 1 >, index_list< Index0 > > | trace_last_indices (const Tensor< DataType, Symmetry< 2, 1, 1 >, index_list< Index0, Index1, Index1 > > &tensor, const Tensor< DataType, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index1 >, change_index_up_lo< Index1 > > > &metric) |
Computes trace of a rank 3 tensor, which is symmetric in its last two indices, tracing the symmetric indices. More... | |
template<typename DataType , typename Index0 > | |
void | trace (gsl::not_null< Scalar< DataType > * > trace, const Tensor< DataType, Symmetry< 1, 1 >, index_list< Index0, Index0 > > &tensor, const Tensor< DataType, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index0 >, change_index_up_lo< Index0 > > > &metric) |
Computes trace of a rank-2 symmetric tensor. More... | |
template<typename DataType , typename Index0 > | |
Scalar< DataType > | trace (const Tensor< DataType, Symmetry< 1, 1 >, index_list< Index0, Index0 > > &tensor, const Tensor< DataType, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index0 >, change_index_up_lo< Index0 > > > &metric) |
Computes trace of a rank-2 symmetric tensor. More... | |
template<typename DataType , size_t Dim, typename Frame > | |
void | Ccz4::divergence_lapse (const gsl::not_null< Scalar< DataType > * > result, const Scalar< DataType > &conformal_factor_squared, const tnsr::II< DataType, Dim, Frame > &inverse_conformal_metric, const tnsr::ij< DataType, Dim, Frame > &grad_grad_lapse) |
Computes the divergence of the lapse. More... | |
template<typename DataType , size_t Dim, typename Frame > | |
Scalar< DataType > | Ccz4::divergence_lapse (const Scalar< DataType > &conformal_factor_squared, const tnsr::II< DataType, Dim, Frame > &inverse_conformal_metric, const tnsr::ij< DataType, Dim, Frame > &grad_grad_lapse) |
Computes the divergence of the lapse. More... | |
template<size_t SpatialDim, typename Frame , IndexType Index, typename DataType > | |
void | gr::christoffel_first_kind (gsl::not_null< tnsr::abb< DataType, SpatialDim, Frame, Index > * > christoffel, const tnsr::abb< DataType, SpatialDim, Frame, Index > &d_metric) |
Computes Christoffel symbol of the first kind from derivative of metric. More... | |
template<size_t SpatialDim, typename Frame , IndexType Index, typename DataType > | |
tnsr::abb< DataType, SpatialDim, Frame, Index > | gr::christoffel_first_kind (const tnsr::abb< DataType, SpatialDim, Frame, Index > &d_metric) |
Computes Christoffel symbol of the first kind from derivative of metric. More... | |
template<size_t SpatialDim, typename Frame , IndexType Index, typename DataType > | |
void | gr::christoffel_second_kind (gsl::not_null< tnsr::Abb< DataType, SpatialDim, Frame, Index > * > christoffel, const tnsr::abb< DataType, SpatialDim, Frame, Index > &d_metric, const tnsr::AA< DataType, SpatialDim, Frame, Index > &inverse_metric) |
Computes Christoffel symbol of the second kind from derivative of metric and the inverse metric. More... | |
template<size_t SpatialDim, typename Frame , IndexType Index, typename DataType > | |
auto | gr::christoffel_second_kind (const tnsr::abb< DataType, SpatialDim, Frame, Index > &d_metric, const tnsr::AA< DataType, SpatialDim, Frame, Index > &inverse_metric) -> tnsr::Abb< DataType, SpatialDim, Frame, Index > |
Computes Christoffel symbol of the second kind from derivative of metric and the inverse metric. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | gr::derivatives_of_spacetime_metric (gsl::not_null< tnsr::abb< DataType, SpatialDim, Frame > * > spacetime_deriv_spacetime_metric, const Scalar< DataType > &lapse, const Scalar< DataType > &dt_lapse, const tnsr::i< DataType, SpatialDim, Frame > &deriv_lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::I< DataType, SpatialDim, Frame > &dt_shift, const tnsr::iJ< DataType, SpatialDim, Frame > &deriv_shift, const tnsr::ii< DataType, SpatialDim, Frame > &spatial_metric, const tnsr::ii< DataType, SpatialDim, Frame > &dt_spatial_metric, const tnsr::ijj< DataType, SpatialDim, Frame > &deriv_spatial_metric) |
Computes spacetime derivative of spacetime metric from spatial metric, lapse, shift, and their space and time derivatives. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::abb< DataType, SpatialDim, Frame > | gr::derivatives_of_spacetime_metric (const Scalar< DataType > &lapse, const Scalar< DataType > &dt_lapse, const tnsr::i< DataType, SpatialDim, Frame > &deriv_lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::I< DataType, SpatialDim, Frame > &dt_shift, const tnsr::iJ< DataType, SpatialDim, Frame > &deriv_shift, const tnsr::ii< DataType, SpatialDim, Frame > &spatial_metric, const tnsr::ii< DataType, SpatialDim, Frame > &dt_spatial_metric, const tnsr::ijj< DataType, SpatialDim, Frame > &deriv_spatial_metric) |
Computes spacetime derivative of spacetime metric from spatial metric, lapse, shift, and their space and time derivatives. More... | |
template<typename DataType , size_t Dim, typename Frame > | |
void | gr::deriv_inverse_spatial_metric (gsl::not_null< tnsr::iJJ< DataType, Dim, Frame > * > result, const tnsr::II< DataType, Dim, Frame > &inverse_spatial_metric, const tnsr::ijj< DataType, Dim, Frame > &d_spatial_metric) |
Computes the spatial derivative of the inverse spatial metric from the inverse spatial metric and the spatial derivative of the spatial metric. More... | |
template<typename DataType , size_t Dim, typename Frame > | |
tnsr::iJJ< DataType, Dim, Frame > | gr::deriv_inverse_spatial_metric (const tnsr::II< DataType, Dim, Frame > &inverse_spatial_metric, const tnsr::ijj< DataType, Dim, Frame > &d_spatial_metric) |
Computes the spatial derivative of the inverse spatial metric from the inverse spatial metric and the spatial derivative of the spatial metric. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::ii< DataType, SpatialDim, Frame > | gr::extrinsic_curvature (const Scalar< DataType > &lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::iJ< DataType, SpatialDim, Frame > &deriv_shift, const tnsr::ii< DataType, SpatialDim, Frame > &spatial_metric, const tnsr::ii< DataType, SpatialDim, Frame > &dt_spatial_metric, const tnsr::ijj< DataType, SpatialDim, Frame > &deriv_spatial_metric) |
Computes extrinsic curvature from metric and derivatives. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | gr::extrinsic_curvature (gsl::not_null< tnsr::ii< DataType, SpatialDim, Frame > * > ex_curvature, const Scalar< DataType > &lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::iJ< DataType, SpatialDim, Frame > &deriv_shift, const tnsr::ii< DataType, SpatialDim, Frame > &spatial_metric, const tnsr::ii< DataType, SpatialDim, Frame > &dt_spatial_metric, const tnsr::ijj< DataType, SpatialDim, Frame > &deriv_spatial_metric) |
Computes extrinsic curvature from metric and derivatives. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | gh::christoffel_second_kind (const gsl::not_null< tnsr::Ijj< DataType, SpatialDim, Frame > * > christoffel, const tnsr::iaa< DataType, SpatialDim, Frame > &phi, const tnsr::II< DataType, SpatialDim, Frame > &inv_metric) |
Computes spatial Christoffel symbol of the 2nd kind from the the generalized harmonic spatial derivative variable and the inverse spatial metric. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
auto | gh::christoffel_second_kind (const tnsr::iaa< DataType, SpatialDim, Frame > &phi, const tnsr::II< DataType, SpatialDim, Frame > &inv_metric) -> tnsr::Ijj< DataType, SpatialDim, Frame > |
Computes spatial Christoffel symbol of the 2nd kind from the the generalized harmonic spatial derivative variable and the inverse spatial metric. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | gh::deriv_spatial_metric (gsl::not_null< tnsr::ijj< DataType, SpatialDim, Frame > * > d_spatial_metric, const tnsr::iaa< DataType, SpatialDim, Frame > &phi) |
Computes spatial derivatives of the spatial metric from the generalized harmonic spatial derivative variable. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::ijj< DataType, SpatialDim, Frame > | gh::deriv_spatial_metric (const tnsr::iaa< DataType, SpatialDim, Frame > &phi) |
Computes spatial derivatives of the spatial metric from the generalized harmonic spatial derivative variable. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | gh::extrinsic_curvature (gsl::not_null< tnsr::ii< DataType, SpatialDim, Frame > * > ex_curv, const tnsr::A< DataType, SpatialDim, Frame > &spacetime_normal_vector, const tnsr::aa< DataType, SpatialDim, Frame > &pi, const tnsr::iaa< DataType, SpatialDim, Frame > &phi) |
Computes extrinsic curvature from generalized harmonic variables and the spacetime normal vector. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::ii< DataType, SpatialDim, Frame > | gh::extrinsic_curvature (const tnsr::A< DataType, SpatialDim, Frame > &spacetime_normal_vector, const tnsr::aa< DataType, SpatialDim, Frame > &pi, const tnsr::iaa< DataType, SpatialDim, Frame > &phi) |
Computes extrinsic curvature from generalized harmonic variables and the spacetime normal vector. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | gh::gauge_source (gsl::not_null< tnsr::a< DataType, SpatialDim, Frame > * > gauge_source_h, const Scalar< DataType > &lapse, const Scalar< DataType > &dt_lapse, const tnsr::i< DataType, SpatialDim, Frame > &deriv_lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::I< DataType, SpatialDim, Frame > &dt_shift, const tnsr::iJ< DataType, SpatialDim, Frame > &deriv_shift, const tnsr::ii< DataType, SpatialDim, Frame > &spatial_metric, const Scalar< DataType > &trace_extrinsic_curvature, const tnsr::i< DataType, SpatialDim, Frame > &trace_christoffel_last_indices) |
Computes generalized harmonic gauge source function. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::a< DataType, SpatialDim, Frame > | gh::gauge_source (const Scalar< DataType > &lapse, const Scalar< DataType > &dt_lapse, const tnsr::i< DataType, SpatialDim, Frame > &deriv_lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::I< DataType, SpatialDim, Frame > &dt_shift, const tnsr::iJ< DataType, SpatialDim, Frame > &deriv_shift, const tnsr::ii< DataType, SpatialDim, Frame > &spatial_metric, const Scalar< DataType > &trace_extrinsic_curvature, const tnsr::i< DataType, SpatialDim, Frame > &trace_christoffel_last_indices) |
Computes generalized harmonic gauge source function. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | gh::phi (gsl::not_null< tnsr::iaa< DataType, SpatialDim, Frame > * > phi, const Scalar< DataType > &lapse, const tnsr::i< DataType, SpatialDim, Frame > &deriv_lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::iJ< DataType, SpatialDim, Frame > &deriv_shift, const tnsr::ii< DataType, SpatialDim, Frame > &spatial_metric, const tnsr::ijj< DataType, SpatialDim, Frame > &deriv_spatial_metric) |
Computes the auxiliary variable | |
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 | |
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 | |
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 | |
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 ( | |
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 ( | |
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 | |
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 | |
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 ( | |
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 ( | |
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 | |
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 | |
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 | |
template<typename Frame > | |
Scalar< DataVector > | gr::psi_4_real (const tnsr::ii< DataVector, 3, Frame > &spatial_ricci, const tnsr::ii< DataVector, 3, Frame > &extrinsic_curvature, const tnsr::ijj< DataVector, 3, Frame > &cov_deriv_extrinsic_curvature, const tnsr::ii< DataVector, 3, Frame > &spatial_metric, const tnsr::II< DataVector, 3, Frame > &inverse_spatial_metric, const tnsr::I< DataVector, 3, Frame > &inertial_coords) |
Computes the real part of the Newman Penrose quantity | |
template<size_t SpatialDim, typename Frame , IndexType Index, typename DataType > | |
void | gr::ricci_tensor (gsl::not_null< tnsr::aa< DataType, SpatialDim, Frame, Index > * > result, const tnsr::Abb< DataType, SpatialDim, Frame, Index > &christoffel_2nd_kind, const tnsr::aBcc< DataType, SpatialDim, Frame, Index > &d_christoffel_2nd_kind) |
Computes Ricci tensor from the (spatial or spacetime) Christoffel symbol of the second kind and its derivative. More... | |
template<size_t SpatialDim, typename Frame , IndexType Index, typename DataType > | |
tnsr::aa< DataType, SpatialDim, Frame, Index > | gr::ricci_tensor (const tnsr::Abb< DataType, SpatialDim, Frame, Index > &christoffel_2nd_kind, const tnsr::aBcc< DataType, SpatialDim, Frame, Index > &d_christoffel_2nd_kind) |
Computes Ricci tensor from the (spatial or spacetime) Christoffel symbol of the second kind and its derivative. More... | |
template<size_t SpatialDim, typename Frame , IndexType Index, typename DataType > | |
void | gr::ricci_scalar (gsl::not_null< Scalar< DataType > * > ricci_scalar_result, const tnsr::aa< DataType, SpatialDim, Frame, Index > &ricci_tensor, const tnsr::AA< DataType, SpatialDim, Frame, Index > &inverse_metric) |
Computes the Ricci Scalar from the (spatial or spacetime) Ricci Tensor and inverse metrics. More... | |
template<size_t SpatialDim, typename Frame , IndexType Index, typename DataType > | |
Scalar< DataType > | gr::ricci_scalar (const tnsr::aa< DataType, SpatialDim, Frame, Index > &ricci_tensor, const tnsr::AA< DataType, SpatialDim, Frame, Index > &inverse_metric) |
Computes the Ricci Scalar from the (spatial or spacetime) Ricci Tensor and inverse metrics. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
tnsr::I< DataType, SpatialDim, Frame > | gr::shift (const tnsr::aa< DataType, SpatialDim, Frame > &spacetime_metric, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric) |
Compute shift from spacetime metric and inverse spatial metric. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | gr::shift (gsl::not_null< tnsr::I< DataType, SpatialDim, Frame > * > shift, const tnsr::aa< DataType, SpatialDim, Frame > &spacetime_metric, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric) |
Compute shift from spacetime metric and inverse spatial metric. More... | |
template<typename DataType , size_t SpatialDim, typename Frame > | |
void | gr::spacetime_deriv_of_goth_g (gsl::not_null< tnsr::aBB< DataType, SpatialDim, Frame > * > da_goth_g, const tnsr::AA< DataType, SpatialDim, Frame > &inverse_spacetime_metric, const tnsr::abb< DataType, SpatialDim, Frame > &da_spacetime_metric, const Scalar< DataType > &lapse, const tnsr::a< DataType, SpatialDim, Frame > &da_lapse, const Scalar< DataType > &sqrt_det_spatial_metric, const tnsr::a< DataType, SpatialDim, Frame > &da_det_spatial_metric) |
Computes spacetime derivative of | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
Contains functions used in General Relativistic simulations.
tnsr::abb< DataType, SpatialDim, Frame, Index > gr::christoffel_first_kind | ( | const tnsr::abb< DataType, SpatialDim, Frame, Index > & | d_metric | ) |
Computes Christoffel symbol of the first kind from derivative of metric.
Computes Christoffel symbol
void gr::christoffel_first_kind | ( | gsl::not_null< tnsr::abb< DataType, SpatialDim, Frame, Index > * > | christoffel, |
const tnsr::abb< DataType, SpatialDim, Frame, Index > & | d_metric | ||
) |
Computes Christoffel symbol of the first kind from derivative of metric.
Computes Christoffel symbol
void gh::christoffel_second_kind | ( | const gsl::not_null< tnsr::Ijj< DataType, SpatialDim, Frame > * > | christoffel, |
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inv_metric | ||
) |
Computes spatial Christoffel symbol of the 2nd kind from the the generalized harmonic spatial derivative variable and the inverse spatial metric.
If
In the not_null version, no memory allocations are performed if the output tensor already has the correct size.
auto gr::christoffel_second_kind | ( | const tnsr::abb< DataType, SpatialDim, Frame, Index > & | d_metric, |
const tnsr::AA< DataType, SpatialDim, Frame, Index > & | inverse_metric | ||
) | -> tnsr::Abb< DataType, SpatialDim, Frame, Index > |
Computes Christoffel symbol of the second kind from derivative of metric and the inverse metric.
Computes Christoffel symbol
Avoids the extra memory allocation that occurs by computing the Christoffel symbol of the first kind and then raising the index.
auto gh::christoffel_second_kind | ( | const tnsr::iaa< DataType, SpatialDim, Frame > & | phi, |
const tnsr::II< DataType, SpatialDim, Frame > & | inv_metric | ||
) | -> tnsr::Ijj< DataType, SpatialDim, Frame > |
Computes spatial Christoffel symbol of the 2nd kind from the the generalized harmonic spatial derivative variable and the inverse spatial metric.
If
In the not_null version, no memory allocations are performed if the output tensor already has the correct size.
void gr::christoffel_second_kind | ( | gsl::not_null< tnsr::Abb< DataType, SpatialDim, Frame, Index > * > | christoffel, |
const tnsr::abb< DataType, SpatialDim, Frame, Index > & | d_metric, | ||
const tnsr::AA< DataType, SpatialDim, Frame, Index > & | inverse_metric | ||
) |
Computes Christoffel symbol of the second kind from derivative of metric and the inverse metric.
Computes Christoffel symbol
Avoids the extra memory allocation that occurs by computing the Christoffel symbol of the first kind and then raising the index.
tnsr::ijj< DataType, SpatialDim, Frame > gh::covariant_deriv_of_extrinsic_curvature | ( | const tnsr::ii< DataType, SpatialDim, Frame > & | extrinsic_curvature, |
const tnsr::A< DataType, SpatialDim, Frame > & | spacetime_unit_normal_vector, | ||
const tnsr::Ijj< DataType, SpatialDim, Frame > & | spatial_christoffel_second_kind, | ||
const tnsr::AA< DataType, SpatialDim, Frame > & | inverse_spacetime_metric, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | d_pi, | ||
const tnsr::ijaa< DataType, SpatialDim, Frame > & | d_phi | ||
) |
Computes the covariant derivative of extrinsic curvature from generalized harmonic variables and the spacetime normal vector.
If
and its covariant derivative as
where
where we have access to all terms except the spatial derivatives of the spacetime unit normal vector
where we use the expression for
where we use the expression for
and using Eq.(
.
tnsr::iJJ< DataType, Dim, Frame > gr::deriv_inverse_spatial_metric | ( | const tnsr::II< DataType, Dim, Frame > & | inverse_spatial_metric, |
const tnsr::ijj< DataType, Dim, Frame > & | d_spatial_metric | ||
) |
Computes the spatial derivative of the inverse spatial metric from the inverse spatial metric and the spatial derivative of the spatial metric.
Computes the derivative as:
where
void gr::deriv_inverse_spatial_metric | ( | gsl::not_null< tnsr::iJJ< DataType, Dim, Frame > * > | result, |
const tnsr::II< DataType, Dim, Frame > & | inverse_spatial_metric, | ||
const tnsr::ijj< DataType, Dim, Frame > & | d_spatial_metric | ||
) |
Computes the spatial derivative of the inverse spatial metric from the inverse spatial metric and the spatial derivative of the spatial metric.
Computes the derivative as:
where
tnsr::ijj< DataType, SpatialDim, Frame > gh::deriv_spatial_metric | ( | const tnsr::iaa< DataType, SpatialDim, Frame > & | phi | ) |
Computes spatial derivatives of the spatial metric from the generalized harmonic spatial derivative variable.
If
This quantity is needed for computing spatial Christoffel symbols.
void gh::deriv_spatial_metric | ( | gsl::not_null< tnsr::ijj< DataType, SpatialDim, Frame > * > | d_spatial_metric, |
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi | ||
) |
Computes spatial derivatives of the spatial metric from the generalized harmonic spatial derivative variable.
If
This quantity is needed for computing spatial Christoffel symbols.
tnsr::abb< DataType, SpatialDim, Frame > gr::derivatives_of_spacetime_metric | ( | const Scalar< DataType > & | lapse, |
const Scalar< DataType > & | dt_lapse, | ||
const tnsr::i< DataType, SpatialDim, Frame > & | deriv_lapse, | ||
const tnsr::I< DataType, SpatialDim, Frame > & | shift, | ||
const tnsr::I< DataType, SpatialDim, Frame > & | dt_shift, | ||
const tnsr::iJ< DataType, SpatialDim, Frame > & | deriv_shift, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | spatial_metric, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | dt_spatial_metric, | ||
const tnsr::ijj< DataType, SpatialDim, Frame > & | deriv_spatial_metric | ||
) |
Computes spacetime derivative of spacetime metric from spatial metric, lapse, shift, and their space and time derivatives.
Computes the derivatives as:
where
void gr::derivatives_of_spacetime_metric | ( | gsl::not_null< tnsr::abb< DataType, SpatialDim, Frame > * > | spacetime_deriv_spacetime_metric, |
const Scalar< DataType > & | lapse, | ||
const Scalar< DataType > & | dt_lapse, | ||
const tnsr::i< DataType, SpatialDim, Frame > & | deriv_lapse, | ||
const tnsr::I< DataType, SpatialDim, Frame > & | shift, | ||
const tnsr::I< DataType, SpatialDim, Frame > & | dt_shift, | ||
const tnsr::iJ< DataType, SpatialDim, Frame > & | deriv_shift, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | spatial_metric, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | dt_spatial_metric, | ||
const tnsr::ijj< DataType, SpatialDim, Frame > & | deriv_spatial_metric | ||
) |
Computes spacetime derivative of spacetime metric from spatial metric, lapse, shift, and their space and time derivatives.
Computes the derivatives as:
where
void Ccz4::divergence_lapse | ( | const gsl::not_null< Scalar< DataType > * > | result, |
const Scalar< DataType > & | conformal_factor_squared, | ||
const tnsr::II< DataType, Dim, Frame > & | inverse_conformal_metric, | ||
const tnsr::ij< DataType, Dim, Frame > & | grad_grad_lapse | ||
) |
Computes the divergence of the lapse.
Computes the divergence as:
where Ccz4::Tags::ConformalFactor
, Ccz4::Tags::InverseConformalMetric
, and Ccz4::Tags::GradGradLapse
, respectively.
Scalar< DataType > Ccz4::divergence_lapse | ( | const Scalar< DataType > & | conformal_factor_squared, |
const tnsr::II< DataType, Dim, Frame > & | inverse_conformal_metric, | ||
const tnsr::ij< DataType, Dim, Frame > & | grad_grad_lapse | ||
) |
Computes the divergence of the lapse.
Computes the divergence as:
where Ccz4::Tags::ConformalFactor
, Ccz4::Tags::InverseConformalMetric
, and Ccz4::Tags::GradGradLapse
, respectively.
tnsr::ii< DataType, SpatialDim, Frame > gr::extrinsic_curvature | ( | const Scalar< DataType > & | lapse, |
const tnsr::I< DataType, SpatialDim, Frame > & | shift, | ||
const tnsr::iJ< DataType, SpatialDim, Frame > & | deriv_shift, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | spatial_metric, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | dt_spatial_metric, | ||
const tnsr::ijj< DataType, SpatialDim, Frame > & | deriv_spatial_metric | ||
) |
Computes extrinsic curvature from metric and derivatives.
Uses the ADM evolution equation for the spatial metric,
where
where
tnsr::ii< DataType, SpatialDim, Frame > gh::extrinsic_curvature | ( | const tnsr::A< DataType, SpatialDim, Frame > & | spacetime_normal_vector, |
const tnsr::aa< DataType, SpatialDim, Frame > & | pi, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi | ||
) |
Computes extrinsic curvature from generalized harmonic variables and the spacetime normal vector.
If
void gh::extrinsic_curvature | ( | gsl::not_null< tnsr::ii< DataType, SpatialDim, Frame > * > | ex_curv, |
const tnsr::A< DataType, SpatialDim, Frame > & | spacetime_normal_vector, | ||
const tnsr::aa< DataType, SpatialDim, Frame > & | pi, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi | ||
) |
Computes extrinsic curvature from generalized harmonic variables and the spacetime normal vector.
If
void gr::extrinsic_curvature | ( | gsl::not_null< tnsr::ii< DataType, SpatialDim, Frame > * > | ex_curvature, |
const Scalar< DataType > & | lapse, | ||
const tnsr::I< DataType, SpatialDim, Frame > & | shift, | ||
const tnsr::iJ< DataType, SpatialDim, Frame > & | deriv_shift, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | spatial_metric, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | dt_spatial_metric, | ||
const tnsr::ijj< DataType, SpatialDim, Frame > & | deriv_spatial_metric | ||
) |
Computes extrinsic curvature from metric and derivatives.
Uses the ADM evolution equation for the spatial metric,
where
where
ResultTensor transform::first_index_to_different_frame | ( | const InputTensor & | input, |
const InverseJacobian< DataType, Dim, SourceFrame, TargetFrame > & | inv_jacobian | ||
) |
Transforms only the first index to different frame.
A common example is taking the divergence of a flux vector
Here,
Currently, this function is tested for any tensor with a first upper spatial index. It can be extended/generalized to other tensor types if needed.
void transform::first_index_to_different_frame | ( | gsl::not_null< ResultTensor * > | result, |
const InputTensor & | input, | ||
const InverseJacobian< DataType, Dim, SourceFrame, TargetFrame > & | inv_jacobian | ||
) |
Transforms only the first index to different frame.
A common example is taking the divergence of a flux vector
Here,
Currently, this function is tested for any tensor with a first upper spatial index. It can be extended/generalized to other tensor types if needed.
tnsr::a< DataType, SpatialDim, Frame > gh::gauge_source | ( | const Scalar< DataType > & | lapse, |
const Scalar< DataType > & | dt_lapse, | ||
const tnsr::i< DataType, SpatialDim, Frame > & | deriv_lapse, | ||
const tnsr::I< DataType, SpatialDim, Frame > & | shift, | ||
const tnsr::I< DataType, SpatialDim, Frame > & | dt_shift, | ||
const tnsr::iJ< DataType, SpatialDim, Frame > & | deriv_shift, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | spatial_metric, | ||
const Scalar< DataType > & | trace_extrinsic_curvature, | ||
const tnsr::i< DataType, SpatialDim, Frame > & | trace_christoffel_last_indices | ||
) |
Computes generalized harmonic gauge source function.
If
See Eqs. 8 and 9 of [123]
void gh::gauge_source | ( | gsl::not_null< tnsr::a< DataType, SpatialDim, Frame > * > | gauge_source_h, |
const Scalar< DataType > & | lapse, | ||
const Scalar< DataType > & | dt_lapse, | ||
const tnsr::i< DataType, SpatialDim, Frame > & | deriv_lapse, | ||
const tnsr::I< DataType, SpatialDim, Frame > & | shift, | ||
const tnsr::I< DataType, SpatialDim, Frame > & | dt_shift, | ||
const tnsr::iJ< DataType, SpatialDim, Frame > & | deriv_shift, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | spatial_metric, | ||
const Scalar< DataType > & | trace_extrinsic_curvature, | ||
const tnsr::i< DataType, SpatialDim, Frame > & | trace_christoffel_last_indices | ||
) |
Computes generalized harmonic gauge source function.
If
See Eqs. 8 and 9 of [123]
tnsr::a< DataType, VolumeDim, Frame > gr::interface_null_normal | ( | const tnsr::a< DataType, VolumeDim, Frame > & | spacetime_normal_one_form, |
const tnsr::i< DataType, VolumeDim, Frame > & | interface_unit_normal_one_form, | ||
double | sign | ||
) |
Compute null normal one-form to the boundary of a closed region in a spatial slice of spacetime.
Consider an
void gr::interface_null_normal | ( | gsl::not_null< tnsr::A< DataType, VolumeDim, Frame > * > | null_vector, |
const tnsr::A< DataType, VolumeDim, Frame > & | spacetime_normal_vector, | ||
const tnsr::I< DataType, VolumeDim, Frame > & | interface_unit_normal_vector, | ||
double | sign | ||
) |
Compute null normal vector to the boundary of a closed region in a spatial slice of spacetime.
Consider an
tnsr::AA< DataType, SpatialDim, Frame > gr::inverse_spacetime_metric | ( | const Scalar< DataType > & | lapse, |
const tnsr::I< DataType, SpatialDim, Frame > & | shift, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric | ||
) |
Compute inverse spacetime metric from inverse spatial metric, lapse and shift.
The inverse spacetime metric
where
void gr::inverse_spacetime_metric | ( | gsl::not_null< tnsr::AA< DataType, SpatialDim, Frame > * > | inverse_spacetime_metric, |
const Scalar< DataType > & | lapse, | ||
const tnsr::I< DataType, SpatialDim, Frame > & | shift, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric | ||
) |
Compute inverse spacetime metric from inverse spatial metric, lapse and shift.
The inverse spacetime metric
where
Scalar< DataType > gr::lapse | ( | const tnsr::I< DataType, SpatialDim, Frame > & | shift, |
const tnsr::aa< DataType, SpatialDim, Frame > & | spacetime_metric | ||
) |
Compute lapse from shift and spacetime metric.
Computes
where
void gr::lapse | ( | gsl::not_null< Scalar< DataType > * > | lapse, |
const tnsr::I< DataType, SpatialDim, Frame > & | shift, | ||
const tnsr::aa< DataType, SpatialDim, Frame > & | spacetime_metric | ||
) |
Compute lapse from shift and spacetime metric.
Computes
where
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
If
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
If
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
If
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
If
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
Computes
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
Computes
Tensor< DataType, Symmetry< 2, 1, 1 >, index_list< change_index_up_lo< Index0 >, Index1, Index1 > > raise_or_lower_first_index | ( | const Tensor< DataType, Symmetry< 2, 1, 1 >, index_list< Index0, Index1, Index1 > > & | tensor, |
const Tensor< DataType, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index0 >, change_index_up_lo< Index0 > > > & | metric | ||
) |
Raises or lowers the first index of a rank 3 tensor which is symmetric in the last two indices.
If
void raise_or_lower_first_index | ( | gsl::not_null< Tensor< DataType, Symmetry< 2, 1, 1 >, index_list< change_index_up_lo< Index0 >, Index1, Index1 > > * > | result, |
const Tensor< DataType, Symmetry< 2, 1, 1 >, index_list< Index0, Index1, Index1 > > & | tensor, | ||
const Tensor< DataType, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index0 >, change_index_up_lo< Index0 > > > & | metric | ||
) |
Raises or lowers the first index of a rank 3 tensor which is symmetric in the last two indices.
If
Tensor< DataTypeTensor, Symmetry< 1 >, index_list< change_index_up_lo< Index0 > > > raise_or_lower_index | ( | const Tensor< DataTypeTensor, Symmetry< 1 >, index_list< Index0 > > & | tensor, |
const Tensor< DataTypeMetric, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index0 >, change_index_up_lo< Index0 > > > & | metric | ||
) |
Raises or lowers the index of a rank 1 tensor.
If
void raise_or_lower_index | ( | gsl::not_null< Tensor< DataTypeTensor, Symmetry< 1 >, index_list< change_index_up_lo< Index0 > > > * > | result, |
const Tensor< DataTypeTensor, Symmetry< 1 >, index_list< Index0 > > & | tensor, | ||
const Tensor< DataTypeMetric, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index0 >, change_index_up_lo< Index0 > > > & | metric | ||
) |
Raises or lowers the index of a rank 1 tensor.
If
Scalar< DataType > gr::ricci_scalar | ( | const tnsr::aa< DataType, SpatialDim, Frame, Index > & | ricci_tensor, |
const tnsr::AA< DataType, SpatialDim, Frame, Index > & | inverse_metric | ||
) |
Computes the Ricci Scalar from the (spatial or spacetime) Ricci Tensor and inverse metrics.
Computes Ricci scalar using the inverse metric (spatial or spacetime) and Ricci tensor
void gr::ricci_scalar | ( | gsl::not_null< Scalar< DataType > * > | ricci_scalar_result, |
const tnsr::aa< DataType, SpatialDim, Frame, Index > & | ricci_tensor, | ||
const tnsr::AA< DataType, SpatialDim, Frame, Index > & | inverse_metric | ||
) |
Computes the Ricci Scalar from the (spatial or spacetime) Ricci Tensor and inverse metrics.
Computes Ricci scalar using the inverse metric (spatial or spacetime) and Ricci tensor
tnsr::aa< DataType, SpatialDim, Frame, Index > gr::ricci_tensor | ( | const tnsr::Abb< DataType, SpatialDim, Frame, Index > & | christoffel_2nd_kind, |
const tnsr::aBcc< DataType, SpatialDim, Frame, Index > & | d_christoffel_2nd_kind | ||
) |
Computes Ricci tensor from the (spatial or spacetime) Christoffel symbol of the second kind and its derivative.
Computes Ricci tensor
void gr::ricci_tensor | ( | gsl::not_null< tnsr::aa< DataType, SpatialDim, Frame, Index > * > | result, |
const tnsr::Abb< DataType, SpatialDim, Frame, Index > & | christoffel_2nd_kind, | ||
const tnsr::aBcc< DataType, SpatialDim, Frame, Index > & | d_christoffel_2nd_kind | ||
) |
Computes Ricci tensor from the (spatial or spacetime) Christoffel symbol of the second kind and its derivative.
Computes Ricci tensor
tnsr::aa< DataType, SpatialDim, Frame > gh::second_time_deriv_of_spacetime_metric | ( | const Scalar< DataType > & | lapse, |
const Scalar< DataType > & | dt_lapse, | ||
const tnsr::I< DataType, SpatialDim, Frame > & | shift, | ||
const tnsr::I< DataType, SpatialDim, Frame > & | dt_shift, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | dt_phi, | ||
const tnsr::aa< DataType, SpatialDim, Frame > & | pi, | ||
const tnsr::aa< DataType, SpatialDim, Frame > & | dt_pi | ||
) |
Computes the second time derivative of the spacetime metric from the generalized harmonic variables, lapse, shift, and the spacetime unit normal 1-form.
Let the generalized harmonic conjugate momentum and spatial derivative variables be
Using eq.(35) of [123] (with
As such, its second time derivative is simply the following:
void gh::second_time_deriv_of_spacetime_metric | ( | gsl::not_null< tnsr::aa< DataType, SpatialDim, Frame > * > | d2t2_spacetime_metric, |
const Scalar< DataType > & | lapse, | ||
const Scalar< DataType > & | dt_lapse, | ||
const tnsr::I< DataType, SpatialDim, Frame > & | shift, | ||
const tnsr::I< DataType, SpatialDim, Frame > & | dt_shift, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | dt_phi, | ||
const tnsr::aa< DataType, SpatialDim, Frame > & | pi, | ||
const tnsr::aa< DataType, SpatialDim, Frame > & | dt_pi | ||
) |
Computes the second time derivative of the spacetime metric from the generalized harmonic variables, lapse, shift, and the spacetime unit normal 1-form.
Let the generalized harmonic conjugate momentum and spatial derivative variables be
Using eq.(35) of [123] (with
As such, its second time derivative is simply the following:
tnsr::I< DataType, SpatialDim, Frame > gr::shift | ( | const tnsr::aa< DataType, SpatialDim, Frame > & | spacetime_metric, |
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric | ||
) |
Compute shift from spacetime metric and inverse spatial metric.
Computes
where
void gr::shift | ( | gsl::not_null< tnsr::I< DataType, SpatialDim, Frame > * > | shift, |
const tnsr::aa< DataType, SpatialDim, Frame > & | spacetime_metric, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric | ||
) |
Compute shift from spacetime metric and inverse spatial metric.
Computes
where
tnsr::a< DataType, SpatialDim, Frame > gh::spacetime_deriv_of_det_spatial_metric | ( | const Scalar< DataType > & | sqrt_det_spatial_metric, |
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | dt_spatial_metric, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi | ||
) |
Computes spacetime derivatives of the determinant of spatial metric, using the generalized harmonic variables, spatial metric, and its time derivative.
Using the relation
void gh::spacetime_deriv_of_det_spatial_metric | ( | gsl::not_null< tnsr::a< DataType, SpatialDim, Frame > * > | d4_det_spatial_metric, |
const Scalar< DataType > & | sqrt_det_spatial_metric, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | dt_spatial_metric, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi | ||
) |
Computes spacetime derivatives of the determinant of spatial metric, using the generalized harmonic variables, spatial metric, and its time derivative.
Using the relation
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 | ||
) |
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 | ||
) |
tnsr::a< DataType, SpatialDim, Frame > gh::spacetime_deriv_of_norm_of_shift | ( | const Scalar< DataType > & | lapse, |
const tnsr::I< DataType, SpatialDim, Frame > & | shift, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | spatial_metric, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric, | ||
const tnsr::AA< DataType, SpatialDim, Frame > & | inverse_spacetime_metric, | ||
const tnsr::A< DataType, SpatialDim, Frame > & | spacetime_unit_normal, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi, | ||
const tnsr::aa< DataType, SpatialDim, Frame > & | pi | ||
) |
Computes spacetime derivatives of the norm of the shift vector.
The same is computed as:
void gh::spacetime_deriv_of_norm_of_shift | ( | gsl::not_null< tnsr::a< DataType, SpatialDim, Frame > * > | d4_norm_of_shift, |
const Scalar< DataType > & | lapse, | ||
const tnsr::I< DataType, SpatialDim, Frame > & | shift, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | spatial_metric, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric, | ||
const tnsr::AA< DataType, SpatialDim, Frame > & | inverse_spacetime_metric, | ||
const tnsr::A< DataType, SpatialDim, Frame > & | spacetime_unit_normal, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi, | ||
const tnsr::aa< DataType, SpatialDim, Frame > & | pi | ||
) |
Computes spacetime derivatives of the norm of the shift vector.
The same is computed as:
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,
tnsr::aa< DataType, SpatialDim, Frame > gr::spacetime_metric | ( | const Scalar< DataType > & | lapse, |
const tnsr::I< DataType, SpatialDim, Frame > & | shift, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | spatial_metric | ||
) |
Computes the spacetime metric from the spatial metric, lapse, and shift.
The spacetime metric
where
void gr::spacetime_metric | ( | gsl::not_null< tnsr::aa< DataType, Dim, Frame > * > | spacetime_metric, |
const Scalar< DataType > & | lapse, | ||
const tnsr::I< DataType, Dim, Frame > & | shift, | ||
const tnsr::ii< DataType, Dim, Frame > & | spatial_metric | ||
) |
Computes the spacetime metric from the spatial metric, lapse, and shift.
The spacetime metric
where
tnsr::A< DataType, SpatialDim, Frame > gr::spacetime_normal_vector | ( | const Scalar< DataType > & | lapse, |
const tnsr::I< DataType, SpatialDim, Frame > & | shift | ||
) |
Computes spacetime normal vector from lapse and shift.
If
is computed.
void gr::spacetime_normal_vector | ( | gsl::not_null< tnsr::A< DataType, SpatialDim, Frame > * > | spacetime_normal_vector, |
const Scalar< DataType > & | lapse, | ||
const tnsr::I< DataType, SpatialDim, Frame > & | shift | ||
) |
Computes spacetime normal vector from lapse and shift.
If
is computed.
tnsr::i< DataType, SpatialDim, Frame > gh::spatial_deriv_of_lapse | ( | const Scalar< DataType > & | lapse, |
const tnsr::A< DataType, SpatialDim, Frame > & | spacetime_unit_normal, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi | ||
) |
Computes spatial derivatives of lapse (
If the generalized harmonic conjugate momentum and spatial derivative variables are
since
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 (
If the generalized harmonic conjugate momentum and spatial derivative variables are
since
tnsr::iJ< DataType, SpatialDim, Frame > gh::spatial_deriv_of_shift | ( | const Scalar< DataType > & | lapse, |
const tnsr::AA< DataType, SpatialDim, Frame > & | inverse_spacetime_metric, | ||
const tnsr::A< DataType, SpatialDim, Frame > & | spacetime_unit_normal, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi | ||
) |
Computes spatial derivatives of the shift vector from the generalized harmonic and geometric variables.
Spatial derivatives of the shift vector
where we used the equation from spatial_deriv_of_lapse() for
void gh::spatial_deriv_of_shift | ( | gsl::not_null< tnsr::iJ< DataType, SpatialDim, Frame > * > | deriv_shift, |
const Scalar< DataType > & | lapse, | ||
const tnsr::AA< DataType, SpatialDim, Frame > & | inverse_spacetime_metric, | ||
const tnsr::A< DataType, SpatialDim, Frame > & | spacetime_unit_normal, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi | ||
) |
Computes spatial derivatives of the shift vector from the generalized harmonic and geometric variables.
Spatial derivatives of the shift vector
where we used the equation from spatial_deriv_of_lapse() for
tnsr::ii< DataType, SpatialDim, Frame > gr::spatial_metric | ( | const tnsr::aa< DataType, SpatialDim, Frame > & | spacetime_metric | ) |
Compute spatial metric from spacetime metric.
Simply pull out the spatial components.
void gr::spatial_metric | ( | gsl::not_null< tnsr::ii< DataType, SpatialDim, Frame > * > | spatial_metric, |
const tnsr::aa< DataType, SpatialDim, Frame > & | spacetime_metric | ||
) |
Compute spatial metric from spacetime metric.
Simply pull out the spatial components.
tnsr::ii< DataType, VolumeDim, Frame > gh::spatial_ricci_tensor | ( | const tnsr::iaa< DataType, VolumeDim, Frame > & | phi, |
const tnsr::ijaa< DataType, VolumeDim, Frame > & | deriv_phi, | ||
const tnsr::II< DataType, VolumeDim, Frame > & | inverse_spatial_metric | ||
) |
Compute spatial Ricci tensor using evolved variables and their first derivatives.
Lets write the Christoffel symbols of the first kind as
substituting
Gathering all terms with second derivatives:
where we use the four-index constraint
Gathering everything together, we compute the spatial Ricci tensor as:
This follows from equations (2.13) - (2.20) of [105] .
Note that, in code, the mixed-index variables
void gh::spatial_ricci_tensor | ( | gsl::not_null< tnsr::ii< DataType, VolumeDim, Frame > * > | ricci, |
const tnsr::iaa< DataType, VolumeDim, Frame > & | phi, | ||
const tnsr::ijaa< DataType, VolumeDim, Frame > & | deriv_phi, | ||
const tnsr::II< DataType, VolumeDim, Frame > & | inverse_spatial_metric | ||
) |
Compute spatial Ricci tensor using evolved variables and their first derivatives.
Lets write the Christoffel symbols of the first kind as
substituting
Gathering all terms with second derivatives:
where we use the four-index constraint
Gathering everything together, we compute the spatial Ricci tensor as:
This follows from equations (2.13) - (2.20) of [105] .
Note that, in code, the mixed-index variables
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 (
Let the generalized harmonic conjugate momentum and spatial derivative variables be
where the simplification done for
Thus,
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 (
Let the generalized harmonic conjugate momentum and spatial derivative variables be
where the simplification done for
Thus,
tnsr::i< DataType, SpatialDim, Frame > gh::time_deriv_of_lower_shift | ( | const Scalar< DataType > & | lapse, |
const tnsr::I< DataType, SpatialDim, Frame > & | shift, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | spatial_metric, | ||
const tnsr::A< DataType, SpatialDim, Frame > & | spacetime_unit_normal, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi, | ||
const tnsr::aa< DataType, SpatialDim, Frame > & | pi | ||
) |
Computes time derivative of index lowered shift from generalized harmonic variables, spatial metric and its time derivative.
The time derivative of
where the first term is obtained from time_deriv_of_shift()
, and the latter is a user input.
void gh::time_deriv_of_lower_shift | ( | gsl::not_null< tnsr::i< DataType, SpatialDim, Frame > * > | dt_lower_shift, |
const Scalar< DataType > & | lapse, | ||
const tnsr::I< DataType, SpatialDim, Frame > & | shift, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | spatial_metric, | ||
const tnsr::A< DataType, SpatialDim, Frame > & | spacetime_unit_normal, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi, | ||
const tnsr::aa< DataType, SpatialDim, Frame > & | pi | ||
) |
Computes time derivative of index lowered shift from generalized harmonic variables, spatial metric and its time derivative.
The time derivative of
where the first term is obtained from time_deriv_of_shift()
, and the latter is a user input.
tnsr::I< DataType, SpatialDim, Frame > gh::time_deriv_of_shift | ( | const Scalar< DataType > & | lapse, |
const tnsr::I< DataType, SpatialDim, Frame > & | shift, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric, | ||
const tnsr::A< DataType, SpatialDim, Frame > & | spacetime_unit_normal, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi, | ||
const tnsr::aa< DataType, SpatialDim, Frame > & | pi | ||
) |
Computes time derivative of the shift vector from the generalized harmonic and geometric variables.
The time derivative of
void gh::time_deriv_of_shift | ( | gsl::not_null< tnsr::I< DataType, SpatialDim, Frame > * > | dt_shift, |
const Scalar< DataType > & | lapse, | ||
const tnsr::I< DataType, SpatialDim, Frame > & | shift, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric, | ||
const tnsr::A< DataType, SpatialDim, Frame > & | spacetime_unit_normal, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi, | ||
const tnsr::aa< DataType, SpatialDim, Frame > & | pi | ||
) |
Computes time derivative of the shift vector from the generalized harmonic and geometric variables.
The time derivative of
tnsr::ii< DataType, SpatialDim, Frame > gh::time_deriv_of_spatial_metric | ( | const Scalar< DataType > & | lapse, |
const tnsr::I< DataType, SpatialDim, Frame > & | shift, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi, | ||
const tnsr::aa< DataType, SpatialDim, Frame > & | pi | ||
) |
Computes time derivative of the spatial metric.
Let the generalized harmonic conjugate momentum and spatial derivative variables be
To compute the latter, we use the evolution equation for
void gh::time_deriv_of_spatial_metric | ( | gsl::not_null< tnsr::ii< DataType, SpatialDim, Frame > * > | dt_spatial_metric, |
const Scalar< DataType > & | lapse, | ||
const tnsr::I< DataType, SpatialDim, Frame > & | shift, | ||
const tnsr::iaa< DataType, SpatialDim, Frame > & | phi, | ||
const tnsr::aa< DataType, SpatialDim, Frame > & | pi | ||
) |
Computes time derivative of the spatial metric.
Let the generalized harmonic conjugate momentum and spatial derivative variables be
To compute the latter, we use the evolution equation for
tnsr::aa< DataType, SpatialDim, Frame > gr::time_derivative_of_spacetime_metric | ( | const Scalar< DataType > & | lapse, |
const Scalar< DataType > & | dt_lapse, | ||
const tnsr::I< DataType, SpatialDim, Frame > & | shift, | ||
const tnsr::I< DataType, SpatialDim, Frame > & | dt_shift, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | spatial_metric, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | dt_spatial_metric | ||
) |
Computes the time derivative of the spacetime metric from spatial metric, lapse, shift, and their time derivatives.
Computes the derivative as:
where
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
Computes the derivative as:
void gr::time_derivative_of_spacetime_metric | ( | gsl::not_null< tnsr::aa< DataType, SpatialDim, Frame > * > | dt_spacetime_metric, |
const Scalar< DataType > & | lapse, | ||
const Scalar< DataType > & | dt_lapse, | ||
const tnsr::I< DataType, SpatialDim, Frame > & | shift, | ||
const tnsr::I< DataType, SpatialDim, Frame > & | dt_shift, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | spatial_metric, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | dt_spatial_metric | ||
) |
Computes the time derivative of the spacetime metric from spatial metric, lapse, shift, and their time derivatives.
Computes the derivative as:
where
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
Computes the derivative as:
tnsr::ii< DataType, SpatialDim, Frame > gr::time_derivative_of_spatial_metric | ( | const Scalar< DataType > & | lapse, |
const tnsr::I< DataType, SpatialDim, Frame > & | shift, | ||
const tnsr::iJ< DataType, SpatialDim, Frame > & | deriv_shift, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | spatial_metric, | ||
const tnsr::ijj< DataType, SpatialDim, Frame > & | deriv_spatial_metric, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | extrinsic_curvature | ||
) |
Computes the time derivative of the spatial metric from extrinsic curvature, lapse, shift, and their time derivatives.
Computes the derivative as (see e.g. [13], Eq. (2.134)):
where
void gr::time_derivative_of_spatial_metric | ( | gsl::not_null< tnsr::ii< DataType, SpatialDim, Frame > * > | dt_spatial_metric, |
const Scalar< DataType > & | lapse, | ||
const tnsr::I< DataType, SpatialDim, Frame > & | shift, | ||
const tnsr::iJ< DataType, SpatialDim, Frame > & | deriv_shift, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | spatial_metric, | ||
const tnsr::ijj< DataType, SpatialDim, Frame > & | deriv_spatial_metric, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | extrinsic_curvature | ||
) |
Computes the time derivative of the spatial metric from extrinsic curvature, lapse, shift, and their time derivatives.
Computes the derivative as (see e.g. [13], Eq. (2.134)):
where
void transform::to_different_frame | ( | const gsl::not_null< Scalar< DataType > * > | dest, |
const Scalar< DataType > & | src, | ||
const Jacobian< DataType, VolumeDim, DestFrame, SrcFrame > & | jacobian, | ||
const InverseJacobian< DataType, VolumeDim, DestFrame, SrcFrame > & | inv_jacobian | ||
) |
Transforms a tensor to a different frame.
The tensor being transformed is always assumed to have density zero. In particular Scalar
is assumed to be invariant under transformations.
jacobian
argument is the derivative of the source coordinates with respect to the destination coordinates. void transform::to_different_frame | ( | const gsl::not_null< tnsr::I< DataType, VolumeDim, DestFrame > * > | dest, |
const tnsr::I< DataType, VolumeDim, SrcFrame > & | src, | ||
const Jacobian< DataType, VolumeDim, DestFrame, SrcFrame > & | jacobian, | ||
const InverseJacobian< DataType, VolumeDim, DestFrame, SrcFrame > & | inv_jacobian | ||
) |
Transforms a tensor to a different frame.
The tensor being transformed is always assumed to have density zero. In particular Scalar
is assumed to be invariant under transformations.
jacobian
argument is the derivative of the source coordinates with respect to the destination coordinates. void transform::to_different_frame | ( | const gsl::not_null< tnsr::ii< DataType, VolumeDim, DestFrame > * > | dest, |
const tnsr::ii< DataType, VolumeDim, SrcFrame > & | src, | ||
const Jacobian< DataType, VolumeDim, DestFrame, SrcFrame > & | jacobian | ||
) |
Transforms tensor to different frame.
The formula for transforming
where
Note that Jacobian<DestFrame,SrcFrame>
is the same type as InverseJacobian<SrcFrame,DestFrame>
and represents
auto transform::to_different_frame | ( | const tnsr::I< DataType, VolumeDim, SrcFrame > & | src, |
const Jacobian< DataType, VolumeDim, DestFrame, SrcFrame > & | jacobian, | ||
const InverseJacobian< DataType, VolumeDim, DestFrame, SrcFrame > & | inv_jacobian | ||
) | -> tnsr::I< DataType, VolumeDim, DestFrame > |
Transforms a tensor to a different frame.
The tensor being transformed is always assumed to have density zero. In particular Scalar
is assumed to be invariant under transformations.
jacobian
argument is the derivative of the source coordinates with respect to the destination coordinates. auto transform::to_different_frame | ( | const tnsr::ii< DataType, VolumeDim, SrcFrame > & | src, |
const Jacobian< DataType, VolumeDim, DestFrame, SrcFrame > & | jacobian | ||
) | -> tnsr::ii< DataType, VolumeDim, DestFrame > |
Transforms tensor to different frame.
The formula for transforming
where
Note that Jacobian<DestFrame,SrcFrame>
is the same type as InverseJacobian<SrcFrame,DestFrame>
and represents
auto transform::to_different_frame | ( | Scalar< DataType > | src, |
const Jacobian< DataType, VolumeDim, DestFrame, SrcFrame > & | jacobian, | ||
const InverseJacobian< DataType, VolumeDim, DestFrame, SrcFrame > & | inv_jacobian | ||
) | -> Scalar< DataType > |
Transforms a tensor to a different frame.
The tensor being transformed is always assumed to have density zero. In particular Scalar
is assumed to be invariant under transformations.
jacobian
argument is the derivative of the source coordinates with respect to the destination coordinates. Scalar< DataType > trace | ( | const Tensor< DataType, Symmetry< 1, 1 >, index_list< Index0, Index0 > > & | tensor, |
const Tensor< DataType, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index0 >, change_index_up_lo< Index0 > > > & | metric | ||
) |
Computes trace of a rank-2 symmetric tensor.
Computes
void trace | ( | gsl::not_null< Scalar< DataType > * > | trace, |
const Tensor< DataType, Symmetry< 1, 1 >, index_list< Index0, Index0 > > & | tensor, | ||
const Tensor< DataType, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index0 >, change_index_up_lo< Index0 > > > & | metric | ||
) |
Computes trace of a rank-2 symmetric tensor.
Computes
Tensor< DataType, Symmetry< 1 >, index_list< Index0 > > trace_last_indices | ( | const Tensor< DataType, Symmetry< 2, 1, 1 >, index_list< Index0, Index1, Index1 > > & | tensor, |
const Tensor< DataType, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index1 >, change_index_up_lo< Index1 > > > & | metric | ||
) |
Computes trace of a rank 3 tensor, which is symmetric in its last two indices, tracing the symmetric indices.
For example, if
void trace_last_indices | ( | gsl::not_null< Tensor< DataType, Symmetry< 1 >, index_list< Index0 > > * > | trace_of_tensor, |
const Tensor< DataType, Symmetry< 2, 1, 1 >, index_list< Index0, Index1, Index1 > > & | tensor, | ||
const Tensor< DataType, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index1 >, change_index_up_lo< Index1 > > > & | metric | ||
) |
Computes trace of a rank 3 tensor, which is symmetric in its last two indices, tracing the symmetric indices.
For example, if
tnsr::Ab< DataType, VolumeDim, Frame > gr::transverse_projection_operator | ( | const tnsr::A< DataType, VolumeDim, Frame > & | spacetime_normal_vector, |
const tnsr::a< DataType, VolumeDim, Frame > & | spacetime_normal_one_form, | ||
const tnsr::I< DataType, VolumeDim, Frame > & | interface_unit_normal_vector, | ||
const tnsr::i< DataType, VolumeDim, Frame > & | interface_unit_normal_one_form | ||
) |
Compute spacetime projection operator onto an interface.
Consider a
tnsr::aa< DataType, VolumeDim, Frame > gr::transverse_projection_operator | ( | const tnsr::aa< DataType, VolumeDim, Frame > & | spacetime_metric, |
const tnsr::a< DataType, VolumeDim, Frame > & | spacetime_normal_one_form, | ||
const tnsr::i< DataType, VolumeDim, Frame > & | interface_unit_normal_one_form | ||
) |
Compute spacetime projection operator onto an interface.
Consider a
tnsr::II< DataType, VolumeDim, Frame > gr::transverse_projection_operator | ( | const tnsr::II< DataType, VolumeDim, Frame > & | inverse_spatial_metric, |
const tnsr::I< DataType, VolumeDim, Frame > & | normal_vector | ||
) |
Compute projection operator onto an interface.
Returns the operator
void gr::transverse_projection_operator | ( | gsl::not_null< tnsr::AA< DataType, VolumeDim, Frame > * > | projection_tensor, |
const tnsr::AA< DataType, VolumeDim, Frame > & | inverse_spacetime_metric, | ||
const tnsr::A< DataType, VolumeDim, Frame > & | spacetime_normal_vector, | ||
const tnsr::I< DataType, VolumeDim, Frame > & | interface_unit_normal_vector | ||
) |
Compute spacetime projection operator onto an interface.
Consider a
void gr::transverse_projection_operator | ( | gsl::not_null< tnsr::Ab< DataType, VolumeDim, Frame > * > | projection_tensor, |
const tnsr::A< DataType, VolumeDim, Frame > & | spacetime_normal_vector, | ||
const tnsr::a< DataType, VolumeDim, Frame > & | spacetime_normal_one_form, | ||
const tnsr::I< DataType, VolumeDim, Frame > & | interface_unit_normal_vector, | ||
const tnsr::i< DataType, VolumeDim, Frame > & | interface_unit_normal_one_form | ||
) |
Compute spacetime projection operator onto an interface.
Consider a
void gr::transverse_projection_operator | ( | gsl::not_null< tnsr::ii< DataType, VolumeDim, Frame > * > | projection_tensor, |
const tnsr::ii< DataType, VolumeDim, Frame > & | spatial_metric, | ||
const tnsr::i< DataType, VolumeDim, Frame > & | normal_one_form | ||
) |
Compute projection operator onto an interface.
Returns the operator
Returns the operator
tnsr::ii< DataType, SpatialDim, Frame > gr::weyl_electric | ( | const tnsr::ii< DataType, SpatialDim, Frame > & | spatial_ricci, |
const tnsr::ii< DataType, SpatialDim, Frame > & | extrinsic_curvature, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric | ||
) |
Computes the electric part of the Weyl tensor in vacuum.
Computes the electric part of the Weyl tensor in vacuum
void gr::weyl_electric | ( | gsl::not_null< tnsr::ii< DataType, SpatialDim, Frame > * > | weyl_electric_part, |
const tnsr::ii< DataType, SpatialDim, Frame > & | spatial_ricci, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | extrinsic_curvature, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric | ||
) |
Computes the electric part of the Weyl tensor in vacuum.
Computes the electric part of the Weyl tensor in vacuum
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
Computes the scalar
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
Computes the scalar
tnsr::ii< DataType, 3, Frame > gr::weyl_magnetic | ( | const tnsr::ijj< DataType, 3, Frame > & | grad_extrinsic_curvature, |
const tnsr::ii< DataType, 3, Frame > & | spatial_metric, | ||
const Scalar< DataType > & | sqrt_det_spatial_metric | ||
) |
Computes the magnetic part of the Weyl tensor.
Computes the magnetic part of the Weyl tensor
where
void gr::weyl_magnetic | ( | gsl::not_null< tnsr::ii< DataType, 3, Frame > * > | weyl_magnetic_part, |
const tnsr::ijj< DataType, 3, Frame > & | grad_extrinsic_curvature, | ||
const tnsr::ii< DataType, 3, Frame > & | spatial_metric, | ||
const Scalar< DataType > & | sqrt_det_spatial_metric | ||
) |
Computes the magnetic part of the Weyl tensor.
Computes the magnetic part of the Weyl tensor
where
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
Computes the scalar
gr::weyl_magnetic()
. The magnetic part of the Weyl tensor needs additional terms for matter. void gr::weyl_magnetic_scalar | ( | gsl::not_null< Scalar< DataType > * > | weyl_magnetic_scalar_result, |
const tnsr::ii< DataType, 3, Frame > & | weyl_magnetic, | ||
const tnsr::II< DataType, 3, Frame > & | inverse_spatial_metric | ||
) |
Computes the scalar
Computes the scalar
gr::weyl_magnetic()
. The magnetic part of the Weyl tensor needs additional terms for matter. tnsr::ii< DataType, SpatialDim, Frame > gr::weyl_propagating | ( | const tnsr::ii< DataType, SpatialDim, Frame > & | ricci, |
const tnsr::ii< DataType, SpatialDim, Frame > & | extrinsic_curvature, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric, | ||
const tnsr::ijj< DataType, SpatialDim, Frame > & | cov_deriv_extrinsic_curvature, | ||
const tnsr::I< DataType, SpatialDim, Frame > & | unit_interface_normal_vector, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | projection_IJ, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | projection_ij, | ||
const tnsr::Ij< DataType, SpatialDim, Frame > & | projection_Ij, | ||
double | sign | ||
) |
Computes the propagating modes of the Weyl tensor.
The Weyl tensor evolution system in vacuum has six characteristic fields, of which two (
where
void gr::weyl_propagating | ( | gsl::not_null< tnsr::ii< DataType, SpatialDim, Frame > * > | weyl_prop_u8, |
const tnsr::ii< DataType, SpatialDim, Frame > & | ricci, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | extrinsic_curvature, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric, | ||
const tnsr::ijj< DataType, SpatialDim, Frame > & | cov_deriv_extrinsic_curvature, | ||
const tnsr::I< DataType, SpatialDim, Frame > & | unit_interface_normal_vector, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | projection_IJ, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | projection_ij, | ||
const tnsr::Ij< DataType, SpatialDim, Frame > & | projection_Ij, | ||
double | sign | ||
) |
Computes the propagating modes of the Weyl tensor.
The Weyl tensor evolution system in vacuum has six characteristic fields, of which two (
where
tnsr::ii< DataType, SpatialDim, Frame > gr::weyl_type_D1 | ( | const tnsr::ii< DataType, SpatialDim, Frame > & | weyl_electric, |
const tnsr::ii< DataType, SpatialDim, Frame > & | spatial_metric, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric | ||
) |
Computes a quantity measuring how far from type D spacetime is.
Computes a quantity measuring how far from type D spacetime is, using measure D1 [Eq. (8) of [19]]:
where
void gr::weyl_type_D1 | ( | gsl::not_null< tnsr::ii< DataType, SpatialDim, Frame > * > | weyl_type_D1, |
const tnsr::ii< DataType, SpatialDim, Frame > & | weyl_electric, | ||
const tnsr::ii< DataType, SpatialDim, Frame > & | spatial_metric, | ||
const tnsr::II< DataType, SpatialDim, Frame > & | inverse_spatial_metric | ||
) |
Computes a quantity measuring how far from type D spacetime is.
Computes a quantity measuring how far from type D spacetime is, using measure D1 [Eq. (8) of [19]]:
where
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
Computes the scalar
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
Computes the scalar