SpECTRE Documentation Coverage Report
Current view: top level - PointwiseFunctions/Xcts - AdmLinearMomentum.hpp Hit Total Coverage
Commit: f23e75c235cae5144b8ac7ce01280be5b8cd2c8a Lines: 4 5 80.0 %
Date: 2024-09-07 06:21:00
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 "DataStructures/DataVector.hpp"
       7             : #include "DataStructures/Tensor/Slice.hpp"
       8             : #include "DataStructures/Tensor/Tensor.hpp"
       9             : #include "Domain/Structure/Direction.hpp"
      10             : #include "Domain/Structure/IndexToSliceAt.hpp"
      11             : #include "NumericalAlgorithms/Spectral/Mesh.hpp"
      12             : #include "Utilities/Gsl.hpp"
      13             : 
      14             : #include <cmath>
      15             : 
      16             : #include "NumericalAlgorithms/LinearOperators/Divergence.hpp"
      17             : #include "NumericalAlgorithms/LinearOperators/PartialDerivatives.hpp"
      18             : 
      19             : namespace Xcts {
      20             : 
      21             : /// @{
      22             : /*!
      23             :  * \brief Surface integrand for ADM linear momentum calculation defined as (see
      24             :  * Eq. 20 in \cite Ossokine2015yla):
      25             :  *
      26             :  * \begin{equation}
      27             :  *   \frac{1}{8\pi} \psi^{10} (K^{ij} - K \gamma^{ij})
      28             :  * \end{equation}
      29             :  *
      30             :  * \param result output buffer for the surface integrand
      31             :  * \param conformal_factor the conformal factor $\psi$
      32             :  * \param inv_spatial_metric the inverse spatial metric $\gamma^{ij}$
      33             :  * \param inv_extrinsic_curvature the inverse extrinsic curvature $K^{ij}$
      34             :  * \param trace_extrinsic_curvature the trace of the extrinsic curvature $K$
      35             :  */
      36           1 : void adm_linear_momentum_surface_integrand(
      37             :     gsl::not_null<tnsr::II<DataVector, 3>*> result,
      38             :     const Scalar<DataVector>& conformal_factor,
      39             :     const tnsr::II<DataVector, 3>& inv_spatial_metric,
      40             :     const tnsr::II<DataVector, 3>& inv_extrinsic_curvature,
      41             :     const Scalar<DataVector>& trace_extrinsic_curvature);
      42             : 
      43             : /// Return-by-value overload
      44           1 : tnsr::II<DataVector, 3> adm_linear_momentum_surface_integrand(
      45             :     const Scalar<DataVector>& conformal_factor,
      46             :     const tnsr::II<DataVector, 3>& inv_spatial_metric,
      47             :     const tnsr::II<DataVector, 3>& inv_extrinsic_curvature,
      48             :     const Scalar<DataVector>& trace_extrinsic_curvature);
      49             : /// @}
      50             : 
      51             : /// @{
      52             : /*!
      53             :  * \brief Volume integrand for ADM linear momentum calculation defined as (see
      54             :  * Eq. 20 in \cite Ossokine2015yla):
      55             :  *
      56             :  * \begin{equation}
      57             :  *   - \frac{1}{8\pi} (
      58             :  *       \bar\Gamma^i_{jk} P^{jk}
      59             :  *       + \bar\Gamma^j_{jk} P^{jk}
      60             :  *       - 2 \bar\gamma_{jk} P^{jk} \bar\gamma^{il} \partial_l(\ln\psi)
      61             :  *   ),
      62             :  * \end{equation}
      63             :  *
      64             :  * where $\frac{1}{8\pi} P^{jk}$ is the result from
      65             :  * `adm_linear_momentum_surface_integrand`.
      66             :  *
      67             :  * Note that we are including the negative sign in the integrand.
      68             :  *
      69             :  * \param result output buffer for the surface integrand
      70             :  * \param surface_integrand the result of
      71             :  * `adm_linear_momentum_surface_integrand`
      72             :  * \param conformal_factor the conformal factor $\psi$
      73             :  * \param conformal_factor_deriv the derivative of the conformal factor
      74             :  * $\partial_i\psi$
      75             :  * \param conformal_metric the conformal metric $\bar\gamma_{ij}$
      76             :  * \param inv_conformal_metric the inverse conformal metric $\bar\gamma^{ij}$
      77             :  * \param conformal_christoffel_second_kind the conformal christoffel symbol
      78             :  * $\bar\Gamma^i_{jk}$
      79             :  * \param conformal_christoffel_contracted the contracted conformal christoffel
      80             :  * symbol $\bar\Gamma_i$
      81             :  */
      82           1 : void adm_linear_momentum_volume_integrand(
      83             :     gsl::not_null<tnsr::I<DataVector, 3>*> result,
      84             :     const tnsr::II<DataVector, 3>& surface_integrand,
      85             :     const Scalar<DataVector>& conformal_factor,
      86             :     const tnsr::i<DataVector, 3>& conformal_factor_deriv,
      87             :     const tnsr::ii<DataVector, 3>& conformal_metric,
      88             :     const tnsr::II<DataVector, 3>& inv_conformal_metric,
      89             :     const tnsr::Ijj<DataVector, 3>& conformal_christoffel_second_kind,
      90             :     const tnsr::i<DataVector, 3>& conformal_christoffel_contracted);
      91             : 
      92             : /// Return-by-value overload
      93           1 : tnsr::I<DataVector, 3> adm_linear_momentum_volume_integrand(
      94             :     const tnsr::II<DataVector, 3>& surface_integrand,
      95             :     const Scalar<DataVector>& conformal_factor,
      96             :     const tnsr::i<DataVector, 3>& conformal_factor_deriv,
      97             :     const tnsr::ii<DataVector, 3>& conformal_metric,
      98             :     const tnsr::II<DataVector, 3>& inv_conformal_metric,
      99             :     const tnsr::Ijj<DataVector, 3>& conformal_christoffel_second_kind,
     100             :     const tnsr::i<DataVector, 3>& conformal_christoffel_contracted);
     101             : /// @}
     102             : 
     103             : }  // namespace Xcts

Generated by: LCOV version 1.14