SpECTRE Documentation Coverage Report
Current view: top level - PointwiseFunctions/Xcts - AdmMomentum.hpp Coverage Total Hit
Commit: 0d1d717af84a81fb1284a20c4013708fe85cc2f0 Lines: 88.9 % 9 8
Test Date: 2026-10-22 17:29:42
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/Tensor.hpp"
       8              : #include "Utilities/Gsl.hpp"
       9              : 
      10              : namespace Xcts {
      11              : 
      12              : /// @{
      13              : /*!
      14              :  * \brief Surface integrand for the ADM linear momentum calculation.
      15              :  *
      16              :  * We define the ADM linear momentum integral as (see Eqs. 19-20 in
      17              :  * \cite Ossokine2015yla):
      18              :  *
      19              :  * \begin{equation}
      20              :  *   P_\text{ADM}^i = \frac{1}{8\pi}
      21              :  *                    \oint_{S_\infty} \psi^{10} \Big(
      22              :  *                      K^{ij} - K \gamma^{ij}
      23              :  *                    \Big) \, dS_j.
      24              :  * \end{equation}
      25              :  *
      26              :  * \note For consistency with `adm_linear_momentum_volume_integrand`, this
      27              :  * integrand needs to be contracted with the Euclidean face normal and
      28              :  * integrated with the Euclidean area element.
      29              :  *
      30              :  * \param result output pointer
      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              :  *   P_\text{ADM}^i = - \frac{1}{8\pi}
      58              :  *                      \int_{V_\infty} \Big(
      59              :  *                        \bar\Gamma^i_{jk} P^{jk}
      60              :  *                        + \bar\Gamma^j_{jk} P^{jk}
      61              :  *                        - 2 \bar\gamma_{jk} P^{jk} \bar\gamma^{il}
      62              :  *                                                   \partial_l(\ln\psi)
      63              :  *                      \Big) \, dV,
      64              :  * \end{equation}
      65              :  *
      66              :  * where $1/(8\pi) P^{jk}$ is the result from
      67              :  * `adm_linear_momentum_surface_integrand`.
      68              :  *
      69              :  * \note For consistency with `adm_linear_momentum_surface_integrand`, this
      70              :  * integrand needs to be integrated with the Euclidean volume element.
      71              :  *
      72              :  * \param result output pointer
      73              :  * \param surface_integrand the quantity $1/(8\pi) P^{ij}$ (result of
      74              :  * `adm_linear_momentum_surface_integrand`)
      75              :  * \param conformal_factor the conformal factor $\psi$
      76              :  * \param deriv_conformal_factor the gradient of the conformal factor
      77              :  * $\partial_i\psi$
      78              :  * \param conformal_metric the conformal metric $\bar\gamma_{ij}$
      79              :  * \param inv_conformal_metric the inverse conformal metric $\bar\gamma^{ij}$
      80              :  * \param conformal_christoffel_second_kind the conformal christoffel symbol
      81              :  * $\bar\Gamma^i_{jk}$
      82              :  * \param conformal_christoffel_contracted the contracted conformal christoffel
      83              :  * symbol $\bar\Gamma_i$
      84              :  */
      85            1 : void adm_linear_momentum_volume_integrand(
      86              :     gsl::not_null<tnsr::I<DataVector, 3>*> result,
      87              :     const tnsr::II<DataVector, 3>& surface_integrand,
      88              :     const Scalar<DataVector>& conformal_factor,
      89              :     const tnsr::i<DataVector, 3>& deriv_conformal_factor,
      90              :     const tnsr::ii<DataVector, 3>& conformal_metric,
      91              :     const tnsr::II<DataVector, 3>& inv_conformal_metric,
      92              :     const tnsr::Ijj<DataVector, 3>& conformal_christoffel_second_kind,
      93              :     const tnsr::i<DataVector, 3>& conformal_christoffel_contracted);
      94              : 
      95              : /// Return-by-value overload
      96            1 : tnsr::I<DataVector, 3> adm_linear_momentum_volume_integrand(
      97              :     const tnsr::II<DataVector, 3>& surface_integrand,
      98              :     const Scalar<DataVector>& conformal_factor,
      99              :     const tnsr::i<DataVector, 3>& deriv_conformal_factor,
     100              :     const tnsr::ii<DataVector, 3>& conformal_metric,
     101              :     const tnsr::II<DataVector, 3>& inv_conformal_metric,
     102              :     const tnsr::Ijj<DataVector, 3>& conformal_christoffel_second_kind,
     103              :     const tnsr::i<DataVector, 3>& conformal_christoffel_contracted);
     104              : /// @}
     105              : 
     106              : /// @{
     107              : /*!
     108              :  * \brief Surface integrand for the z-component of the ADM angular momentum.
     109              :  *
     110              :  * We define the ADM angular momentum surface integral as (see Eq. 23 in
     111              :  * \cite Ossokine2015yla):
     112              :  *
     113              :  * \begin{equation}
     114              :  *   J_\text{ADM}^z = \frac{1}{8\pi}
     115              :  *                    \oint_{S_\infty} \Big(
     116              :  *                      x P^{yj} - y P^{xj}
     117              :  *                    \Big) \, dS_j,
     118              :  * \end{equation}
     119              :  *
     120              :  * where $1/(8\pi) P^{jk}$ is the result from
     121              :  * `adm_linear_momentum_surface_integrand`.
     122              :  *
     123              :  * \note For consistency with `adm_angular_momentum_z_volume_integrand`, this
     124              :  * integrand needs to be contracted with the Euclidean face normal and
     125              :  * integrated with the Euclidean area element.
     126              :  *
     127              :  * \param result output pointer
     128              :  * \param linear_momentum_surface_integrand the quantity $1/(8\pi) P^{ij}$
     129              :  * (result of `adm_linear_momentum_surface_integrand`)
     130              :  * \param coords the inertial coordinates $x^i$
     131              :  */
     132            1 : void adm_angular_momentum_z_surface_integrand(
     133              :     gsl::not_null<tnsr::I<DataVector, 3>*> result,
     134              :     const tnsr::II<DataVector, 3>& linear_momentum_surface_integrand,
     135              :     const tnsr::I<DataVector, 3>& coords);
     136              : 
     137              : /// Return-by-value overload
     138            1 : tnsr::I<DataVector, 3> adm_angular_momentum_z_surface_integrand(
     139              :     const tnsr::II<DataVector, 3>& linear_momentum_surface_integrand,
     140              :     const tnsr::I<DataVector, 3>& coords);
     141              : /// @}
     142              : 
     143              : /// @{
     144              : /*!
     145              :  * \brief Volume integrand for the z-component of the ADM angular momentum.
     146              :  *
     147              :  * We define the ADM angular momentum volume integral as (see Eq. 23 in
     148              :  * \cite Ossokine2015yla):
     149              :  *
     150              :  * \begin{equation}
     151              :  *   J_\text{ADM}^z = - \frac{1}{8\pi}
     152              :  *                      \int_{V_\infty} \Big(
     153              :  *                        x G^y - y G^x
     154              :  *                      \Big) \, dV,
     155              :  * \end{equation}
     156              :  *
     157              :  * where $-1/(8\pi) G^i$ is the result from
     158              :  * `adm_linear_momentum_volume_integrand`.
     159              :  *
     160              :  * \note For consistency with `adm_angular_momentum_z_surface_integrand`, this
     161              :  * integrand needs to be integrated with the Euclidean volume element.
     162              :  *
     163              :  * \param result output pointer
     164              :  * \param linear_momentum_volume_integrand the quantity $-1/(8\pi) G^i$ (result
     165              :  * of `adm_linear_momentum_volume_integrand`)
     166              :  * \param coords the inertial coordinates $x^i$
     167              :  */
     168            1 : void adm_angular_momentum_z_volume_integrand(
     169              :     gsl::not_null<Scalar<DataVector>*> result,
     170              :     const tnsr::I<DataVector, 3>& linear_momentum_volume_integrand,
     171              :     const tnsr::I<DataVector, 3>& coords);
     172              : 
     173              : /// Return-by-value overload
     174            1 : Scalar<DataVector> adm_angular_momentum_z_volume_integrand(
     175              :     const tnsr::I<DataVector, 3>& linear_momentum_volume_integrand,
     176              :     const tnsr::I<DataVector, 3>& coords);
     177              : /// @}
     178              : 
     179              : }  // namespace Xcts
        

Generated by: LCOV version 2.0-1