SpECTRE Documentation Coverage Report
Current view: top level - PointwiseFunctions/GeneralRelativity - ExtrinsicCurvature.hpp Hit Total Coverage
Commit: 47056168667e3fcaf5c2563461756c37676bb94c Lines: 2 3 66.7 %
Date: 2024-04-19 14:00:09
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 <cmath>
       7             : #include <cstddef>
       8             : #include <cstdint>
       9             : #include <utility>
      10             : 
      11             : #include "DataStructures/DataBox/Prefixes.hpp"
      12             : #include "DataStructures/DataBox/Tag.hpp"
      13             : #include "DataStructures/Tensor/EagerMath/DeterminantAndInverse.hpp"
      14             : #include "DataStructures/Tensor/Tensor.hpp"
      15             : #include "DataStructures/VariablesTag.hpp"
      16             : #include "NumericalAlgorithms/LinearOperators/PartialDerivatives.hpp"
      17             : #include "PointwiseFunctions/GeneralRelativity/Tags.hpp"
      18             : #include "Utilities/ContainerHelpers.hpp"
      19             : #include "Utilities/Gsl.hpp"
      20             : #include "Utilities/TMPL.hpp"
      21             : #include "Utilities/TaggedTuple.hpp"
      22             : 
      23             : /// \ingroup GeneralRelativityGroup
      24             : /// Holds functions related to general relativity.
      25             : namespace gr {
      26             : /// @{
      27             : /*!
      28             :  * \ingroup GeneralRelativityGroup
      29             :  * \brief  Computes extrinsic curvature from metric and derivatives.
      30             :  * \details Uses the ADM evolution equation for the spatial metric,
      31             :  * \f[ K_{ij} = \frac{1}{2 \alpha} \left ( -\partial_0 \gamma_{ij}
      32             :  * + \beta^k \partial_k \gamma_{ij} + \gamma_{ki} \partial_j \beta^k
      33             :  * + \gamma_{kj} \partial_i \beta^k \right ) \f]
      34             :  * where \f$K_{ij}\f$ is the extrinsic curvature, \f$\alpha\f$ is the lapse,
      35             :  * \f$\beta^i\f$ is the shift, and \f$\gamma_{ij}\f$ is the spatial metric. In
      36             :  * terms of the Lie derivative of the spatial metric with respect to a unit
      37             :  * timelike vector \f$n^a\f$ normal to the spatial slice, this corresponds to
      38             :  * the sign convention
      39             :  * \f[ K_{ab} = - \frac{1}{2} \mathcal{L}_{\mathbf{n}} \gamma_{ab} \f]
      40             :  * where \f$\gamma_{ab}\f$ is the spatial metric. See Eq. (2.53) in
      41             :  * \cite BaumgarteShapiro.
      42             :  */
      43             : template <typename DataType, size_t SpatialDim, typename Frame>
      44           1 : tnsr::ii<DataType, SpatialDim, Frame> extrinsic_curvature(
      45             :     const Scalar<DataType>& lapse,
      46             :     const tnsr::I<DataType, SpatialDim, Frame>& shift,
      47             :     const tnsr::iJ<DataType, SpatialDim, Frame>& deriv_shift,
      48             :     const tnsr::ii<DataType, SpatialDim, Frame>& spatial_metric,
      49             :     const tnsr::ii<DataType, SpatialDim, Frame>& dt_spatial_metric,
      50             :     const tnsr::ijj<DataType, SpatialDim, Frame>& deriv_spatial_metric);
      51             : 
      52             : template <typename DataType, size_t SpatialDim, typename Frame>
      53           1 : void extrinsic_curvature(
      54             :     gsl::not_null<tnsr::ii<DataType, SpatialDim, Frame>*> ex_curvature,
      55             :     const Scalar<DataType>& lapse,
      56             :     const tnsr::I<DataType, SpatialDim, Frame>& shift,
      57             :     const tnsr::iJ<DataType, SpatialDim, Frame>& deriv_shift,
      58             :     const tnsr::ii<DataType, SpatialDim, Frame>& spatial_metric,
      59             :     const tnsr::ii<DataType, SpatialDim, Frame>& dt_spatial_metric,
      60             :     const tnsr::ijj<DataType, SpatialDim, Frame>& deriv_spatial_metric);
      61             : /// @}
      62             : }  // namespace gr

Generated by: LCOV version 1.14