SpECTRE Documentation Coverage Report
Current view: top level - PointwiseFunctions/Xcts - AdmMass.hpp Hit Total Coverage
Commit: 1f2210958b4f38fdc0400907ee7c6d5af5111418 Lines: 4 5 80.0 %
Date: 2025-12-05 05:03:31
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 mass calculation.
      15             :  *
      16             :  * We define the ADM mass integral as (see Eq. 3.139 in \cite BaumgarteShapiro):
      17             :  *
      18             :  * \begin{equation}
      19             :  *   M_\text{ADM} = \frac{1}{16\pi}
      20             :  *                  \oint_{S_\infty} \Big(
      21             :  *                     \bar\gamma^{jk} \bar\Gamma^i_{jk}
      22             :  *                     - \bar\gamma^{ij} \bar\Gamma_{j}
      23             :  *                     - 8 \bar\gamma^{ij} \partial_j \psi
      24             :  *                  \Big) d\bar{S}_i.
      25             :  * \end{equation}
      26             :  *
      27             :  * \note We don't use the other versions presented in \cite BaumgarteShapiro of
      28             :  * this integral because they make assumptions like $\bar\gamma = 1$,
      29             :  * $\bar\Gamma^i_{ij} = 0$ and faster fall-off of the conformal metric.
      30             :  *
      31             :  * \note For consistency with `adm_mass_volume_integrand`, this integrand needs
      32             :  * to be contracted with the conformal face normal and integrated with the
      33             :  * conformal area element.
      34             :  *
      35             :  * \param result output pointer
      36             :  * \param deriv_conformal_factor the gradient of the conformal factor
      37             :  * $\partial_i \psi$
      38             :  * \param inv_conformal_metric the inverse conformal metric $\bar\gamma^{ij}$
      39             :  * \param conformal_christoffel_second_kind the conformal christoffel symbol
      40             :  * $\bar\Gamma^i_{jk}$
      41             :  * \param conformal_christoffel_contracted the conformal christoffel symbol
      42             :  * contracted in its first two indices $\bar\Gamma_{i} = \bar\Gamma^j_{ij}$
      43             :  */
      44           1 : void adm_mass_surface_integrand(
      45             :     gsl::not_null<tnsr::I<DataVector, 3>*> result,
      46             :     const tnsr::i<DataVector, 3>& deriv_conformal_factor,
      47             :     const tnsr::II<DataVector, 3>& inv_conformal_metric,
      48             :     const tnsr::Ijj<DataVector, 3>& conformal_christoffel_second_kind,
      49             :     const tnsr::i<DataVector, 3>& conformal_christoffel_contracted);
      50             : 
      51             : /// Return-by-value overload
      52           1 : tnsr::I<DataVector, 3> adm_mass_surface_integrand(
      53             :     const tnsr::i<DataVector, 3>& deriv_conformal_factor,
      54             :     const tnsr::II<DataVector, 3>& inv_conformal_metric,
      55             :     const tnsr::Ijj<DataVector, 3>& conformal_christoffel_second_kind,
      56             :     const tnsr::i<DataVector, 3>& conformal_christoffel_contracted);
      57             : /// @}
      58             : 
      59             : /// @{
      60             : /*!
      61             :  * \brief Volume integrand for the ADM mass calculation.
      62             :  *
      63             :  * We cast the ADM mass as an infinite volume integral by applying Gauss' law on
      64             :  * the surface integral defined in `adm_mass_surface_integrand`:
      65             :  *
      66             :  * \begin{equation}
      67             :  *   M_\text{ADM} = \frac{1}{16\pi}
      68             :  *                  \int_{V_\infty} \Big(
      69             :  *                    \partial_i \bar\gamma^{jk} \bar\Gamma^i_{jk}
      70             :  *                    + \bar\gamma^{jk} \partial_i \bar\Gamma^i_{jk}
      71             :  *                    + \bar\Gamma_l \bar\gamma^{jk} \bar\Gamma^l_{jk}
      72             :  *                    - \partial_i \bar\gamma^{ij} \bar\Gamma_j
      73             :  *                    - \bar\gamma^{ij} \partial_i \bar\Gamma_j
      74             :  *                    - \bar\Gamma_l \bar\gamma^{lj} \bar\Gamma_j
      75             :  *                    - 8 \bar D^2 \psi
      76             :  *                  \Big) d\bar{V},
      77             :  * \end{equation}
      78             :  *
      79             :  * where we can use the Hamiltonian constraint (Eq. 3.37 in
      80             :  * \cite BaumgarteShapiro) to replace $8 \bar D^2 \psi$ with
      81             :  *
      82             :  * \begin{equation}
      83             :  *   8 \bar D^2 \psi = \psi \bar R + \frac{2}{3} \psi^5 K^2
      84             :  *                     - \frac{1}{4} \psi^5 \frac{1}{\alpha^2}
      85             :  *                         \Big[ (\bar L \beta)_{ij} - \bar u_{ij} \Big]
      86             :  *                         \Big[ (\bar L \beta)^{ij} - \bar u^{ij} \Big]
      87             :  *                     - 16\pi \psi^5 \rho.
      88             :  * \end{equation}
      89             :  *
      90             :  * \note This is similar to Eq. 3.149 in \cite BaumgarteShapiro, except that
      91             :  * here we don't assume $\bar\gamma = 1$.
      92             :  *
      93             :  * \note For consistency with `adm_mass_surface_integrand`, this integrand needs
      94             :  * to be integrated with the conformal volume element.
      95             :  *
      96             :  * \param result output pointer
      97             :  * \param conformal_factor the conformal factor
      98             :  * \param conformal_ricci_scalar the conformal Ricci scalar $\bar R$
      99             :  * \param trace_extrinsic_curvature the extrinsic curvature trace $K$
     100             :  * \param longitudinal_shift_minus_dt_conformal_metric_over_lapse_square the
     101             :  * quantity computed in
     102             :  * `Xcts::Tags::LongitudinalShiftMinusDtConformalMetricOverLapseSquare`
     103             :  * \param energy_density the energy density $\rho$
     104             :  * \param inv_conformal_metric the inverse conformal metric $\bar\gamma^{ij}$
     105             :  * \param deriv_inv_conformal_metric the gradient of the inverse conformal
     106             :  * metric $\partial_i \bar\gamma^{jk}$
     107             :  * \param conformal_christoffel_second_kind the conformal christoffel symbol
     108             :  * $\bar\Gamma^i_{jk}$
     109             :  * \param conformal_christoffel_contracted the conformal christoffel symbol
     110             :  * contracted in its first two indices $\bar\Gamma_{i} = \bar\Gamma^j_{ij}$
     111             :  * \param deriv_conformal_christoffel_second_kind the gradient of the conformal
     112             :  * christoffel symbol $\partial_i \bar\Gamma^j_{kl}$
     113             :  */
     114           1 : void adm_mass_volume_integrand(
     115             :     gsl::not_null<Scalar<DataVector>*> result,
     116             :     const Scalar<DataVector>& conformal_factor,
     117             :     const Scalar<DataVector>& conformal_ricci_scalar,
     118             :     const Scalar<DataVector>& trace_extrinsic_curvature,
     119             :     const Scalar<DataVector>&
     120             :         longitudinal_shift_minus_dt_conformal_metric_over_lapse_square,
     121             :     const Scalar<DataVector>& energy_density,
     122             :     const tnsr::II<DataVector, 3>& inv_conformal_metric,
     123             :     const tnsr::iJK<DataVector, 3>& deriv_inv_conformal_metric,
     124             :     const tnsr::Ijj<DataVector, 3>& conformal_christoffel_second_kind,
     125             :     const tnsr::i<DataVector, 3>& conformal_christoffel_contracted,
     126             :     const tnsr::iJkk<DataVector, 3>& deriv_conformal_christoffel_second_kind);
     127             : 
     128             : /// Return-by-value overload
     129           1 : Scalar<DataVector> adm_mass_volume_integrand(
     130             :     const Scalar<DataVector>& conformal_factor,
     131             :     const Scalar<DataVector>& conformal_ricci_scalar,
     132             :     const Scalar<DataVector>& trace_extrinsic_curvature,
     133             :     const Scalar<DataVector>&
     134             :         longitudinal_shift_minus_dt_conformal_metric_over_lapse_square,
     135             :     const Scalar<DataVector>& energy_density,
     136             :     const tnsr::II<DataVector, 3>& inv_conformal_metric,
     137             :     const tnsr::iJK<DataVector, 3>& deriv_inv_conformal_metric,
     138             :     const tnsr::Ijj<DataVector, 3>& conformal_christoffel_second_kind,
     139             :     const tnsr::i<DataVector, 3>& conformal_christoffel_contracted,
     140             :     const tnsr::iJkk<DataVector, 3>& deriv_conformal_christoffel_second_kind);
     141             : /// @}
     142             : 
     143             : }  // namespace Xcts

Generated by: LCOV version 1.14