SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/ScalarTensor - Initialize.hpp Coverage Total Hit
Commit: 0d1d717af84a81fb1284a20c4013708fe85cc2f0 Lines: 27.3 % 11 3
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              : #include <optional>
       8              : 
       9              : #include "DataStructures/Tensor/Tensor.hpp"
      10              : #include "Evolution/Systems/GeneralizedHarmonic/Constraints.hpp"
      11              : #include "Evolution/Systems/GeneralizedHarmonic/System.hpp"
      12              : #include "Evolution/Systems/GeneralizedHarmonic/Tags.hpp"
      13              : #include "Evolution/Systems/ScalarTensor/Tags.hpp"
      14              : #include "Parallel/AlgorithmExecution.hpp"
      15              : #include "Parallel/GlobalCache.hpp"
      16              : #include "PointwiseFunctions/GeneralRelativity/Christoffel.hpp"
      17              : #include "PointwiseFunctions/GeneralRelativity/DerivativesOfSpacetimeMetric.hpp"
      18              : #include "PointwiseFunctions/GeneralRelativity/DetAndInverseSpatialMetric.hpp"
      19              : #include "PointwiseFunctions/GeneralRelativity/ExtrinsicCurvature.hpp"
      20              : #include "PointwiseFunctions/GeneralRelativity/GeneralizedHarmonic/ConstraintDampingTags.hpp"
      21              : #include "PointwiseFunctions/GeneralRelativity/GeneralizedHarmonic/ConstraintGammas.hpp"
      22              : #include "PointwiseFunctions/GeneralRelativity/GeneralizedHarmonic/DerivSpatialMetric.hpp"
      23              : #include "PointwiseFunctions/GeneralRelativity/GeneralizedHarmonic/ExtrinsicCurvature.hpp"
      24              : #include "PointwiseFunctions/GeneralRelativity/GeneralizedHarmonic/SpatialDerivOfLapse.hpp"
      25              : #include "PointwiseFunctions/GeneralRelativity/GeneralizedHarmonic/SpatialDerivOfShift.hpp"
      26              : #include "PointwiseFunctions/GeneralRelativity/InverseSpacetimeMetric.hpp"
      27              : #include "PointwiseFunctions/GeneralRelativity/Lapse.hpp"
      28              : #include "PointwiseFunctions/GeneralRelativity/Ricci.hpp"
      29              : #include "PointwiseFunctions/GeneralRelativity/Shift.hpp"
      30              : #include "PointwiseFunctions/GeneralRelativity/SpacetimeMetric.hpp"
      31              : #include "PointwiseFunctions/GeneralRelativity/SpacetimeNormalOneForm.hpp"
      32              : #include "PointwiseFunctions/GeneralRelativity/SpacetimeNormalVector.hpp"
      33              : #include "PointwiseFunctions/GeneralRelativity/SpatialMetric.hpp"
      34              : #include "PointwiseFunctions/GeneralRelativity/Tags.hpp"
      35              : #include "PointwiseFunctions/GeneralRelativity/WeylElectric.hpp"
      36              : #include "PointwiseFunctions/GeneralRelativity/WeylMagnetic.hpp"
      37              : #include "PointwiseFunctions/ScalarTensor/ConstraintDampingTags.hpp"
      38              : #include "PointwiseFunctions/ScalarTensor/ConstraintGammas.hpp"
      39              : #include "PointwiseFunctions/ScalarTensor/ScalarGaussBonnet/ScalarSource.hpp"
      40              : #include "PointwiseFunctions/ScalarTensor/ScalarGaussBonnet/Tags.hpp"
      41              : #include "PointwiseFunctions/ScalarTensor/SourceTags.hpp"
      42              : #include "Utilities/TMPL.hpp"
      43              : 
      44              : /// \cond
      45              : namespace Parallel {
      46              : template <typename Metavariables>
      47              : class GlobalCache;
      48              : }  // namespace Parallel
      49              : /// \endcond
      50              : 
      51              : namespace ScalarTensor {
      52            0 : namespace Initialization {
      53              : /// \brief List of basic compute tags to initialize the the ScalarTensor without
      54              : /// scalar sources
      55              : template <size_t Dim, typename Fr = Frame::Inertial>
      56            1 : using scalar_tensor_basic_compute_tags = tmpl::list<
      57              :     // Needed to compute the characteristic speeds for the AH finder
      58              :     gr::Tags::SpatialMetricCompute<DataVector, Dim, Fr>,
      59              :     gr::Tags::DetAndInverseSpatialMetricCompute<DataVector, Dim, Fr>,
      60              :     gr::Tags::ShiftCompute<DataVector, Dim, Fr>,
      61              :     gr::Tags::LapseCompute<DataVector, Dim, Fr>,
      62              : 
      63              :     gr::Tags::SpacetimeNormalVectorCompute<DataVector, Dim, Fr>,
      64              :     gh::Tags::DerivLapseCompute<Dim, Fr>,
      65              : 
      66              :     gr::Tags::InverseSpacetimeMetricCompute<DataVector, Dim, Fr>,
      67              :     gh::Tags::DerivShiftCompute<Dim, Fr>,
      68              : 
      69              :     gh::Tags::DerivSpatialMetricCompute<Dim, Fr>,
      70              : 
      71              :     // Compute tags for Trace of Christoffel and Extrinsic curvature
      72              :     gr::Tags::SpatialChristoffelFirstKindCompute<DataVector, Dim, Fr>,
      73              :     gr::Tags::SpatialChristoffelSecondKindCompute<DataVector, Dim, Fr>,
      74              :     gr::Tags::TraceSpatialChristoffelSecondKindCompute<DataVector, Dim, Fr>,
      75              :     gh::Tags::ExtrinsicCurvatureCompute<Dim, Fr>,
      76              :     gh::Tags::TraceExtrinsicCurvatureCompute<Dim, Fr>,
      77              : 
      78              :     // Compute constraint damping parameters.
      79              :     gh::Tags::ConstraintGamma0Compute<Dim, Frame::Grid>,
      80              :     gh::Tags::ConstraintGamma1Compute<Dim, Frame::Grid>,
      81              :     gh::Tags::ConstraintGamma2Compute<Dim, Frame::Grid>,
      82              : 
      83              :     ScalarTensor::Tags::ConstraintGamma1Compute<Dim, Frame::Grid>,
      84              :     ScalarTensor::Tags::ConstraintGamma2Compute<Dim, Frame::Grid>,
      85              : 
      86              :     ScalarTensor::Tags::ScalarSourceCompute>;
      87              : 
      88              : /// \brief List of compute tags to the coupling to curvature
      89              : template <size_t Dim, typename Fr = Frame::Inertial>
      90            1 : using sgb_extra_compute_tags = tmpl::list<
      91              :     ::Tags::DerivTensorCompute<
      92              :         gr::Tags::ExtrinsicCurvature<DataVector, Dim, Fr>,
      93              :         ::domain::Tags::InverseJacobian<Dim, ::Frame::ElementLogical,
      94              :                                         ::Frame::Inertial>,
      95              :         ::domain::Tags::Mesh<Dim>>,
      96              :     gr::Tags::CovariantDerivativeOfExtrinsicCurvatureCompute<Dim, Fr>,
      97              :     ::Tags::DerivTensorCompute<
      98              :         gr::Tags::SpatialChristoffelSecondKind<DataVector, Dim, Fr>,
      99              :         ::domain::Tags::InverseJacobian<Dim, Frame::ElementLogical,
     100              :                                         Frame::Inertial>,
     101              :         ::domain::Tags::Mesh<Dim>>,
     102              :     gr::Tags::SpatialRicciCompute<DataVector, Dim, Fr>,
     103              :     gr::Tags::SpatialRicciScalarCompute<DataVector, Dim, Fr>,
     104              :     gr::Tags::WeylElectricCompute<DataVector, Dim, Fr>,
     105              :     gr::Tags::WeylElectricScalarCompute<DataVector, Dim, Fr>,
     106              :     gr::Tags::SqrtDetSpatialMetricCompute<DataVector, Dim, Fr>,
     107              :     gr::Tags::WeylMagneticCompute<DataVector, Dim, Fr>,
     108              :     gr::Tags::WeylMagneticScalarCompute<DataVector, Dim, Fr>>;
     109              : 
     110              : /// \brief List of compute tags to be initialized in the ScalarTensor system
     111              : ///
     112              : /// \details The compute tags required include those specified in
     113              : /// ::gh::Actions::InitializeGhAnd3Plus1Variables as well as the tags required
     114              : /// to compute spacetime quantities appearing in the scalar evolution equations.
     115              : /// Namely, we include the compute tags associated to the trace of the extrinsic
     116              : /// curvature and the trace of the spatial Christoffel symbol, as well as the
     117              : /// compute tag required to calculate the source term of the scalar equation.
     118              : template <size_t Dim, typename Fr = Frame::Inertial>
     119            1 : using scalar_tensor_3plus1_compute_tags =
     120              :     tmpl::append<scalar_tensor_basic_compute_tags<Dim, Fr>,
     121              :                  sgb_extra_compute_tags<Dim, Fr>>;
     122              : }  // namespace Initialization
     123              : 
     124              : namespace Actions {
     125            0 : struct InitializeGhAnd3Plus1Variables {
     126            0 :   static constexpr size_t volume_dim = 3;
     127            0 :   using frame = Frame::Inertial;
     128            0 :   using compute_tags = db::AddComputeTags<
     129              :       Initialization::scalar_tensor_3plus1_compute_tags<volume_dim, frame>>;
     130              : 
     131            0 :   using const_global_cache_tags = tmpl::list<
     132              :       gh::Tags::DampingFunctionGamma0<volume_dim, Frame::Grid>,
     133              :       gh::Tags::DampingFunctionGamma1<volume_dim, Frame::Grid>,
     134              :       gh::Tags::DampingFunctionGamma2<volume_dim, Frame::Grid>,
     135              :       ScalarTensor::Tags::DampingFunctionGamma1<volume_dim, Frame::Grid>,
     136              :       ScalarTensor::Tags::DampingFunctionGamma2<volume_dim, Frame::Grid>,
     137              :       ScalarTensor::Tags::RampUpParameters,
     138              :       ScalarTensor::Tags::CouplingParameters, ScalarTensor::Tags::ScalarMass>;
     139              : 
     140              :   template <typename DbTagsList, typename... InboxTags, typename Metavariables,
     141              :             typename ArrayIndex, typename ActionList,
     142              :             typename ParallelComponent>
     143            0 :   static Parallel::iterable_action_return_t apply(
     144              :       db::DataBox<DbTagsList>& /*box*/,
     145              :       const tuples::TaggedTuple<InboxTags...>& /*inboxes*/,
     146              :       const Parallel::GlobalCache<Metavariables>& /*cache*/,
     147              :       const ArrayIndex& /*array_index*/, const ActionList /*meta*/,
     148              :       const ParallelComponent* const /*meta*/) {
     149              :     return {Parallel::AlgorithmExecution::Continue, std::nullopt};
     150              :   }
     151              : };
     152              : }  // namespace Actions
     153              : 
     154              : }  // namespace ScalarTensor
        

Generated by: LCOV version 2.0-1