SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/Ccz4 - DerivLapse.hpp Hit Total Coverage
Commit: 37c384043430860f87787999aa7399d01bb3d213 Lines: 4 5 80.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             : #include "Utilities/Gsl.hpp"
      10             : 
      11             : namespace Ccz4 {
      12             : /// @{
      13             : /*!
      14             :  * \brief Computes the gradient of the gradient of the lapse.
      15             :  *
      16             :  * \details Computes the gradient of the gradient as:
      17             :  * \f{align}
      18             :  *     \nabla_i \nabla_j \alpha &= \alpha A_i A_j -
      19             :  *                 \alpha \Gamma^k{}_{ij} A_k + \alpha \partial_{(i} A_{j)}
      20             :  * \f}
      21             :  * where \f$\alpha\f$, \f$\Gamma^k{}_{ij}\f$, \f$A_i\f$, and
      22             :  * \f$\partial_j A_i\f$ are the lapse, spatial christoffel symbols of the second
      23             :  * kind, the CCZ4 auxiliary variable defined by `Ccz4::Tags::FieldA`, and its
      24             :  * spatial derivative, respectively.
      25             :  */
      26             : template <typename DataType, size_t Dim, typename Frame>
      27           1 : void grad_grad_lapse(
      28             :     const gsl::not_null<tnsr::ij<DataType, Dim, Frame>*> result,
      29             :     const Scalar<DataType>& lapse,
      30             :     const tnsr::Ijj<DataType, Dim, Frame>& christoffel_second_kind,
      31             :     const tnsr::i<DataType, Dim, Frame>& field_a,
      32             :     const tnsr::ij<DataType, Dim, Frame>& d_field_a);
      33             : 
      34             : template <typename DataType, size_t Dim, typename Frame>
      35           1 : tnsr::ij<DataType, Dim, Frame> grad_grad_lapse(
      36             :     const Scalar<DataType>& lapse,
      37             :     const tnsr::Ijj<DataType, Dim, Frame>& christoffel_second_kind,
      38             :     const tnsr::i<DataType, Dim, Frame>& field_a,
      39             :     const tnsr::ij<DataType, Dim, Frame>& d_field_a);
      40             : /// @}
      41             : 
      42             : /// @{
      43             : /*!
      44             :  * \ingroup GeneralRelativityGroup
      45             :  * \brief Computes the divergence of the lapse.
      46             :  *
      47             :  * \details Computes the divergence as:
      48             :  * \f{align}
      49             :  *     \nabla^i \nabla_i \alpha &= \phi^2 \tilde{\gamma}^{ij}
      50             :  *         (\nabla_i \nabla_j \alpha)
      51             :  * \f}
      52             :  * where \f$\phi\f$, \f$\tilde{\gamma}^{ij}\f$, and
      53             :  * \f$\nabla_i \nabla_j \alpha\f$ are the conformal factor, inverse conformal
      54             :  * spatial metric, and the gradient of the gradient of the lapse defined by
      55             :  * `Ccz4::Tags::ConformalFactor`, `Ccz4::Tags::InverseConformalMetric`, and
      56             :  * `Ccz4::Tags::GradGradLapse`, respectively.
      57             :  */
      58             : template <typename DataType, size_t Dim, typename Frame>
      59           1 : void divergence_lapse(
      60             :     const gsl::not_null<Scalar<DataType>*> result,
      61             :     const Scalar<DataType>& conformal_factor_squared,
      62             :     const tnsr::II<DataType, Dim, Frame>& inverse_conformal_metric,
      63             :     const tnsr::ij<DataType, Dim, Frame>& grad_grad_lapse);
      64             : 
      65             : template <typename DataType, size_t Dim, typename Frame>
      66           1 : Scalar<DataType> divergence_lapse(
      67             :     const Scalar<DataType>& conformal_factor_squared,
      68             :     const tnsr::II<DataType, Dim, Frame>& inverse_conformal_metric,
      69             :     const tnsr::ij<DataType, Dim, Frame>& grad_grad_lapse);
      70             : /// @}
      71             : }  // namespace Ccz4

Generated by: LCOV version 1.14