SpECTRE  v2024.06.05
gr Namespace Reference

Holds functions related to general relativity. More...

Namespaces

namespace  AnalyticData
 Classes which implement analytic data for general relativity.
 
namespace  Solutions
 Classes which implement analytic solutions to Einstein's equations.
 

Classes

struct  AnalyticDataBase
 Base struct for properties common to all GR analytic data classes. More...
 
struct  AnalyticSolution
 Base struct for properties common to all GR analytic solutions. More...
 
class  KerrSchildCoords
 Contains helper functions for transforming tensors in Kerr spacetime to Kerr-Schild coordinates. More...
 

Typedefs

template<size_t Dim, typename DataType >
using tags_for_hydro = tmpl::list< gr::Tags::Lapse< DataType >, gr::Tags::Shift< DataType, Dim >, gr::Tags::SpatialMetric< DataType, Dim >, gr::Tags::InverseSpatialMetric< DataType, Dim >, gr::Tags::SqrtDetSpatialMetric< DataType >, ::Tags::deriv< gr::Tags::Lapse< DataType >, tmpl::size_t< Dim >, Frame::Inertial >, ::Tags::deriv< gr::Tags::Shift< DataType, Dim >, tmpl::size_t< Dim >, Frame::Inertial >, ::Tags::deriv< gr::Tags::SpatialMetric< DataType, Dim >, tmpl::size_t< Dim >, Frame::Inertial >, gr::Tags::ExtrinsicCurvature< DataType, Dim > >
 GR Tags commonly needed for the evolution of hydro systems.
 
template<size_t Dim, typename DataType >
using analytic_solution_tags = tmpl::list< gr::Tags::Lapse< DataType >, ::Tags::dt< gr::Tags::Lapse< DataType > >, ::Tags::deriv< gr::Tags::Lapse< DataType >, tmpl::size_t< Dim >, Frame::Inertial >, gr::Tags::Shift< DataType, Dim >, ::Tags::dt< gr::Tags::Shift< DataType, Dim > >, ::Tags::deriv< gr::Tags::Shift< DataType, Dim >, tmpl::size_t< Dim >, Frame::Inertial >, gr::Tags::SpatialMetric< DataType, Dim >, ::Tags::dt< gr::Tags::SpatialMetric< DataType, Dim > >, ::Tags::deriv< gr::Tags::SpatialMetric< DataType, Dim >, tmpl::size_t< Dim >, Frame::Inertial >, gr::Tags::SqrtDetSpatialMetric< DataType >, gr::Tags::ExtrinsicCurvature< DataType, Dim >, gr::Tags::InverseSpatialMetric< DataType, Dim > >
 The tags for the variables returned by GR analytic solutions.
 

Functions

template<typename DataType , size_t VolumeDim, typename Frame >
tnsr::A< DataType, VolumeDim, Frame > interface_null_normal (const tnsr::A< DataType, VolumeDim, Frame > &spacetime_normal_vector, const tnsr::I< DataType, VolumeDim, Frame > &interface_unit_normal_vector, const double sign)
 Compute null normal vector to the boundary of a closed region in a spatial slice of spacetime. More...
 
bool operator!= (const KerrSchildCoords &lhs, const KerrSchildCoords &rhs)
 
template<typename DataType , size_t VolumeDim, typename Frame >
tnsr::ii< DataType, VolumeDim, Frame > transverse_projection_operator (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::Ij< DataType, VolumeDim, Frame > transverse_projection_operator (const tnsr::I< DataType, VolumeDim, Frame > &normal_vector, 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 > transverse_projection_operator (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<size_t SpatialDim, typename Frame , IndexType Index, typename DataType >
void 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, Indexchristoffel_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 christoffel_second_kind (const 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 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 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 > 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 deriv_inverse_spatial_metric (const 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 > 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 > 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 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 Dim>
void geodesic_acceleration (gsl::not_null< tnsr::I< DataType, Dim > * > acceleration, const tnsr::I< DataType, Dim > &velocity, const tnsr::Abb< DataType, Dim > &christoffel_second_kind)
 Computes the coordinate geodesic acceleration in the inertial frame. More...
 
template<typename DataType , size_t Dim>
tnsr::I< DataType, Dim > geodesic_acceleration (const tnsr::I< DataType, Dim > &velocity, const tnsr::Abb< DataType, Dim > &christoffel_second_kind)
 Computes the coordinate geodesic acceleration in the inertial frame. More...
 
template<typename DataType , size_t VolumeDim, typename Frame >
tnsr::a< DataType, VolumeDim, Frame > interface_null_normal (const tnsr::a< DataType, VolumeDim, Frame > &spacetime_normal_one_form, const tnsr::i< DataType, VolumeDim, Frame > &interface_unit_normal_one_form, const 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 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, const 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 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 > 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 > 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 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 > 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 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 > 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 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 > 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 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 psi_4 (const gsl::not_null< Scalar< ComplexDataVector > * > psi_4_result, const tnsr::ii< DataVector, 3, Frame > &spatial_ricci, const tnsr::ii< DataVector, 3, Frame > &extrinsic_curvature, const tnsr::ijj< DataVector, 3, Frame > &cov_deriv_extrinsic_curvature, const tnsr::ii< DataVector, 3, Frame > &spatial_metric, const tnsr::II< DataVector, 3, Frame > &inverse_spatial_metric, const tnsr::I< DataVector, 3, Frame > &inertial_coords)
 Computes Newman Penrose quantity \(\Psi_4\) using the characteristic field U \(^{8+}\) and complex vector \(\bar{m}^i\). More...
 
template<typename Frame >
Scalar< ComplexDataVectorpsi_4 (const tnsr::ii< DataVector, 3, Frame > &spatial_ricci, const tnsr::ii< DataVector, 3, Frame > &extrinsic_curvature, const tnsr::ijj< DataVector, 3, Frame > &cov_deriv_extrinsic_curvature, const tnsr::ii< DataVector, 3, Frame > &spatial_metric, const tnsr::II< DataVector, 3, Frame > &inverse_spatial_metric, const tnsr::I< DataVector, 3, Frame > &inertial_coords)
 Computes Newman Penrose quantity \(\Psi_4\) using the characteristic field U \(^{8+}\) and complex vector \(\bar{m}^i\). More...
 
template<typename Frame >
void psi_4_real (const gsl::not_null< Scalar< DataVector > * > psi_4_real_result, const tnsr::ii< DataVector, 3, Frame > &spatial_ricci, const tnsr::ii< DataVector, 3, Frame > &extrinsic_curvature, const tnsr::ijj< DataVector, 3, Frame > &cov_deriv_extrinsic_curvature, const tnsr::ii< DataVector, 3, Frame > &spatial_metric, const tnsr::II< DataVector, 3, Frame > &inverse_spatial_metric, const tnsr::I< DataVector, 3, Frame > &inertial_coords)
 Computes the real part of the Newman Penrose quantity \(\Psi_4\) using \(\Psi_4[Real] = -0.5*U^{8+}_{ij}*(x^ix^j - y^iy^j)\).
 
template<typename Frame >
Scalar< DataVectorpsi_4_real (const tnsr::ii< DataVector, 3, Frame > &spatial_ricci, const tnsr::ii< DataVector, 3, Frame > &extrinsic_curvature, const tnsr::ijj< DataVector, 3, Frame > &cov_deriv_extrinsic_curvature, const tnsr::ii< DataVector, 3, Frame > &spatial_metric, const tnsr::II< DataVector, 3, Frame > &inverse_spatial_metric, const tnsr::I< DataVector, 3, Frame > &inertial_coords)
 Computes the real part of the Newman Penrose quantity \(\Psi_4\) using \(\Psi_4[Real] = -0.5*U^{8+}_{ij}*(x^ix^j - y^iy^j)\).
 
template<size_t SpatialDim, typename Frame , IndexType Index, typename DataType >
void 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, Indexricci_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 ricci_scalar (const 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 > 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 > 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 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 spacetime_deriv_of_goth_g (gsl::not_null< tnsr::aBB< DataType, SpatialDim, Frame > * > da_goth_g, const tnsr::AA< DataType, SpatialDim, Frame > &inverse_spacetime_metric, const tnsr::abb< DataType, SpatialDim, Frame > &da_spacetime_metric, const Scalar< DataType > &lapse, const tnsr::a< DataType, SpatialDim, Frame > &da_lapse, const Scalar< DataType > &sqrt_det_spatial_metric, const tnsr::a< DataType, SpatialDim, Frame > &da_det_spatial_metric)
 Computes spacetime derivative of \( \mathfrak{g}^{ab}\equiv (-g)^{1/2} g^{ab} \). More...
 
template<typename DataType , size_t SpatialDim, typename Frame >
tnsr::aBB< DataType, SpatialDim, Frame > spacetime_deriv_of_goth_g (const tnsr::AA< DataType, SpatialDim, Frame > &inverse_spacetime_metric, const tnsr::abb< DataType, SpatialDim, Frame > &da_spacetime_metric, const Scalar< DataType > &lapse, const tnsr::a< DataType, SpatialDim, Frame > &da_lapse, const Scalar< DataType > &sqrt_det_spatial_metric, const tnsr::a< DataType, SpatialDim, Frame > &da_det_spatial_metric)
 Computes spacetime derivative of \( \mathfrak{g}^{ab}\equiv (-g)^{1/2} g^{ab} \). More...
 
template<typename DataType , size_t Dim, typename Frame >
void 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 > 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 >
void spacetime_normal_one_form (gsl::not_null< tnsr::a< DataType, SpatialDim, Frame > * > normal_one_form, const Scalar< DataType > &lapse)
 Computes spacetime normal one-form from lapse. More...
 
template<typename DataType , size_t SpatialDim, typename Frame >
tnsr::a< DataType, SpatialDim, Frame > spacetime_normal_one_form (const Scalar< DataType > &lapse)
 Computes spacetime normal one-form from lapse. More...
 
template<typename DataType , size_t SpatialDim, typename Frame >
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 >
void 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 > 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 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 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 > 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 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 > 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 > 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 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 > weyl_electric_scalar (const tnsr::ii< DataType, SpatialDim, Frame > &weyl_electric, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric)
 Computes the scalar \(E_{ij} E^{ij}\) from the electric part of the Weyl tensor \(E_{ij}\). More...
 
template<typename DataType , size_t SpatialDim, typename Frame >
void weyl_electric_scalar (gsl::not_null< Scalar< DataType > * > weyl_electric_scalar_result, const tnsr::ii< DataType, SpatialDim, Frame > &weyl_electric, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric)
 Computes the scalar \(E_{ij} E^{ij}\) from the electric part of the Weyl tensor \(E_{ij}\). More...
 
template<typename Frame , typename DataType >
tnsr::ii< DataType, 3, Frame > 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 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 > weyl_magnetic_scalar (const tnsr::ii< DataType, 3, Frame > &weyl_magnetic, const tnsr::II< DataType, 3, Frame > &inverse_spatial_metric)
 Computes the scalar \(B_{ij} B^{ij}\) from the magnetic part of the Weyl tensor \(B_{ij}\). More...
 
template<typename Frame , typename DataType >
void weyl_magnetic_scalar (gsl::not_null< Scalar< DataType > * > weyl_magnetic_scalar_result, const tnsr::ii< DataType, 3, Frame > &weyl_magnetic, const tnsr::II< DataType, 3, Frame > &inverse_spatial_metric)
 Computes the scalar \(B_{ij} B^{ij}\) from the magnetic part of the Weyl tensor \(B_{ij}\). More...
 
template<typename DataType , size_t SpatialDim, typename Frame >
tnsr::ii< DataType, SpatialDim, Frame > 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, const double sign)
 Computes the propagating modes of the Weyl tensor. More...
 
template<typename DataType , size_t SpatialDim, typename Frame >
void 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, const double sign)
 Computes the propagating modes of the Weyl tensor. More...
 
template<typename DataType , size_t SpatialDim, typename Frame >
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 weyl_type_D1 (const 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 weyl_type_D1_scalar (const gsl::not_null< Scalar< DataType > * > weyl_type_D1_scalar_result, const tnsr::ii< DataType, SpatialDim, Frame > &weyl_type_D1, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric)
 Computes the scalar \(D_{ij} D^{ij}\) , a measure of a spacetime's devitation from type D. More...
 
template<typename DataType , size_t SpatialDim, typename Frame >
Scalar< DataType > weyl_type_D1_scalar (const tnsr::ii< DataType, SpatialDim, Frame > &weyl_type_D1, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric)
 Computes the scalar \(D_{ij} D^{ij}\) , a measure of a spacetime's devitation from type D. More...
 

Detailed Description

Holds functions related to general relativity.

Function Documentation

◆ geodesic_acceleration() [1/2]

template<typename DataType , size_t Dim>
tnsr::I< DataType, Dim > gr::geodesic_acceleration ( const tnsr::I< DataType, Dim > &  velocity,
const tnsr::Abb< DataType, Dim > &  christoffel_second_kind 
)

Computes the coordinate geodesic acceleration in the inertial frame.

Details

The geodesic acceleration in coordinate form is given by

\begin{equation} \frac{d^2 x^i}{d t^2} = (v^i \Gamma^0_{00} - \Gamma^i_{00} ) + 2 v^j (v^i \Gamma^0_{j0} - \Gamma^i_{j0} ) + v^j v^k (v^i \Gamma^0_{jk} - \Gamma^i_{jk} ), \end{equation}

where \(v^i\) is the coordinate velocity, \(\Gamma^\mu_{\nu \rho}\) are the spacetime Christoffel symbols of the second kind, and all latin indices are spatial.

◆ geodesic_acceleration() [2/2]

template<typename DataType , size_t Dim>
void gr::geodesic_acceleration ( gsl::not_null< tnsr::I< DataType, Dim > * >  acceleration,
const tnsr::I< DataType, Dim > &  velocity,
const tnsr::Abb< DataType, Dim > &  christoffel_second_kind 
)

Computes the coordinate geodesic acceleration in the inertial frame.

Details

The geodesic acceleration in coordinate form is given by

\begin{equation} \frac{d^2 x^i}{d t^2} = (v^i \Gamma^0_{00} - \Gamma^i_{00} ) + 2 v^j (v^i \Gamma^0_{j0} - \Gamma^i_{j0} ) + v^j v^k (v^i \Gamma^0_{jk} - \Gamma^i_{jk} ), \end{equation}

where \(v^i\) is the coordinate velocity, \(\Gamma^\mu_{\nu \rho}\) are the spacetime Christoffel symbols of the second kind, and all latin indices are spatial.

◆ interface_null_normal()

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_vector,
const tnsr::I< DataType, VolumeDim, Frame > &  interface_unit_normal_vector,
const double  sign 
)

Compute null normal vector to the boundary of a closed region in a spatial slice of spacetime.

Details

Consider an \(n-1\)-dimensional boundary \(S\) of a closed region in an \(n\)-dimensional spatial hypersurface \(\Sigma\). Let \(s^a\) be the unit spacelike vector orthogonal to \(S\) in \(\Sigma\), and \(n^a\) be the timelike unit vector orthogonal to \(\Sigma\). This function returns the null vector that is outgoing/ingoing on \(S\):

\begin{align*} k^a = \frac{1}{\sqrt{2}}\left(n^a \pm s^a\right). \end{align*}

◆ spacetime_normal_one_form() [1/2]

template<typename DataType , size_t SpatialDim, typename Frame >
tnsr::a< DataType, SpatialDim, Frame > gr::spacetime_normal_one_form ( const Scalar< DataType > &  lapse)

Computes spacetime normal one-form from lapse.

Details

If \(\alpha\) is the lapse, then

\begin{align} n_t &= - \alpha \\ n_i &= 0 \end{align}

is computed.

◆ spacetime_normal_one_form() [2/2]

template<typename DataType , size_t SpatialDim, typename Frame >
void gr::spacetime_normal_one_form ( gsl::not_null< tnsr::a< DataType, SpatialDim, Frame > * >  normal_one_form,
const Scalar< DataType > &  lapse 
)

Computes spacetime normal one-form from lapse.

Details

If \(\alpha\) is the lapse, then

\begin{align} n_t &= - \alpha \\ n_i &= 0 \end{align}

is computed.

◆ transverse_projection_operator() [1/3]

template<typename DataType , size_t VolumeDim, typename Frame >
tnsr::AA< DataType, VolumeDim, Frame > gr::transverse_projection_operator ( const tnsr::AA< DataType, VolumeDim, Frame > &  inverse_spacetime_metric,
const tnsr::A< DataType, VolumeDim, Frame > &  spacetime_normal_vector,
const tnsr::I< DataType, VolumeDim, Frame > &  interface_unit_normal_vector 
)

Compute spacetime projection operator onto an interface.

Details

Consider a \(d-1\)-dimensional surface \(S\) in a \(d\)-dimensional spatial hypersurface \(\Sigma\). Let \(s^a\) be the unit spacelike vector orthogonal to \(S\) in \(\Sigma\), and \(n^a\) be the timelike unit vector orthogonal to \(\Sigma\). This function returns the projection operator onto \(S\) for \(d+1\) dimensional quantities:

\begin{align*} P^{ab} = g^{ab} + n^a n^b - s^a s^b = \gamma_{ab} - s_a s_b. \end{align*}

◆ transverse_projection_operator() [2/3]

template<typename DataType , size_t VolumeDim, typename Frame >
tnsr::Ij< DataType, VolumeDim, Frame > gr::transverse_projection_operator ( const tnsr::I< DataType, VolumeDim, Frame > &  normal_vector,
const tnsr::i< DataType, VolumeDim, Frame > &  normal_one_form 
)

Compute projection operator onto an interface.

Details

Returns the operator \(P^{i}_{j} = \delta^{i}_{j} - n^i n_j\), where \(n^i\) and \(n_i\) are the normal vector and normal one-form to the interface in question.

◆ transverse_projection_operator() [3/3]

template<typename DataType , size_t VolumeDim, typename Frame >
tnsr::ii< DataType, VolumeDim, Frame > gr::transverse_projection_operator ( const tnsr::ii< DataType, VolumeDim, Frame > &  spatial_metric,
const tnsr::i< DataType, VolumeDim, Frame > &  normal_one_form 
)

Compute projection operator onto an interface.

Details

Returns the operator \(P_{ij} = \gamma_{ij} - n_i n_j\), where \( \gamma_{ij}\) is the spatial metric, and \( n_i\) is the normal one-form to the interface in question.