SpECTRE Documentation Coverage Report
Current view: top level - PointwiseFunctions/SpecialRelativity - LorentzBoostMatrix.hpp Hit Total Coverage
Commit: 37c384043430860f87787999aa7399d01bb3d213 Lines: 3 4 75.0 %
Date: 2024-04-20 02:24:02
Legend: Lines: hit not hit

          Line data    Source code
       1           0 : // Distributed under the MIT License.
       2             : // See LICENSE.txt for details.
       3             : 
       4             : #pragma once
       5             : 
       6             : #include <cstddef>
       7             : 
       8             : #include "DataStructures/Tensor/TypeAliases.hpp"
       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           1 : 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           1 : tnsr::Ab<double, SpatialDim, Frame::NoFrame> lorentz_boost_matrix(
      50             :     const tnsr::I<double, SpatialDim, Frame::NoFrame>& velocity);
      51             : 
      52             : template <size_t SpatialDim>
      53           1 : void lorentz_boost_matrix(
      54             :     gsl::not_null<tnsr::Ab<double, SpatialDim, Frame::NoFrame>*> boost_matrix,
      55             :     const tnsr::I<double, SpatialDim, Frame::NoFrame>& velocity);
      56             : /// @}
      57             : }  // namespace sr

Generated by: LCOV version 1.14