SpECTRE
v2025.03.17
|
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
Here
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
Here
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
Here
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.