SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/ScalarTensor - System.hpp Hit Total Coverage
Commit: 1f2210958b4f38fdc0400907ee7c6d5af5111418 Lines: 1 15 6.7 %
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 <cstddef>
       7             : 
       8             : #include "DataStructures/VariablesTag.hpp"
       9             : #include "Evolution/Systems/CurvedScalarWave/System.hpp"
      10             : #include "Evolution/Systems/GeneralizedHarmonic/System.hpp"
      11             : #include "Evolution/Systems/ScalarTensor/BoundaryConditions/BoundaryCondition.hpp"
      12             : #include "Evolution/Systems/ScalarTensor/Characteristics.hpp"
      13             : #include "Evolution/Systems/ScalarTensor/Tags.hpp"
      14             : #include "Evolution/Systems/ScalarTensor/TimeDerivative.hpp"
      15             : #include "PointwiseFunctions/GeneralRelativity/Tags.hpp"
      16             : #include "Utilities/TMPL.hpp"
      17             : 
      18             : /*!
      19             :  * \ingroup EvolutionSystemsGroup
      20             :  * \brief Items related to evolving the first-order scalar tensor system.
      21             :  */
      22             : namespace ScalarTensor {
      23             : /*!
      24             :  * \brief Scalar Tensor system obtained from combining the CurvedScalarWave and
      25             :  * gh systems.
      26             :  *
      27             :  * \details The evolution equations follow from
      28             :  * \f{align*}{
      29             :  *  R_{ab} &= 8 \pi \, T^{(\Psi, \text{TR})}_{ab} ~, \\
      30             :  *  \Box \Psi &= 0~,
      31             :  * \f}
      32             :  *
      33             :  * where \f$\Psi\f$ is the scalar field and the trace-reversed stress-energy
      34             :  * tensor of the scalar field is given by
      35             :  * \f{align*}{
      36             :     T^{(\Psi, \text{TR})}_{ab}
      37             :  *      &\equiv T^{(\Psi)}_{ab} - \frac{1}{2} g_{ab} g^{cd} T^{(\Psi)}_{cd} \\
      38             :  *      &= \partial_a \Psi \partial_b \Psi ~.
      39             :  * \f}
      40             :  *
      41             :  * Both systems are recast as first-order systems in terms of the variables
      42             :  * \f{align*}{
      43             :  * & g_{ab}~,                                                           \\
      44             :  * & \Pi_{ab} = - \dfrac{1}{\alpha} \left( \partial_t g_{ab} - \beta^k
      45             :  * \partial_k g_{ab} \right)~,                                          \\
      46             :  * & \Phi_{iab} = \partial_i g_{ab}~,                                   \\
      47             :  * & \Psi~,                                                             \\
      48             :  * & \Pi = - \dfrac{1}{\alpha} \left(\partial_t \Psi - \beta^k
      49             :  * \partial_k \Psi \right)~,                                            \\
      50             :  * & \Phi_i = \partial_i \Psi~,
      51             :  * \f}
      52             :  *
      53             :  * where \f$ \alpha \f$ and \f$ \beta^k \f$ are the lapse and shift.
      54             :  *
      55             :  * The computation of the evolution equations is implemented in each system in
      56             :  * gh::TimeDerivative and CurvedScalarWave::TimeDerivative, respectively. We
      57             :  * take the additional step of adding the contribution of the trace-reversed
      58             :  * stress-energy tensor to the evolution equations of the metric.
      59             :  *
      60             :  * \note Although both systems are templated in the spatial dimension, we
      61             :  * only implement this system in three spatial dimensions.
      62             :  */
      63           1 : struct System {
      64           0 :   using boundary_conditions_base = BoundaryConditions::BoundaryCondition;
      65           0 :   static constexpr bool has_primitive_and_conservative_vars = false;
      66           0 :   static constexpr size_t volume_dim = 3;
      67             : 
      68           0 :   using gh_system = gh::System<3_st>;
      69           0 :   using scalar_system = CurvedScalarWave::System<3_st>;
      70             : 
      71           0 :   using variables_tag = ::Tags::Variables<
      72             :       tmpl::append<typename gh_system::variables_tag::tags_list,
      73             :                    typename scalar_system::variables_tag::tags_list>>;
      74             : 
      75           0 :   using flux_variables = tmpl::append<typename gh_system::flux_variables,
      76             :                                       typename scalar_system::flux_variables>;
      77             : 
      78           0 :   using gradient_variables =
      79             :       tmpl::append<typename gh_system::gradient_variables,
      80             :                    typename scalar_system::gradient_variables>;
      81           0 :   using gradients_tags = gradient_variables;
      82             : 
      83           0 :   static constexpr bool is_in_flux_conservative_form = false;
      84             : 
      85           0 :   using compute_largest_characteristic_speed =
      86             :       Tags::ComputeLargestCharacteristicSpeed<>;
      87             : 
      88           0 :   using compute_volume_time_derivative_terms = ScalarTensor::TimeDerivative;
      89           0 :   using inverse_spatial_metric_tag =
      90             :       typename gh_system::inverse_spatial_metric_tag;
      91             : };
      92             : 
      93             : }  // namespace ScalarTensor

Generated by: LCOV version 1.14