SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Executables/ScalarTensor - ScalarTensorBase.hpp Hit Total Coverage
Commit: 107e15b340886ae54549b1baa4bfc92e676f667e Lines: 0 16 0.0 %
Date: 2026-09-17 16:38:56
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 <vector>
       8             : 
       9             : #include "ControlSystem/Actions/LimitTimeStep.hpp"
      10             : #include "DataStructures/DataBox/PrefixHelpers.hpp"
      11             : #include "DataStructures/DataBox/Tag.hpp"
      12             : #include "DataStructures/Tensor/EagerMath/RaiseOrLowerIndex.hpp"
      13             : #include "Domain/Creators/Factory1D.hpp"
      14             : #include "Domain/Creators/Factory2D.hpp"
      15             : #include "Domain/Creators/Factory3D.hpp"
      16             : #include "Domain/Tags.hpp"
      17             : #include "Domain/TagsCharacteristicSpeeds.hpp"
      18             : #include "Evolution/Actions/RunEventsAndDenseTriggers.hpp"
      19             : #include "Evolution/BoundaryCorrection.hpp"
      20             : #include "Evolution/ComputeTags.hpp"
      21             : #include "Evolution/DiscontinuousGalerkin/Actions/ApplyBoundaryCorrections.hpp"
      22             : #include "Evolution/DiscontinuousGalerkin/Actions/ComputeTimeDerivative.hpp"
      23             : #include "Evolution/DiscontinuousGalerkin/CleanMortarHistory.hpp"
      24             : #include "Evolution/DiscontinuousGalerkin/DgElementArray.hpp"
      25             : #include "Evolution/DiscontinuousGalerkin/EqualRateLts/FixedLtsRatio.hpp"
      26             : #include "Evolution/DiscontinuousGalerkin/EqualRateLts/NonconformingEqualRateRegions.hpp"
      27             : #include "Evolution/DiscontinuousGalerkin/Initialization/Mortars.hpp"
      28             : #include "Evolution/DiscontinuousGalerkin/Initialization/SetupEqualRateRegions.hpp"
      29             : #include "Evolution/DiscontinuousGalerkin/Initialization/SpectralFilters.hpp"
      30             : #include "Evolution/Initialization/DgDomain.hpp"
      31             : #include "Evolution/Initialization/Evolution.hpp"
      32             : #include "Evolution/Initialization/NonconservativeSystem.hpp"
      33             : #include "Evolution/Initialization/SetVariables.hpp"
      34             : #include "Evolution/Systems/CurvedScalarWave/BoundaryConditions/Factory.hpp"
      35             : #include "Evolution/Systems/CurvedScalarWave/Initialize.hpp"
      36             : #include "Evolution/Systems/CurvedScalarWave/PsiSquared.hpp"
      37             : #include "Evolution/Systems/CurvedScalarWave/System.hpp"
      38             : #include "Evolution/Systems/CurvedScalarWave/Tags.hpp"
      39             : #include "Evolution/Systems/GeneralizedHarmonic/Actions/SetInitialData.hpp"
      40             : #include "Evolution/Systems/GeneralizedHarmonic/BoundaryConditions/Factory.hpp"
      41             : #include "Evolution/Systems/GeneralizedHarmonic/Equations.hpp"
      42             : #include "Evolution/Systems/GeneralizedHarmonic/GaugeSourceFunctions/Factory.hpp"
      43             : #include "Evolution/Systems/GeneralizedHarmonic/GaugeSourceFunctions/Gauges.hpp"
      44             : #include "Evolution/Systems/GeneralizedHarmonic/GaugeSourceFunctions/SetPiAndPhiFromConstraints.hpp"
      45             : #include "Evolution/Systems/GeneralizedHarmonic/GaugeSourceFunctions/Tags/GaugeCondition.hpp"
      46             : #include "Evolution/Systems/GeneralizedHarmonic/Initialize.hpp"
      47             : #include "Evolution/Systems/GeneralizedHarmonic/System.hpp"
      48             : #include "Evolution/Systems/GeneralizedHarmonic/Tags.hpp"
      49             : #include "Evolution/Systems/ScalarTensor/Actions/SetInitialData.hpp"
      50             : #include "Evolution/Systems/ScalarTensor/BoundaryConditions/Factory.hpp"
      51             : #include "Evolution/Systems/ScalarTensor/BoundaryCorrections/Factory.hpp"
      52             : #include "Evolution/Systems/ScalarTensor/Constraints.hpp"
      53             : #include "Evolution/Systems/ScalarTensor/Initialize.hpp"
      54             : #include "Evolution/Systems/ScalarTensor/System.hpp"
      55             : #include "Evolution/Systems/ScalarTensor/Tags.hpp"
      56             : #include "Evolution/TypeTraits.hpp"
      57             : #include "IO/Importers/Actions/RegisterWithElementDataReader.hpp"
      58             : #include "IO/Importers/ElementDataReader.hpp"
      59             : #include "IO/Observer/Actions/ObserverRegistration.hpp"
      60             : #include "IO/Observer/Actions/RegisterEvents.hpp"
      61             : #include "IO/Observer/Helpers.hpp"
      62             : #include "IO/Observer/ObserverComponent.hpp"
      63             : #include "IO/Observer/Tags.hpp"
      64             : #include "NumericalAlgorithms/DiscontinuousGalerkin/Tags.hpp"
      65             : #include "NumericalAlgorithms/LinearOperators/Filters/Factory.hpp"
      66             : #include "NumericalAlgorithms/LinearOperators/Filters/Tag.hpp"
      67             : #include "Options/Protocols/FactoryCreation.hpp"
      68             : #include "Options/String.hpp"
      69             : #include "Parallel/Algorithms/AlgorithmSingleton.hpp"
      70             : #include "Parallel/Local.hpp"
      71             : #include "Parallel/Phase.hpp"
      72             : #include "Parallel/PhaseControl/CheckpointAndExitAfterWallclock.hpp"
      73             : #include "Parallel/PhaseControl/ExecutePhaseChange.hpp"
      74             : #include "Parallel/PhaseControl/Factory.hpp"
      75             : #include "Parallel/PhaseControl/VisitAndReturn.hpp"
      76             : #include "Parallel/PhaseDependentActionList.hpp"
      77             : #include "Parallel/Reduction.hpp"
      78             : #include "ParallelAlgorithms/Actions/AddComputeTags.hpp"
      79             : #include "ParallelAlgorithms/Actions/AddSimpleTags.hpp"
      80             : #include "ParallelAlgorithms/Actions/FunctionsOfTimeAreReady.hpp"
      81             : #include "ParallelAlgorithms/Actions/InitializeItems.hpp"
      82             : #include "ParallelAlgorithms/Actions/MemoryMonitor/ContributeMemoryData.hpp"
      83             : #include "ParallelAlgorithms/Actions/MutateApply.hpp"
      84             : #include "ParallelAlgorithms/Actions/RandomizeVariables.hpp"
      85             : #include "ParallelAlgorithms/Actions/SpectralFilter.hpp"
      86             : #include "ParallelAlgorithms/Actions/TerminatePhase.hpp"
      87             : #include "ParallelAlgorithms/Events/ChangeFixedLtsRatio.hpp"
      88             : #include "ParallelAlgorithms/Events/Completion.hpp"
      89             : #include "ParallelAlgorithms/Events/Factory.hpp"
      90             : #include "ParallelAlgorithms/Events/MonitorMemory.hpp"
      91             : #include "ParallelAlgorithms/Events/ObserveTimeStep.hpp"
      92             : #include "ParallelAlgorithms/Events/ObserveTimeStepVolume.hpp"
      93             : #include "ParallelAlgorithms/Events/Tags.hpp"
      94             : #include "ParallelAlgorithms/EventsAndDenseTriggers/DenseTrigger.hpp"
      95             : #include "ParallelAlgorithms/EventsAndDenseTriggers/DenseTriggers/Factory.hpp"
      96             : #include "ParallelAlgorithms/EventsAndTriggers/Event.hpp"
      97             : #include "ParallelAlgorithms/EventsAndTriggers/EventsAndTriggers.hpp"
      98             : #include "ParallelAlgorithms/EventsAndTriggers/LogicalTriggers.hpp"
      99             : #include "ParallelAlgorithms/EventsAndTriggers/Trigger.hpp"
     100             : #include "ParallelAlgorithms/Interpolation/Actions/InitializeInterpolationTarget.hpp"
     101             : #include "ParallelAlgorithms/Interpolation/Callbacks/ObserveTimeSeriesOnSurface.hpp"
     102             : #include "ParallelAlgorithms/Interpolation/InterpolationTarget.hpp"
     103             : #include "ParallelAlgorithms/Interpolation/Tags.hpp"
     104             : #include "PointwiseFunctions/AnalyticData/GhScalarTensor/Factory.hpp"
     105             : #include "PointwiseFunctions/AnalyticSolutions/GeneralRelativity/Factory.hpp"
     106             : #include "PointwiseFunctions/AnalyticSolutions/GeneralRelativity/KerrSchild.hpp"
     107             : #include "PointwiseFunctions/AnalyticSolutions/GeneralRelativity/SphericalKerrSchild.hpp"
     108             : #include "PointwiseFunctions/AnalyticSolutions/GeneralRelativity/WrappedGr.hpp"
     109             : #include "PointwiseFunctions/AnalyticSolutions/Tags.hpp"
     110             : #include "PointwiseFunctions/GeneralRelativity/Christoffel.hpp"
     111             : #include "PointwiseFunctions/GeneralRelativity/DetAndInverseSpatialMetric.hpp"
     112             : #include "PointwiseFunctions/GeneralRelativity/GeneralizedHarmonic/ConstraintDampingTags.hpp"
     113             : #include "PointwiseFunctions/GeneralRelativity/GeneralizedHarmonic/ConstraintGammas.hpp"
     114             : #include "PointwiseFunctions/GeneralRelativity/Psi4Imag.hpp"
     115             : #include "PointwiseFunctions/GeneralRelativity/Psi4Real.hpp"
     116             : #include "PointwiseFunctions/GeneralRelativity/Ricci.hpp"
     117             : #include "PointwiseFunctions/GeneralRelativity/Surfaces/Tags.hpp"
     118             : #include "PointwiseFunctions/GeneralRelativity/Tags.hpp"
     119             : #include "PointwiseFunctions/GeneralRelativity/WeylElectric.hpp"
     120             : #include "PointwiseFunctions/InitialDataUtilities/InitialData.hpp"
     121             : #include "PointwiseFunctions/InitialDataUtilities/Tags/InitialData.hpp"
     122             : #include "PointwiseFunctions/MathFunctions/MathFunction.hpp"
     123             : #include "PointwiseFunctions/ScalarTensor/ConstraintDampingTags.hpp"
     124             : #include "PointwiseFunctions/ScalarTensor/ConstraintGammas.hpp"
     125             : #include "PointwiseFunctions/ScalarTensor/ScalarCharge.hpp"
     126             : #include "PointwiseFunctions/ScalarTensor/ScalarGaussBonnet/Tags.hpp"
     127             : #include "PointwiseFunctions/ScalarTensor/ScalarSource.hpp"
     128             : #include "PointwiseFunctions/ScalarTensor/SourceTags.hpp"
     129             : #include "PointwiseFunctions/ScalarTensor/StressEnergy.hpp"
     130             : #include "Time/Actions/SelfStartActions.hpp"
     131             : #include "Time/ChangeTimeStepperOrder.hpp"
     132             : #include "Time/CleanHistory.hpp"
     133             : #include "Time/RecordTimeStepperData.hpp"
     134             : #include "Time/StepChoosers/Factory.hpp"
     135             : #include "Time/StepChoosers/StepChooser.hpp"
     136             : #include "Time/Tags/Time.hpp"
     137             : #include "Time/TimeSequence.hpp"
     138             : #include "Time/TimeSteppers/Factory.hpp"
     139             : #include "Time/TimeSteppers/TimeStepper.hpp"
     140             : #include "Time/Triggers/TimeTriggers.hpp"
     141             : #include "Time/UpdateU.hpp"
     142             : #include "Utilities/ErrorHandling/Error.hpp"
     143             : #include "Utilities/Functional.hpp"
     144             : #include "Utilities/ProtocolHelpers.hpp"
     145             : #include "Utilities/TMPL.hpp"
     146             : 
     147             : /// \cond
     148             : namespace Frame {
     149             : struct Inertial;
     150             : }  // namespace Frame
     151             : namespace PUP {
     152             : class er;
     153             : }  // namespace PUP
     154             : namespace Parallel {
     155             : template <typename Metavariables>
     156             : class CProxy_GlobalCache;
     157             : }  // namespace Parallel
     158             : /// \endcond
     159             : 
     160             : template <typename EvolutionMetavarsDerived>
     161             : struct ScalarTensorTemplateBase;
     162             : 
     163             : namespace detail {
     164             : constexpr auto make_default_phase_order() {
     165             :   return std::array{Parallel::Phase::Initialization,
     166             :                     Parallel::Phase::RegisterWithElementDataReader,
     167             :                     Parallel::Phase::ImportInitialData,
     168             :                     Parallel::Phase::InitializeInitialDataDependentQuantities,
     169             :                     Parallel::Phase::Register,
     170             :                     Parallel::Phase::InitializeTimeStepperHistory,
     171             :                     Parallel::Phase::Evolve,
     172             :                     Parallel::Phase::Exit};
     173             : }
     174             : 
     175             : struct ObserverTags {
     176             :   static constexpr size_t volume_dim = 3_st;
     177             :   static constexpr bool backreaction_is_enabled = false;
     178             : 
     179             :   using system = ScalarTensor::System;
     180             : 
     181             :   using variables_tag = typename system::variables_tag;
     182             : 
     183             :   using initial_data_list = gh::ScalarTensor::AnalyticData::all_analytic_data;
     184             : 
     185             :   using deriv_compute = ::Tags::DerivCompute<
     186             :       variables_tag, domain::Tags::Mesh<volume_dim>,
     187             :       domain::Tags::InverseJacobian<volume_dim, Frame::ElementLogical,
     188             :                                     Frame::Inertial>,
     189             :       typename system::gradient_variables>;
     190             : 
     191             :   using observe_fields = tmpl::append<
     192             :       tmpl::push_back<
     193             :           system::gh_system::variables_tag::tags_list,
     194             :           ScalarTensor::Tags::CswCompute<CurvedScalarWave::Tags::Psi>,
     195             :           ScalarTensor::Tags::CswCompute<CurvedScalarWave::Tags::Pi>,
     196             :           ScalarTensor::Tags::CswCompute<
     197             :               CurvedScalarWave::Tags::Phi<volume_dim>>,
     198             :           gh::Tags::GaugeH<DataVector, volume_dim, Frame::Inertial>,
     199             :           gh::Tags::SpacetimeDerivGaugeH<DataVector, volume_dim,
     200             :                                          Frame::Inertial>,
     201             :           // 3 plus 1 Tags and derivatives
     202             :           gr::Tags::SpatialMetric<DataVector, volume_dim, Frame::Inertial>,
     203             :           gr::Tags::DetSpatialMetric<DataVector>,
     204             :           gr::Tags::InverseSpatialMetric<DataVector, volume_dim,
     205             :                                          Frame::Inertial>,
     206             :           gr::Tags::Shift<DataVector, volume_dim, Frame::Inertial>,
     207             :           gr::Tags::Lapse<DataVector>,
     208             :           gr::Tags::SqrtDetSpatialMetric<DataVector>,
     209             :           gr::Tags::SpacetimeNormalOneFormCompute<DataVector, volume_dim,
     210             :                                                   Frame::Inertial>,
     211             :           gr::Tags::SpacetimeNormalVector<DataVector, volume_dim,
     212             :                                           Frame::Inertial>,
     213             :           gr::Tags::InverseSpacetimeMetric<DataVector, volume_dim,
     214             :                                            Frame::Inertial>,
     215             :           ::Tags::deriv<
     216             :               gr::Tags::SpatialMetric<DataVector, volume_dim, Frame::Inertial>,
     217             :               tmpl::size_t<volume_dim>, Frame::Inertial>,
     218             :           gr::Tags::SpatialChristoffelFirstKind<DataVector, volume_dim,
     219             :                                                 Frame::Inertial>,
     220             :           gr::Tags::SpatialChristoffelSecondKind<DataVector, volume_dim,
     221             :                                                  Frame::Inertial>,
     222             :           // 3 plus 1 variables used by CSW
     223             :           gr::Tags::TraceSpatialChristoffelSecondKind<DataVector, volume_dim,
     224             :                                                       Frame::Inertial>,
     225             :           gr::Tags::ExtrinsicCurvature<DataVector, volume_dim, Frame::Inertial>,
     226             :           gr::Tags::TraceExtrinsicCurvature<DataVector>,
     227             :           // More 3 plus 1 variables
     228             :           ::Tags::deriv<gr::Tags::SpatialChristoffelSecondKind<
     229             :                             DataVector, volume_dim, Frame::Inertial>,
     230             :                         tmpl::size_t<volume_dim>, Frame::Inertial>,
     231             :           gr::Tags::SpatialRicci<DataVector, volume_dim, Frame::Inertial>,
     232             :           gr::Tags::SpatialRicciScalar<DataVector>,
     233             :           // Compute the constraints of GH
     234             :           gh::Tags::GaugeConstraintCompute<volume_dim, Frame::Inertial>,
     235             :           gh::Tags::TwoIndexConstraintCompute<volume_dim, Frame::Inertial>,
     236             :           gh::Tags::ThreeIndexConstraintCompute<volume_dim, Frame::Inertial>,
     237             :           // Compute the constraints of CSW
     238             :           ScalarTensor::Tags::CswOneIndexConstraintCompute<volume_dim>,
     239             :           ScalarTensor::Tags::CswTwoIndexConstraintCompute<volume_dim>,
     240             :           // GH constraint norms
     241             :           ::Tags::PointwiseL2NormCompute<gh::Tags::GaugeConstraint<
     242             :               DataVector, volume_dim, Frame::Inertial>>,
     243             :           ::Tags::PointwiseL2NormCompute<gh::Tags::TwoIndexConstraint<
     244             :               DataVector, volume_dim, Frame::Inertial>>,
     245             :           ::Tags::PointwiseL2NormCompute<gh::Tags::ThreeIndexConstraint<
     246             :               DataVector, volume_dim, Frame::Inertial>>,
     247             :           // CSW constraint norms
     248             :           ::Tags::PointwiseL2NormCompute<ScalarTensor::Tags::Csw<
     249             :               CurvedScalarWave::Tags::OneIndexConstraint<volume_dim>>>,
     250             :           ::Tags::PointwiseL2NormCompute<ScalarTensor::Tags::Csw<
     251             :               CurvedScalarWave::Tags::TwoIndexConstraint<volume_dim>>>,
     252             :           // Damping parameters
     253             :           gh::Tags::ConstraintGamma0, gh::Tags::ConstraintGamma1,
     254             :           gh::Tags::ConstraintGamma2,
     255             :           ScalarTensor::Tags::CswCompute<
     256             :               CurvedScalarWave::Tags::ConstraintGamma1>,
     257             :           ScalarTensor::Tags::CswCompute<
     258             :               CurvedScalarWave::Tags::ConstraintGamma2>,
     259             :           // Sources
     260             :           ScalarTensor::Tags::TraceReversedStressEnergyCompute,
     261             :           ScalarTensor::Tags::ScalarSource,
     262             : 
     263             :           ::domain::Tags::Coordinates<volume_dim, Frame::Grid>,
     264             :           ::domain::Tags::Coordinates<volume_dim, Frame::Inertial>>,
     265             :       // The 4-index constraint is only implemented in 3d
     266             :       tmpl::list<
     267             :           tmpl::conditional_t<
     268             :               backreaction_is_enabled,
     269             :               ScalarTensor::Tags::FConstraintCompute<
     270             :                   volume_dim, Frame::Inertial>,
     271             :               gh::Tags::FConstraintCompute<volume_dim, Frame::Inertial>>,
     272             :           gh::Tags::FourIndexConstraintCompute<volume_dim, Frame::Inertial>,
     273             :           ::Tags::PointwiseL2NormCompute<
     274             :               gh::Tags::FConstraint<DataVector, volume_dim>>,
     275             :           ::Tags::PointwiseL2NormCompute<
     276             :               gh::Tags::FourIndexConstraint<DataVector, volume_dim>>,
     277             :           gh::Tags::ConstraintEnergyCompute<volume_dim, Frame::Inertial>,
     278             :           ::Tags::deriv<gr::Tags::ExtrinsicCurvature<DataVector, volume_dim,
     279             :                                                      Frame::Inertial>,
     280             :                         tmpl::size_t<volume_dim>, Frame::Inertial>,
     281             :           gr::Tags::CovariantDerivativeOfExtrinsicCurvature<
     282             :               DataVector, volume_dim, Frame::Inertial>,
     283             :           gr::Tags::WeylElectric<DataVector, volume_dim, Frame::Inertial>,
     284             :           gr::Tags::WeylElectricScalar<DataVector>,
     285             :           gr::Tags::WeylMagneticScalar<DataVector>,
     286             :           gr::Tags::Psi4RealCompute<Frame::Inertial>,
     287             :           gr::Tags::Psi4ImagCompute<Frame::Inertial>>>;
     288             :   using non_tensor_compute_tags = tmpl::list<
     289             :       ::Events::Tags::ObserverMeshCompute<volume_dim>,
     290             :       ::Events::Tags::ObserverCoordinatesCompute<volume_dim, Frame::Inertial>,
     291             :       ::Events::Tags::ObserverInverseJacobianCompute<
     292             :           volume_dim, Frame::ElementLogical, Frame::Inertial>,
     293             :       ::Events::Tags::ObserverJacobianCompute<volume_dim, Frame::ElementLogical,
     294             :                                               Frame::Inertial>,
     295             :       ::Events::Tags::ObserverDetInvJacobianCompute<Frame::ElementLogical,
     296             :                                                     Frame::Inertial>,
     297             :       ::Events::Tags::ObserverMeshVelocityCompute<volume_dim, Frame::Inertial>,
     298             :       gh::gauges::Tags::GaugeAndDerivativeCompute<
     299             :           volume_dim, gh::ScalarTensor::AnalyticData::all_analytic_data>>;
     300             : 
     301             :   using field_observations =
     302             :       dg::Events::field_observations<volume_dim, observe_fields,
     303             :                                      non_tensor_compute_tags>;
     304             : 
     305             :   // We collect here all the tags needed for interpolation in all surfaces
     306             :   using scalar_charge_vars_to_interpolate_to_target = tmpl::list<
     307             :       gr::Tags::SpatialMetric<DataVector, volume_dim, Frame::Inertial>,
     308             :       gr::Tags::InverseSpatialMetric<DataVector, volume_dim, Frame::Inertial>,
     309             :       CurvedScalarWave::Tags::Phi<volume_dim>, CurvedScalarWave::Tags::Psi>;
     310             : 
     311             :   using scalar_charge_compute_items_on_target = tmpl::list<
     312             :       ylm::Tags::ThetaPhiCompute<::Frame::Inertial>,
     313             :       ylm::Tags::RadiusCompute<::Frame::Inertial>,
     314             :       ylm::Tags::RhatCompute<::Frame::Inertial>,
     315             :       ylm::Tags::InvJacobianCompute<::Frame::Inertial>,
     316             :       ylm::Tags::JacobianCompute<::Frame::Inertial>,
     317             :       ylm::Tags::DxRadiusCompute<::Frame::Inertial>,
     318             :       ylm::Tags::NormalOneFormCompute<::Frame::Inertial>,
     319             :       ylm::Tags::OneOverOneFormMagnitudeCompute<DataVector, volume_dim,
     320             :                                                 ::Frame::Inertial>,
     321             :       ylm::Tags::UnitNormalOneFormCompute<::Frame::Inertial>,
     322             :       ylm::Tags::UnitNormalVectorCompute<::Frame::Inertial>,
     323             :       gr::surfaces::Tags::AreaElementCompute<::Frame::Inertial>,
     324             :       ScalarTensor::StrahlkorperScalar::Tags::ScalarChargeIntegrandCompute,
     325             :       gr::surfaces::Tags::SurfaceIntegralCompute<
     326             :           ScalarTensor::StrahlkorperScalar::Tags::ScalarChargeIntegrand,
     327             :           ::Frame::Inertial>,
     328             :       gr::surfaces::Tags::SurfaceIntegralCompute<CurvedScalarWave::Tags::Psi,
     329             :                                                  ::Frame::Inertial>,
     330             :       CurvedScalarWave::Tags::PsiSquaredCompute,
     331             :       gr::surfaces::Tags::SurfaceIntegralCompute<
     332             :           CurvedScalarWave::Tags::PsiSquared, ::Frame::Inertial>>;
     333             : 
     334             :   using scalar_charge_surface_obs_tags = tmpl::list<
     335             :       gr::surfaces::Tags::SurfaceIntegral<
     336             :           ScalarTensor::StrahlkorperScalar::Tags::ScalarChargeIntegrand,
     337             :           ::Frame::Inertial>,
     338             :       gr::surfaces::Tags::SurfaceIntegral<CurvedScalarWave::Tags::Psi,
     339             :                                           ::Frame::Inertial>,
     340             :       gr::surfaces::Tags::SurfaceIntegral<CurvedScalarWave::Tags::PsiSquared,
     341             :                                           ::Frame::Inertial>>;
     342             : };
     343             : 
     344             : struct FactoryCreation : tt::ConformsTo<Options::protocols::FactoryCreation> {
     345             :   static constexpr size_t volume_dim = 3_st;
     346             : 
     347             :   using system = ScalarTensor::System;
     348             : 
     349             :   using initial_data_list = gh::ScalarTensor::AnalyticData::all_analytic_data;
     350             :   using factory_classes = tmpl::map<
     351             :       tmpl::pair<DenseTrigger, DenseTriggers::standard_dense_triggers>,
     352             :       tmpl::pair<DomainCreator<volume_dim>, domain_creators<volume_dim>>,
     353             :       tmpl::pair<Event,
     354             :                  tmpl::flatten<tmpl::list<
     355             :                      Events::Completion, Events::MonitorMemory<volume_dim>,
     356             :                      typename detail::ObserverTags::field_observations,
     357             :                      Events::time_events<system>,
     358             :                      dg::Events::ObserveTimeStepVolume<system>,
     359             :                      dg::Events::ChangeFixedLtsRatio<volume_dim>>>>,
     360             :       tmpl::pair<
     361             :           evolution::BoundaryCorrection,
     362             :           ScalarTensor::BoundaryCorrections::standard_boundary_corrections>,
     363             :       tmpl::pair<
     364             :           ScalarTensor::BoundaryConditions::BoundaryCondition,
     365             :           ScalarTensor::BoundaryConditions::standard_boundary_conditions>,
     366             :       tmpl::pair<gh::gauges::GaugeCondition, gh::gauges::all_gauges>,
     367             :       tmpl::pair<MathFunction<1, Frame::Inertial>, tmpl::list<>>,
     368             :       tmpl::pair<
     369             :           evolution::initial_data::InitialData,
     370             :           tmpl::push_back<initial_data_list, ScalarTensor::NumericInitialData>>,
     371             :       tmpl::pair<PhaseChange, PhaseControl::factory_creatable_classes>,
     372             :       tmpl::pair<StepChooser<StepChooserUse::LtsStep>,
     373             :                  StepChoosers::standard_step_choosers<system>>,
     374             :       tmpl::pair<StepChooser<StepChooserUse::Slab>,
     375             :                  tmpl::push_back<
     376             :                      StepChoosers::standard_slab_choosers<system>,
     377             :                      evolution::dg::StepChoosers::FixedLtsRatio<volume_dim>>>,
     378             :       tmpl::pair<TimeSequence<double>,
     379             :                  TimeSequences::all_time_sequences<double>>,
     380             :       tmpl::pair<TimeSequence<std::uint64_t>,
     381             :                  TimeSequences::all_time_sequences<std::uint64_t>>,
     382             :       tmpl::pair<TimeStepper, TimeSteppers::time_steppers>,
     383             :       tmpl::pair<Trigger, tmpl::append<Triggers::logical_triggers,
     384             :                                        Triggers::time_triggers>>,
     385             :       tmpl::pair<Filters::Filter<volume_dim,
     386             :                                  typename system::variables_tag::tags_list>,
     387             :                  Filters::all_filters<
     388             :                      volume_dim, typename system::variables_tag::tags_list>>>;
     389             : };
     390             : }  // namespace detail
     391             : 
     392             : template <class EvolutionMetavarsDerived>
     393           0 : struct ScalarTensorTemplateBase {
     394           0 :   using derived_metavars = EvolutionMetavarsDerived;
     395             : 
     396           0 :   static constexpr size_t volume_dim = 3_st;
     397           0 :   using system = ScalarTensor::System;
     398             : 
     399           0 :   static constexpr bool use_dg_element_collection = false;
     400             : 
     401             :   // NOLINTNEXTLINE(google-runtime-references)
     402           0 :   void pup(PUP::er& /*p*/) {}
     403             : 
     404           0 :   using factory_creation = detail::FactoryCreation;
     405             : 
     406           0 :   using observed_reduction_data_tags =
     407             :       observers::collect_reduction_data_tags<tmpl::push_back<
     408             :           tmpl::at<typename factory_creation::factory_classes, Event>>>;
     409             : 
     410           0 :   using initialize_initial_data_dependent_quantities_actions = tmpl::list<
     411             :       ScalarTensor::Actions::InitializeGhAnd3Plus1Variables,
     412             :       gh::gauges::SetPiAndPhiFromConstraints<
     413             :           gh::ScalarTensor::AnalyticData::all_analytic_data, volume_dim>,
     414             :       Parallel::Actions::TerminatePhase>;
     415             : 
     416             :   // A tmpl::list of tags to be added to the GlobalCache by the
     417             :   // metavariables
     418           0 :   using const_global_cache_tags = tmpl::list<
     419             :       gh::gauges::Tags::GaugeCondition,
     420             :       evolution::initial_data::Tags::InitialData,
     421             :       gh::Tags::DampingFunctionGamma0<volume_dim, Frame::Grid>,
     422             :       gh::Tags::DampingFunctionGamma1<volume_dim, Frame::Grid>,
     423             :       gh::Tags::DampingFunctionGamma2<volume_dim, Frame::Grid>,
     424             :       ScalarTensor::Tags::DampingFunctionGamma1<volume_dim, Frame::Grid>,
     425             :       ScalarTensor::Tags::DampingFunctionGamma2<volume_dim, Frame::Grid>,
     426             :       // Source parameters
     427             :       ScalarTensor::Tags::RampUpParameters,
     428             :       ScalarTensor::Tags::CouplingParameters, ScalarTensor::Tags::ScalarMass>;
     429             : 
     430           0 :   using dg_registration_list =
     431             :       tmpl::list<observers::Actions::RegisterEventsWithObservers>;
     432             : 
     433           0 :   using equal_rate_regions =
     434             :       tmpl::list<evolution::dg::NonconformingEqualRateRegions<volume_dim>>;
     435             : 
     436           0 :   static constexpr auto default_phase_order =
     437             :       detail::make_default_phase_order();
     438             : 
     439             :   template <typename ControlSystems>
     440           0 :   using step_actions = tmpl::list<
     441             :       evolution::dg::Actions::ComputeTimeDerivative<
     442             :           volume_dim, system, AllStepChoosers, use_dg_element_collection>,
     443             :       evolution::dg::Actions::ApplyBoundaryCorrectionsToTimeDerivative<
     444             :           volume_dim, use_dg_element_collection>,
     445             :       Actions::MutateApply<RecordTimeStepperData<system>>,
     446             :       evolution::Actions::RunEventsAndDenseTriggers<tmpl::list<
     447             :           ::domain::CheckFunctionsOfTimeAreReadyPostprocessor<volume_dim>,
     448             :           evolution::dg::ApplyLtsDenseBoundaryCorrections<derived_metavars>>>,
     449             :       control_system::Actions::LimitTimeStep<ControlSystems>,
     450             :       Actions::MutateApply<UpdateU<system>>,
     451             :       evolution::dg::Actions::ApplyLtsBoundaryCorrections<
     452             :           volume_dim, use_dg_element_collection>,
     453             :       Actions::MutateApply<ChangeTimeStepperOrder<system>>,
     454             :       Actions::MutateApply<CleanHistory<system>>,
     455             :       Actions::MutateApply<evolution::dg::CleanMortarHistory<volume_dim>>,
     456             :       dg::Actions::SpectralFilter<volume_dim,
     457             :                                   typename system::variables_tag::tags_list>>;
     458             : 
     459             :   template <bool UseControlSystems>
     460           0 :   using initialization_actions = tmpl::list<
     461             :       Initialization::Actions::InitializeItems<
     462             :           Initialization::TimeStepping<derived_metavars, TimeStepper,
     463             :                                        UseControlSystems, true>,
     464             :           evolution::dg::Initialization::Domain<derived_metavars,
     465             :                                                 UseControlSystems>>,
     466             :       Initialization::Actions::NonconservativeSystem<system>,
     467             :       Initialization::Actions::InitializeItems<
     468             :           Initialization::TimeStepperHistory<system>>,
     469             :       Initialization::Actions::AddComputeTags<::Tags::DerivCompute<
     470             :           typename system::variables_tag, domain::Tags::Mesh<volume_dim>,
     471             :           domain::Tags::InverseJacobian<volume_dim, Frame::ElementLogical,
     472             :                                         Frame::Inertial>,
     473             :           typename system::gradient_variables>>,
     474             :       Initialization::Actions::AddComputeTags<
     475             :           StepChoosers::step_chooser_compute_tags<ScalarTensorTemplateBase>>,
     476             :       ::evolution::dg::Initialization::Mortars<volume_dim>,
     477             :       evolution::dg::Initialization::Actions::SetupEqualRateRegions<
     478             :           derived_metavars, volume_dim, equal_rate_regions>,
     479             :       evolution::Actions::InitializeRunEventsAndDenseTriggers,
     480             :       Initialization::Actions::InitializeItems<
     481             :           evolution::dg::Initialization::SpectralFilters<
     482             :               volume_dim, typename system::variables_tag::tags_list>>,
     483             :       Parallel::Actions::TerminatePhase>;
     484             : };

Generated by: LCOV version 1.14