LorentzBoostMatrix.hpp
2 // See LICENSE.txt for details.
3
4 #pragma once
5
6 #include <cstddef>
7
9
10 /// \cond
11 namespace gsl {
12 template <typename T>
13 class not_null;
14 } // namespace gsl
15
16 /// \endcond
17
18 /// \ingroup SpecialRelativityGroup
19 /// Holds functions related to special relativity.
20 namespace sr {
21 /// @{
22 /*!
23  * \ingroup SpecialRelativityGroup
24  * \brief Computes the matrix for a Lorentz boost from a single
25  * velocity vector (i.e., not a velocity field).
26  *
27  * \details Given a spatial velocity vector \f$v^i\f$ (with \f$c=1\f$),
28  * compute the matrix \f$\Lambda^{a}{}_{\bar{a}}\f$ for a Lorentz boost with
29  * that velocity [e.g. Eq. (2.38) of \cite ThorneBlandford2017]:
30  *
31  * \f{align}{
32  * \Lambda^t{}_{\bar{t}} &= \gamma, \\
33  * \Lambda^t{}_{\bar{i}} = \Lambda^i{}_{\bar{t}} &= \gamma v^i, \\
34  * \Lambda^i{}_{\bar{j}} = \Lambda^j{}_{\bar{i}} &= [(\gamma - 1)/v^2] v^i v^j
35  * + \delta^{ij}.
36  * \f}
37  *
38  * Here \f$v = \sqrt{\delta_{ij} v^i v^j}\f$, \f$\gamma = 1/\sqrt{1-v^2}\f$,
39  * and \f$\delta^{ij}\f$ is the Kronecker delta. Note that this matrix boosts
40  * a one-form from the unbarred to the barred frame, and its inverse
41  * (obtained via \f$v \rightarrow -v\f$) boosts a vector from the barred to
42  * the unbarred frame.
43  *
44  * Note that while the Lorentz boost matrix is symmetric, the returned
45  * boost matrix is of type tnsr::Ab, because Tensor does not support
46  * symmetric tensors unless both indices have the same valence.
47  */
48 template <size_t SpatialDim>
49 tnsr::Ab<double, SpatialDim, Frame::NoFrame> lorentz_boost_matrix(
50  const tnsr::I<double, SpatialDim, Frame::NoFrame>& velocity) noexcept;
51
52 template <size_t SpatialDim>
54  gsl::not_null<tnsr::Ab<double, SpatialDim, Frame::NoFrame>*> boost_matrix,
55  const tnsr::I<double, SpatialDim, Frame::NoFrame>& velocity) noexcept;
56 /// @}
57 } // namespace sr
cstddef
TypeAliases.hpp
sr::lorentz_boost_matrix
tnsr::Ab< double, SpatialDim, Frame::NoFrame > lorentz_boost_matrix(const tnsr::I< double, SpatialDim, Frame::NoFrame > &velocity) noexcept
Computes the matrix for a Lorentz boost from a single velocity vector (i.e., not a velocity field).
gsl
Implementations from the Guideline Support Library.