SpECTRE  v2024.06.18
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 \(v^i\) (with \(c=1\)), compute the matrix \(\Lambda^{a}{}_{\bar{a}}\) for a Lorentz boost with that velocity [e.g. Eq. (2.38) of [181]]:

\begin{align} \Lambda^t{}_{\bar{t}} &= \gamma, \\ \Lambda^t{}_{\bar{i}} = \Lambda^i{}_{\bar{t}} &= \gamma v^i, \\ \Lambda^i{}_{\bar{j}} = \Lambda^j{}_{\bar{i}} &= [(\gamma - 1)/v^2] v^i v^j + \delta^{ij}. \end{align}

Here \(v = \sqrt{\delta_{ij} v^i v^j}\), \(\gamma = 1/\sqrt{1-v^2}\), and \(\delta^{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 \(v \rightarrow -v\)) 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 \(v^i\) (with \(c=1\)), compute the matrix \(\Lambda^{a}{}_{\bar{a}}\) for a Lorentz boost with that velocity [e.g. Eq. (2.38) of [181]]:

\begin{align} \Lambda^t{}_{\bar{t}} &= \gamma, \\ \Lambda^t{}_{\bar{i}} = \Lambda^i{}_{\bar{t}} &= \gamma v^i, \\ \Lambda^i{}_{\bar{j}} = \Lambda^j{}_{\bar{i}} &= [(\gamma - 1)/v^2] v^i v^j + \delta^{ij}. \end{align}

Here \(v = \sqrt{\delta_{ij} v^i v^j}\), \(\gamma = 1/\sqrt{1-v^2}\), and \(\delta^{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 \(v \rightarrow -v\)) 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 \(v^i\) (with \(c=1\)), compute the matrix \(\Lambda^{a}{}_{\bar{a}}\) for a Lorentz boost with that velocity [e.g. Eq. (2.38) of [181]]:

\begin{align} \Lambda^t{}_{\bar{t}} &= \gamma, \\ \Lambda^t{}_{\bar{i}} = \Lambda^i{}_{\bar{t}} &= \gamma v^i, \\ \Lambda^i{}_{\bar{j}} = \Lambda^j{}_{\bar{i}} &= [(\gamma - 1)/v^2] v^i v^j + \delta^{ij}. \end{align}

Here \(v = \sqrt{\delta_{ij} v^i v^j}\), \(\gamma = 1/\sqrt{1-v^2}\), and \(\delta^{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 \(v \rightarrow -v\)) 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.