SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/ScalarTensor - System.hpp Coverage Total Hit
Commit: 0d1d717af84a81fb1284a20c4013708fe85cc2f0 Lines: 6.2 % 16 1
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 <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 :   static std::string name() { return "ScalarTensor"; }
      65              : 
      66            0 :   using boundary_conditions_base = BoundaryConditions::BoundaryCondition;
      67            0 :   static constexpr bool has_primitive_and_conservative_vars = false;
      68            0 :   static constexpr size_t volume_dim = 3;
      69              : 
      70            0 :   using gh_system = gh::System<3_st>;
      71            0 :   using scalar_system = CurvedScalarWave::System<3_st>;
      72              : 
      73            0 :   using variables_tag = ::Tags::Variables<
      74              :       tmpl::append<typename gh_system::variables_tag::tags_list,
      75              :                    typename scalar_system::variables_tag::tags_list>>;
      76              : 
      77            0 :   using flux_variables = tmpl::append<typename gh_system::flux_variables,
      78              :                                       typename scalar_system::flux_variables>;
      79              : 
      80            0 :   using gradient_variables =
      81              :       tmpl::append<typename gh_system::gradient_variables,
      82              :                    typename scalar_system::gradient_variables>;
      83            0 :   using gradients_tags = gradient_variables;
      84              : 
      85            0 :   static constexpr bool is_in_flux_conservative_form = false;
      86              : 
      87            0 :   using compute_largest_characteristic_speed =
      88              :       Tags::ComputeLargestCharacteristicSpeed<>;
      89              : 
      90            0 :   using compute_volume_time_derivative_terms = ScalarTensor::TimeDerivative;
      91            0 :   using inverse_spatial_metric_tag =
      92              :       typename gh_system::inverse_spatial_metric_tag;
      93              : };
      94              : 
      95              : }  // namespace ScalarTensor
        

Generated by: LCOV version 2.0-1