SpECTRE
v2024.09.29
|
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::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). 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::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). 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... | |
Contains functions used in special relativity calculations.
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.
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.
This requires passing the 0th component of the vector as an additional argument.
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).
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 [190]]:
\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.
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).
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 [190]]:
\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.
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).
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 [190]]:
\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.