SpECTRE  v2025.03.17
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Special Relativity

Contains functions used in special relativity calculations. More...

Namespaces

namespace  sr
 Holds functions related to special relativity.
 
template<size_t SpatialDim>
tnsr::Ab< double, SpatialDim, Frame::NoFramesr::lorentz_boost_matrix (const tnsr::I< double, SpatialDim, Frame::NoFrame > &velocity)
 Computes the matrix for a Lorentz boost from a single velocity vector (i.e., not a velocity field). More...
 
template<size_t SpatialDim>
void sr::lorentz_boost_matrix (gsl::not_null< tnsr::Ab< double, SpatialDim, Frame::NoFrame > * > boost_matrix, const tnsr::I< double, SpatialDim, Frame::NoFrame > &velocity)
 Computes the matrix for a Lorentz boost from a single velocity vector (i.e., not a velocity field). More...
 
template<size_t SpatialDim>
tnsr::Ab< double, SpatialDim, Frame::NoFramesr::lorentz_boost_matrix (const std::array< double, SpatialDim > &velocity)
 Computes the matrix for a Lorentz boost from a single velocity vector (i.e., not a velocity field). More...
 
template<typename DataType , size_t SpatialDim, typename Frame >
void sr::lorentz_boost (gsl::not_null< tnsr::I< DataType, SpatialDim, Frame > * > result, const tnsr::I< DataType, SpatialDim, Frame > &vector, double vector_component_0, const std::array< double, SpatialDim > &velocity)
 Apply a Lorentz boost to the spatial part of a vector. More...
 
template<typename DataType , size_t SpatialDim, typename Frame >
void sr::lorentz_boost (gsl::not_null< tnsr::a< DataType, SpatialDim, Frame > * > result, const tnsr::a< DataType, SpatialDim, Frame > &one_form, const std::array< double, SpatialDim > &velocity)
 Apply a Lorentz boost to a one form. More...
 

Detailed Description

Contains functions used in special relativity calculations.

Function Documentation

◆ lorentz_boost() [1/2]

template<typename DataType , size_t SpatialDim, typename Frame >
void sr::lorentz_boost ( gsl::not_null< tnsr::ab< DataType, SpatialDim, Frame > * >  result,
const tnsr::ab< DataType, SpatialDim, Frame > &  tensor,
const std::array< double, SpatialDim > &  velocity 
)

Apply a Lorentz boost to a one form.

Apply a Lorentz boost to each component of a rank-2 tensor with lower or covariant indices.

Note
In the future we might want to write a single function capable to boost a tensor of arbitrary rank.

◆ lorentz_boost() [2/2]

template<typename DataType , size_t SpatialDim, typename Frame >
void sr::lorentz_boost ( gsl::not_null< tnsr::I< DataType, SpatialDim, Frame > * >  result,
const tnsr::I< DataType, SpatialDim, Frame > &  vector,
double  vector_component_0,
const std::array< double, SpatialDim > &  velocity 
)

Apply a Lorentz boost to the spatial part of a vector.

Details

This requires passing the 0th component of the vector as an additional argument.

◆ lorentz_boost_matrix() [1/3]

template<size_t SpatialDim>
tnsr::Ab< double, SpatialDim, Frame::NoFrame > sr::lorentz_boost_matrix ( const std::array< double, SpatialDim > &  velocity)

Computes the matrix for a Lorentz boost from a single velocity vector (i.e., not a velocity field).

Details

Given a spatial velocity vector vi (with c=1), compute the matrix Λaa¯ for a Lorentz boost with that velocity [e.g. Eq. (2.38) of ]:

(1)Λtt¯=γ,(2)Λti¯=Λit¯=γvi,(3)Λij¯=Λji¯=[(γ1)/v2]vivj+δij.

Here v=δijvivj, γ=1/1v2, and δij is the Kronecker delta. Note that this matrix boosts a one-form from the unbarred to the barred frame, and its inverse (obtained via vv) boosts a vector from the barred to the unbarred frame.

Note that while the Lorentz boost matrix is symmetric, the returned boost matrix is of type tnsr::Ab, because Tensor does not support symmetric tensors unless both indices have the same valence.

◆ lorentz_boost_matrix() [2/3]

template<size_t SpatialDim>
tnsr::Ab< double, SpatialDim, Frame::NoFrame > sr::lorentz_boost_matrix ( const tnsr::I< double, SpatialDim, Frame::NoFrame > &  velocity)

Computes the matrix for a Lorentz boost from a single velocity vector (i.e., not a velocity field).

Details

Given a spatial velocity vector vi (with c=1), compute the matrix Λaa¯ for a Lorentz boost with that velocity [e.g. Eq. (2.38) of ]:

(4)Λtt¯=γ,(5)Λti¯=Λit¯=γvi,(6)Λij¯=Λji¯=[(γ1)/v2]vivj+δij.

Here v=δijvivj, γ=1/1v2, and δij is the Kronecker delta. Note that this matrix boosts a one-form from the unbarred to the barred frame, and its inverse (obtained via vv) boosts a vector from the barred to the unbarred frame.

Note that while the Lorentz boost matrix is symmetric, the returned boost matrix is of type tnsr::Ab, because Tensor does not support symmetric tensors unless both indices have the same valence.

◆ lorentz_boost_matrix() [3/3]

template<size_t SpatialDim>
void sr::lorentz_boost_matrix ( gsl::not_null< tnsr::Ab< double, SpatialDim, Frame::NoFrame > * >  boost_matrix,
const tnsr::I< double, SpatialDim, Frame::NoFrame > &  velocity 
)

Computes the matrix for a Lorentz boost from a single velocity vector (i.e., not a velocity field).

Details

Given a spatial velocity vector vi (with c=1), compute the matrix Λaa¯ for a Lorentz boost with that velocity [e.g. Eq. (2.38) of ]:

(7)Λtt¯=γ,(8)Λti¯=Λit¯=γvi,(9)Λij¯=Λji¯=[(γ1)/v2]vivj+δij.

Here v=δijvivj, γ=1/1v2, and δij is the Kronecker delta. Note that this matrix boosts a one-form from the unbarred to the barred frame, and its inverse (obtained via vv) boosts a vector from the barred to the unbarred frame.

Note that while the Lorentz boost matrix is symmetric, the returned boost matrix is of type tnsr::Ab, because Tensor does not support symmetric tensors unless both indices have the same valence.