SpECTRE  v2024.09.29
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
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 = implementation defined
 GR Tags commonly needed for the evolution of hydro systems.
 
template<size_t Dim, typename DataType >
using analytic_solution_tags = implementation defined
 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, 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 (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 (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, 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, 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 (gsl::not_null< Scalar< ComplexDataVector > * > psi_4_result, const tnsr::ii< DataVector, 3, Frame > &spatial_ricci, const tnsr::ii< DataVector, 3, Frame > &extrinsic_curvature, const tnsr::ijj< DataVector, 3, Frame > &cov_deriv_extrinsic_curvature, const tnsr::ii< DataVector, 3, Frame > &spatial_metric, const tnsr::II< DataVector, 3, Frame > &inverse_spatial_metric, const tnsr::I< DataVector, 3, Frame > &inertial_coords)
 Computes Newman Penrose quantity Ψ4 using the characteristic field U 8+ and complex vector m¯i. More...
 
template<typename Frame >
Scalar< 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 Ψ4 using the characteristic field U 8+ and complex vector m¯i. More...
 
template<typename Frame >
void psi_4_real (gsl::not_null< Scalar< DataVector > * > psi_4_real_result, const tnsr::ii< DataVector, 3, Frame > &spatial_ricci, const tnsr::ii< DataVector, 3, Frame > &extrinsic_curvature, const tnsr::ijj< DataVector, 3, Frame > &cov_deriv_extrinsic_curvature, const tnsr::ii< DataVector, 3, Frame > &spatial_metric, const tnsr::II< DataVector, 3, Frame > &inverse_spatial_metric, const tnsr::I< DataVector, 3, Frame > &inertial_coords)
 Computes the real part of the Newman Penrose quantity Ψ4 using Ψ4[Real]=0.5Uij8+(xixjyiyj).
 
template<typename Frame >
Scalar< 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 Ψ4 using Ψ4[Real]=0.5Uij8+(xixjyiyj).
 
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 (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 gab(g)1/2gab. 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 gab(g)1/2gab. 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 EijEij from the electric part of the Weyl tensor Eij. 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 EijEij from the electric part of the Weyl tensor Eij. 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 BijBij from the magnetic part of the Weyl tensor Bij. 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 BijBij from the magnetic part of the Weyl tensor Bij. 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, 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, 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 (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 (gsl::not_null< Scalar< DataType > * > weyl_type_D1_scalar_result, const tnsr::ii< DataType, SpatialDim, Frame > &weyl_type_D1, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric)
 Computes the scalar DijDij , a measure of a spacetime's devitation from type D. More...
 
template<typename DataType , size_t SpatialDim, typename Frame >
Scalar< DataType > weyl_type_D1_scalar (const tnsr::ii< DataType, SpatialDim, Frame > &weyl_type_D1, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric)
 Computes the scalar DijDij , a measure of a spacetime's devitation from type D. More...
 

Detailed Description

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

(1)d2xidt2=(viΓ000Γ00i)+2vj(viΓj00Γj0i)+vjvk(viΓjk0Γjki),

where vi is the coordinate velocity, Γνρμ 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

(2)d2xidt2=(viΓ000Γ00i)+2vj(viΓj00Γj0i)+vjvk(viΓjk0Γjki),

where vi is the coordinate velocity, Γνρμ 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,
double  sign 
)

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

Details

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

ka=12(na±sa).

◆ 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 α is the lapse, then

(3)nt=α(4)ni=0

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 α is the lapse, then

(5)nt=α(6)ni=0

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

Pab=gab+nanbsasb=γabsasb.

◆ transverse_projection_operator() [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 Pji=δjininj, where ni and ni 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 Pij=γijninj, where γij is the spatial metric, and ni is the normal one-form to the interface in question.