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

Generated by: LCOV version 1.14