SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Executables/GrMhd/GhValenciaDivClean - GhValenciaDivCleanBase.hpp Hit Total Coverage
Commit: c428a3e2e0ca78fe0364ec1b0e0493c627d428d4 Lines: 0 82 0.0 %
Date: 2026-04-26 20:20:36
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/GridCenters.hpp"
      10             : #include "ControlSystem/Actions/InitializeMeasurements.hpp"
      11             : #include "ControlSystem/Actions/LimitTimeStep.hpp"
      12             : #include "ControlSystem/CleanFunctionsOfTime.hpp"
      13             : #include "ControlSystem/Component.hpp"
      14             : #include "ControlSystem/Measurements/BNSCenterOfMass.hpp"
      15             : #include "ControlSystem/Metafunctions.hpp"
      16             : #include "ControlSystem/Systems/Expansion.hpp"
      17             : #include "ControlSystem/Systems/GridCenters.hpp"
      18             : #include "ControlSystem/Systems/Rotation.hpp"
      19             : #include "ControlSystem/Systems/Translation.hpp"
      20             : #include "ControlSystem/Trigger.hpp"
      21             : #include "DataStructures/DataBox/PrefixHelpers.hpp"
      22             : #include "DataStructures/DataBox/Tag.hpp"
      23             : #include "DataStructures/Tensor/EagerMath/RaiseOrLowerIndex.hpp"
      24             : #include "DataStructures/Tensor/IndexType.hpp"
      25             : #include "Domain/Creators/BinaryCompactObject.hpp"
      26             : #include "Domain/Creators/Factory3D.hpp"
      27             : #include "Domain/Tags.hpp"
      28             : #include "Evolution/Actions/RunEventsAndDenseTriggers.hpp"
      29             : #include "Evolution/Actions/RunEventsAndTriggers.hpp"
      30             : #include "Evolution/BoundaryCorrection.hpp"
      31             : #include "Evolution/ComputeTags.hpp"
      32             : #include "Evolution/Conservative/UpdateConservatives.hpp"
      33             : #include "Evolution/Conservative/UpdatePrimitives.hpp"
      34             : #include "Evolution/DgSubcell/Actions/Initialize.hpp"
      35             : #include "Evolution/DgSubcell/Actions/Labels.hpp"
      36             : #include "Evolution/DgSubcell/Actions/ReconstructionCommunication.hpp"
      37             : #include "Evolution/DgSubcell/Actions/SelectNumericalMethod.hpp"
      38             : #include "Evolution/DgSubcell/Actions/TakeTimeStep.hpp"
      39             : #include "Evolution/DgSubcell/Actions/TciAndRollback.hpp"
      40             : #include "Evolution/DgSubcell/Actions/TciAndSwitchToDg.hpp"
      41             : #include "Evolution/DgSubcell/CartesianFluxDivergence.hpp"
      42             : #include "Evolution/DgSubcell/CellCenteredFlux.hpp"
      43             : #include "Evolution/DgSubcell/ComputeBoundaryTerms.hpp"
      44             : #include "Evolution/DgSubcell/CorrectPackagedData.hpp"
      45             : #include "Evolution/DgSubcell/DisableLts.hpp"
      46             : #include "Evolution/DgSubcell/GetActiveTag.hpp"
      47             : #include "Evolution/DgSubcell/NeighborReconstructedFaceSolution.hpp"
      48             : #include "Evolution/DgSubcell/PerssonTci.hpp"
      49             : #include "Evolution/DgSubcell/PrepareNeighborData.hpp"
      50             : #include "Evolution/DgSubcell/SetInterpolators.hpp"
      51             : #include "Evolution/DgSubcell/Tags/ObserverCoordinates.hpp"
      52             : #include "Evolution/DgSubcell/Tags/ObserverMesh.hpp"
      53             : #include "Evolution/DgSubcell/Tags/ObserverMeshVelocity.hpp"
      54             : #include "Evolution/DgSubcell/Tags/TciStatus.hpp"
      55             : #include "Evolution/DgSubcell/TwoMeshRdmpTci.hpp"
      56             : #include "Evolution/DiscontinuousGalerkin/Actions/ApplyBoundaryCorrections.hpp"
      57             : #include "Evolution/DiscontinuousGalerkin/Actions/ComputeTimeDerivative.hpp"
      58             : #include "Evolution/DiscontinuousGalerkin/CleanMortarHistory.hpp"
      59             : #include "Evolution/DiscontinuousGalerkin/DgElementArray.hpp"
      60             : #include "Evolution/DiscontinuousGalerkin/Initialization/Mortars.hpp"
      61             : #include "Evolution/DiscontinuousGalerkin/Initialization/QuadratureTag.hpp"
      62             : #include "Evolution/DiscontinuousGalerkin/UsingSubcell.hpp"
      63             : #include "Evolution/Initialization/ConservativeSystem.hpp"
      64             : #include "Evolution/Initialization/DgDomain.hpp"
      65             : #include "Evolution/Initialization/Evolution.hpp"
      66             : #include "Evolution/Initialization/NonconservativeSystem.hpp"
      67             : #include "Evolution/Initialization/SetVariables.hpp"
      68             : #include "Evolution/NumericInitialData.hpp"
      69             : #include "Evolution/Systems/Cce/Callbacks/DumpBondiSachsOnWorldtube.hpp"
      70             : #include "Evolution/Systems/GeneralizedHarmonic/BoundaryConditions/Factory.hpp"
      71             : #include "Evolution/Systems/GeneralizedHarmonic/Equations.hpp"
      72             : #include "Evolution/Systems/GeneralizedHarmonic/GaugeSourceFunctions/Factory.hpp"
      73             : #include "Evolution/Systems/GeneralizedHarmonic/GaugeSourceFunctions/Gauges.hpp"
      74             : #include "Evolution/Systems/GeneralizedHarmonic/GaugeSourceFunctions/SetPiAndPhiFromConstraints.hpp"
      75             : #include "Evolution/Systems/GeneralizedHarmonic/GaugeSourceFunctions/Tags/GaugeCondition.hpp"
      76             : #include "Evolution/Systems/GeneralizedHarmonic/Initialize.hpp"
      77             : #include "Evolution/Systems/GeneralizedHarmonic/System.hpp"
      78             : #include "Evolution/Systems/GeneralizedHarmonic/Tags.hpp"
      79             : #include "Evolution/Systems/GrMhd/GhValenciaDivClean/Actions/SetInitialData.hpp"
      80             : #include "Evolution/Systems/GrMhd/GhValenciaDivClean/AllSolutions.hpp"
      81             : #include "Evolution/Systems/GrMhd/GhValenciaDivClean/BoundaryConditions/Factory.hpp"
      82             : #include "Evolution/Systems/GrMhd/GhValenciaDivClean/BoundaryCorrections/Factory.hpp"
      83             : #include "Evolution/Systems/GrMhd/GhValenciaDivClean/FiniteDifference/Tag.hpp"
      84             : #include "Evolution/Systems/GrMhd/GhValenciaDivClean/SetPiAndPhiFromConstraints.hpp"
      85             : #include "Evolution/Systems/GrMhd/GhValenciaDivClean/Subcell/FixConservativesAndComputePrims.hpp"
      86             : #include "Evolution/Systems/GrMhd/GhValenciaDivClean/Subcell/NeighborPackagedData.hpp"
      87             : #include "Evolution/Systems/GrMhd/GhValenciaDivClean/Subcell/PrimitiveGhostData.hpp"
      88             : #include "Evolution/Systems/GrMhd/GhValenciaDivClean/Subcell/PrimsAfterRollback.hpp"
      89             : #include "Evolution/Systems/GrMhd/GhValenciaDivClean/Subcell/ResizeAndComputePrimitives.hpp"
      90             : #include "Evolution/Systems/GrMhd/GhValenciaDivClean/Subcell/TciOnDgGrid.hpp"
      91             : #include "Evolution/Systems/GrMhd/GhValenciaDivClean/Subcell/TciOnFdGrid.hpp"
      92             : #include "Evolution/Systems/GrMhd/GhValenciaDivClean/Subcell/TimeDerivative.hpp"
      93             : #include "Evolution/Systems/GrMhd/GhValenciaDivClean/Subcell/ZeroTimeDerivatives.hpp"
      94             : #include "Evolution/Systems/GrMhd/GhValenciaDivClean/SystemM1.hpp"
      95             : #include "Evolution/Systems/GrMhd/GhValenciaDivClean/TimeDerivativeTerms.hpp"
      96             : #include "Evolution/Systems/GrMhd/ValenciaDivClean/AllSolutions.hpp"
      97             : #include "Evolution/Systems/GrMhd/ValenciaDivClean/BoundaryConditions/Factory.hpp"
      98             : #include "Evolution/Systems/GrMhd/ValenciaDivClean/FixConservatives.hpp"
      99             : #include "Evolution/Systems/GrMhd/ValenciaDivClean/KastaunEtAl.hpp"
     100             : #include "Evolution/Systems/GrMhd/ValenciaDivClean/NewmanHamlin.hpp"
     101             : #include "Evolution/Systems/GrMhd/ValenciaDivClean/PalenzuelaEtAl.hpp"
     102             : #include "Evolution/Systems/GrMhd/ValenciaDivClean/QuadrupoleFormula.hpp"
     103             : #include "Evolution/Systems/GrMhd/ValenciaDivClean/SetVariablesNeededFixingToFalse.hpp"
     104             : #include "Evolution/Systems/GrMhd/ValenciaDivClean/Subcell/SetInitialRdmpData.hpp"
     105             : #include "Evolution/Systems/GrMhd/ValenciaDivClean/System.hpp"
     106             : #include "Evolution/Systems/GrMhd/ValenciaDivClean/Tags.hpp"
     107             : #include "Evolution/Systems/RadiationTransport/NoNeutrinos/System.hpp"
     108             : #include "Evolution/Tags/Filter.hpp"
     109             : #include "Evolution/Triggers/SeparationLessThan.hpp"
     110             : #include "Evolution/TypeTraits.hpp"
     111             : #include "Evolution/VariableFixing/Actions.hpp"
     112             : #include "Evolution/VariableFixing/FixToAtmosphere.hpp"
     113             : #include "Evolution/VariableFixing/LimitLorentzFactor.hpp"
     114             : #include "Evolution/VariableFixing/ParameterizedDeleptonization.hpp"
     115             : #include "Evolution/VariableFixing/Tags.hpp"
     116             : #include "IO/Importers/Actions/ReadVolumeData.hpp"
     117             : #include "IO/Importers/Actions/ReceiveVolumeData.hpp"
     118             : #include "IO/Importers/Actions/RegisterWithElementDataReader.hpp"
     119             : #include "IO/Importers/ElementDataReader.hpp"
     120             : #include "IO/Observer/Actions/ObserverRegistration.hpp"
     121             : #include "IO/Observer/Actions/RegisterEvents.hpp"
     122             : #include "IO/Observer/Helpers.hpp"
     123             : #include "IO/Observer/ObserverComponent.hpp"
     124             : #include "IO/Observer/Tags.hpp"
     125             : #include "NumericalAlgorithms/DiscontinuousGalerkin/Formulation.hpp"
     126             : #include "NumericalAlgorithms/DiscontinuousGalerkin/Tags.hpp"
     127             : #include "NumericalAlgorithms/LinearOperators/ExponentialFilter.hpp"
     128             : #include "NumericalAlgorithms/LinearOperators/PartialDerivatives.hpp"
     129             : #include "Options/Protocols/FactoryCreation.hpp"
     130             : #include "Options/String.hpp"
     131             : #include "Parallel/Algorithms/AlgorithmSingleton.hpp"
     132             : #include "Parallel/Local.hpp"
     133             : #include "Parallel/Phase.hpp"
     134             : #include "Parallel/PhaseControl/ExecutePhaseChange.hpp"
     135             : #include "Parallel/PhaseControl/Factory.hpp"
     136             : #include "Parallel/PhaseControl/VisitAndReturn.hpp"
     137             : #include "Parallel/PhaseDependentActionList.hpp"
     138             : #include "Parallel/Protocols/RegistrationMetavariables.hpp"
     139             : #include "Parallel/Reduction.hpp"
     140             : #include "ParallelAlgorithms/Actions/AddComputeTags.hpp"
     141             : #include "ParallelAlgorithms/Actions/AddSimpleTags.hpp"
     142             : #include "ParallelAlgorithms/Actions/FilterAction.hpp"
     143             : #include "ParallelAlgorithms/Actions/FunctionsOfTimeAreReady.hpp"
     144             : #include "ParallelAlgorithms/Actions/InitializeItems.hpp"
     145             : #include "ParallelAlgorithms/Actions/MutateApply.hpp"
     146             : #include "ParallelAlgorithms/Actions/TerminatePhase.hpp"
     147             : #include "ParallelAlgorithms/Events/Completion.hpp"
     148             : #include "ParallelAlgorithms/Events/Factory.hpp"
     149             : #include "ParallelAlgorithms/Events/ObserveAtExtremum.hpp"
     150             : #include "ParallelAlgorithms/Events/ObserveDataBox.hpp"
     151             : #include "ParallelAlgorithms/Events/ObserveTimeStepVolume.hpp"
     152             : #include "ParallelAlgorithms/EventsAndDenseTriggers/DenseTrigger.hpp"
     153             : #include "ParallelAlgorithms/EventsAndDenseTriggers/DenseTriggers/Factory.hpp"
     154             : #include "ParallelAlgorithms/EventsAndTriggers/Actions/RunEventsOnFailure.hpp"
     155             : #include "ParallelAlgorithms/EventsAndTriggers/Event.hpp"
     156             : #include "ParallelAlgorithms/EventsAndTriggers/EventsAndTriggers.hpp"
     157             : #include "ParallelAlgorithms/EventsAndTriggers/LogicalTriggers.hpp"
     158             : #include "ParallelAlgorithms/EventsAndTriggers/Trigger.hpp"
     159             : #include "ParallelAlgorithms/Interpolation/Actions/ElementInitInterpPoints.hpp"
     160             : #include "ParallelAlgorithms/Interpolation/Actions/InitializeInterpolationTarget.hpp"
     161             : #include "ParallelAlgorithms/Interpolation/Callbacks/ObserveTimeSeriesOnSurface.hpp"
     162             : #include "ParallelAlgorithms/Interpolation/Events/InterpolateWithoutInterpComponent.hpp"
     163             : #include "ParallelAlgorithms/Interpolation/InterpolationTarget.hpp"
     164             : #include "ParallelAlgorithms/Interpolation/Protocols/InterpolationTargetTag.hpp"
     165             : #include "ParallelAlgorithms/Interpolation/Tags.hpp"
     166             : #include "ParallelAlgorithms/Interpolation/Targets/KerrHorizon.hpp"
     167             : #include "ParallelAlgorithms/Interpolation/Targets/Sphere.hpp"
     168             : #include "PointwiseFunctions/AnalyticData/AnalyticData.hpp"
     169             : #include "PointwiseFunctions/AnalyticData/GhGrMhd/Factory.hpp"
     170             : #include "PointwiseFunctions/AnalyticData/GrMhd/BlastWave.hpp"
     171             : #include "PointwiseFunctions/AnalyticData/GrMhd/BondiHoyleAccretion.hpp"
     172             : #include "PointwiseFunctions/AnalyticData/GrMhd/InitialMagneticFields/Factory.hpp"
     173             : #include "PointwiseFunctions/AnalyticData/GrMhd/MagneticFieldLoop.hpp"
     174             : #include "PointwiseFunctions/AnalyticData/GrMhd/MagneticRotor.hpp"
     175             : #include "PointwiseFunctions/AnalyticData/GrMhd/MagnetizedFmDisk.hpp"
     176             : #include "PointwiseFunctions/AnalyticData/GrMhd/OrszagTangVortex.hpp"
     177             : #include "PointwiseFunctions/AnalyticData/Tags.hpp"
     178             : #include "PointwiseFunctions/AnalyticSolutions/AnalyticSolution.hpp"
     179             : #include "PointwiseFunctions/AnalyticSolutions/GeneralRelativity/Factory.hpp"
     180             : #include "PointwiseFunctions/AnalyticSolutions/GeneralRelativity/KerrSchild.hpp"
     181             : #include "PointwiseFunctions/AnalyticSolutions/GeneralRelativity/WrappedGr.hpp"
     182             : #include "PointwiseFunctions/AnalyticSolutions/GhGrMhd/Factory.hpp"
     183             : #include "PointwiseFunctions/AnalyticSolutions/GhRelativisticEuler/Factory.hpp"
     184             : #include "PointwiseFunctions/AnalyticSolutions/GrMhd/AlfvenWave.hpp"
     185             : #include "PointwiseFunctions/AnalyticSolutions/GrMhd/BondiMichel.hpp"
     186             : #include "PointwiseFunctions/AnalyticSolutions/GrMhd/KomissarovShock.hpp"
     187             : #include "PointwiseFunctions/AnalyticSolutions/GrMhd/SmoothFlow.hpp"
     188             : #include "PointwiseFunctions/AnalyticSolutions/RadiationTransport/MonteCarlo/Factory.hpp"
     189             : #include "PointwiseFunctions/AnalyticSolutions/RadiationTransport/MonteCarlo/HomogeneousSphere.hpp"
     190             : #include "PointwiseFunctions/AnalyticSolutions/RelativisticEuler/FishboneMoncriefDisk.hpp"
     191             : #include "PointwiseFunctions/AnalyticSolutions/RelativisticEuler/SmoothFlow.hpp"
     192             : #include "PointwiseFunctions/AnalyticSolutions/RelativisticEuler/TovStar.hpp"
     193             : #include "PointwiseFunctions/AnalyticSolutions/Tags.hpp"
     194             : #include "PointwiseFunctions/GeneralRelativity/Christoffel.hpp"
     195             : #include "PointwiseFunctions/GeneralRelativity/DetAndInverseSpatialMetric.hpp"
     196             : #include "PointwiseFunctions/GeneralRelativity/GeneralizedHarmonic/ConstraintGammas.hpp"
     197             : #include "PointwiseFunctions/GeneralRelativity/GeneralizedHarmonic/ExtrinsicCurvature.hpp"
     198             : #include "PointwiseFunctions/GeneralRelativity/GeneralizedHarmonic/SecondTimeDerivOfSpacetimeMetric.hpp"
     199             : #include "PointwiseFunctions/GeneralRelativity/Lapse.hpp"
     200             : #include "PointwiseFunctions/GeneralRelativity/Psi4Real.hpp"
     201             : #include "PointwiseFunctions/GeneralRelativity/Ricci.hpp"
     202             : #include "PointwiseFunctions/GeneralRelativity/Shift.hpp"
     203             : #include "PointwiseFunctions/GeneralRelativity/SpatialMetric.hpp"
     204             : #include "PointwiseFunctions/GeneralRelativity/Surfaces/Tags.hpp"
     205             : #include "PointwiseFunctions/GeneralRelativity/Tags.hpp"
     206             : #include "PointwiseFunctions/GeneralRelativity/WeylElectric.hpp"
     207             : #include "PointwiseFunctions/Hydro/EquationsOfState/Factory.hpp"
     208             : #include "PointwiseFunctions/Hydro/LowerSpatialFourVelocity.hpp"
     209             : #include "PointwiseFunctions/Hydro/MassFlux.hpp"
     210             : #include "PointwiseFunctions/Hydro/MassWeightedFluidItems.hpp"
     211             : #include "PointwiseFunctions/Hydro/Tags.hpp"
     212             : #include "PointwiseFunctions/Hydro/TransportVelocity.hpp"
     213             : #include "PointwiseFunctions/InitialDataUtilities/Tags/InitialData.hpp"
     214             : #include "PointwiseFunctions/MathFunctions/Factory.hpp"
     215             : #include "PointwiseFunctions/MathFunctions/MathFunction.hpp"
     216             : #include "Time/Actions/SelfStartActions.hpp"
     217             : #include "Time/AdvanceTime.hpp"
     218             : #include "Time/ChangeSlabSize/Action.hpp"
     219             : #include "Time/ChangeStepSize.hpp"
     220             : #include "Time/ChangeTimeStepperOrder.hpp"
     221             : #include "Time/CleanHistory.hpp"
     222             : #include "Time/RecordTimeStepperData.hpp"
     223             : #include "Time/StepChoosers/Factory.hpp"
     224             : #include "Time/StepChoosers/FixedLtsRatio.hpp"
     225             : #include "Time/StepChoosers/StepChooser.hpp"
     226             : #include "Time/Tags/Time.hpp"
     227             : #include "Time/Tags/TimeStepId.hpp"
     228             : #include "Time/TimeSequence.hpp"
     229             : #include "Time/TimeSteppers/Factory.hpp"
     230             : #include "Time/TimeSteppers/LtsTimeStepper.hpp"
     231             : #include "Time/TimeSteppers/TimeStepper.hpp"
     232             : #include "Time/Triggers/TimeTriggers.hpp"
     233             : #include "Time/UpdateU.hpp"
     234             : #include "Utilities/ErrorHandling/Error.hpp"
     235             : #include "Utilities/Functional.hpp"
     236             : #include "Utilities/NoSuchType.hpp"
     237             : #include "Utilities/ProtocolHelpers.hpp"
     238             : #include "Utilities/TMPL.hpp"
     239             : 
     240             : /// \cond
     241             : namespace Frame {
     242             : 
     243             : struct Inertial;
     244             : }  // namespace Frame
     245             : namespace PUP {
     246             : class er;
     247             : }  // namespace PUP
     248             : namespace Parallel {
     249             : template <typename Metavariables>
     250             : class CProxy_GlobalCache;
     251             : }  // namespace Parallel
     252             : /// \endcond
     253             : 
     254             : template <bool UseDgSubcell>
     255           0 : struct GhValenciaDivCleanDefaults {
     256             :  public:
     257           0 :   static constexpr size_t volume_dim = 3;
     258           0 :   using domain_frame = Frame::Inertial;
     259           0 :   static constexpr bool use_damped_harmonic_rollon = true;
     260           0 :   using temporal_id = Tags::TimeStepId;
     261           0 :   using TimeStepperBase = TimeStepper;
     262             : 
     263           0 :   static constexpr bool local_time_stepping =
     264             :       TimeStepperBase::local_time_stepping;
     265           0 :   static constexpr bool use_dg_element_collection = false;
     266             : 
     267           0 :   using neutrino_system = RadiationTransport::NoNeutrinos::System;
     268             : 
     269           0 :   using system = grmhd::GhValenciaDivClean::System<neutrino_system>;
     270           0 :   using analytic_variables_tags =
     271             :       typename system::primitive_variables_tag::tags_list;
     272           0 :   using analytic_solution_fields =
     273             :       tmpl::append<typename system::primitive_variables_tag::tags_list,
     274             :                    typename system::gh_system::variables_tag::tags_list>;
     275           0 :   using ordered_list_of_primitive_recovery_schemes = tmpl::list<
     276             :       grmhd::ValenciaDivClean::PrimitiveRecoverySchemes::KastaunEtAl,
     277             :       grmhd::ValenciaDivClean::PrimitiveRecoverySchemes::NewmanHamlin,
     278             :       grmhd::ValenciaDivClean::PrimitiveRecoverySchemes::PalenzuelaEtAl>;
     279             : 
     280           0 :   using initialize_initial_data_dependent_quantities_actions = tmpl::list<
     281             :       gh::Actions::InitializeGhAnd3Plus1Variables<volume_dim>,
     282             :       tmpl::conditional_t<UseDgSubcell,
     283             :                           grmhd::GhValenciaDivClean::SetPiAndPhiFromConstraints,
     284             :                           gh::gauges::SetPiAndPhiFromConstraints<
     285             :                               ghmhd::GhValenciaDivClean::InitialData::
     286             :                                   analytic_solutions_and_data_list,
     287             :                               3>>,
     288             :       Initialization::Actions::AddComputeTags<
     289             :           tmpl::list<gr::Tags::SqrtDetSpatialMetricCompute<
     290             :               DataVector, volume_dim, domain_frame>>>,
     291             :       VariableFixing::Actions::FixVariables<
     292             :           VariableFixing::FixToAtmosphere<volume_dim>>,
     293             :       VariableFixing::Actions::FixVariables<VariableFixing::LimitLorentzFactor>,
     294             :       Actions::UpdateConservatives,
     295             :       tmpl::conditional_t<
     296             :           UseDgSubcell,
     297             :           tmpl::list<
     298             :               Initialization::Actions::AddSimpleTags<
     299             :                   grmhd::ValenciaDivClean::SetVariablesNeededFixingToFalse>,
     300             : 
     301             :               evolution::dg::subcell::Actions::SetAndCommunicateInitialRdmpData<
     302             :                   volume_dim,
     303             :                   grmhd::ValenciaDivClean::subcell::SetInitialRdmpData>,
     304             :               evolution::dg::subcell::Actions::ComputeAndSendTciOnInitialGrid<
     305             :                   volume_dim, system,
     306             :                   grmhd::GhValenciaDivClean::subcell::TciOnFdGrid>,
     307             :               evolution::dg::subcell::Actions::SetInitialGridFromTciData<
     308             :                   volume_dim, system>,
     309             :               Actions::MutateApply<
     310             :                   grmhd::GhValenciaDivClean::subcell::ResizeAndComputePrims<
     311             :                       ordered_list_of_primitive_recovery_schemes>>,
     312             : 
     313             :               VariableFixing::Actions::FixVariables<
     314             :                   VariableFixing::FixToAtmosphere<volume_dim>>,
     315             :               VariableFixing::Actions::FixVariables<
     316             :                   VariableFixing::LimitLorentzFactor>,
     317             :               Actions::UpdateConservatives,
     318             :               grmhd::GhValenciaDivClean::SetPiAndPhiFromConstraints>,
     319             :           tmpl::list<>>,
     320             :       Parallel::Actions::TerminatePhase>;
     321             : 
     322             :   // NOLINTNEXTLINE(google-runtime-references)
     323           0 :   void pup(PUP::er& /*p*/) {}
     324             : };
     325             : 
     326             : template <typename EvolutionMetavarsDerived, bool UseDgSubcell,
     327             :           bool UseControlSystems, bool UseParametrizedDeleptonization>
     328           0 : struct GhValenciaDivCleanTemplateBase;
     329             : 
     330             : template <bool UseDgSubcell, bool UseControlSystems,
     331             :           bool UseParametrizedDeleptonization,
     332             :           template <bool, bool, typename...> class EvolutionMetavarsDerived,
     333             :           typename... InterpolationTargetTags>
     334           0 : struct GhValenciaDivCleanTemplateBase<
     335             :     EvolutionMetavarsDerived<UseControlSystems, UseParametrizedDeleptonization,
     336             :                              InterpolationTargetTags...>,
     337             :     UseDgSubcell, UseControlSystems, UseParametrizedDeleptonization>
     338             :     : public virtual GhValenciaDivCleanDefaults<UseDgSubcell> {
     339           0 :   using derived_metavars =
     340             :       EvolutionMetavarsDerived<UseControlSystems,
     341             :                                UseParametrizedDeleptonization,
     342             :                                InterpolationTargetTags...>;
     343           0 :   using defaults = GhValenciaDivCleanDefaults<UseDgSubcell>;
     344           0 :   static constexpr size_t volume_dim = defaults::volume_dim;
     345           0 :   using domain_frame = typename defaults::domain_frame;
     346           0 :   static constexpr bool use_damped_harmonic_rollon =
     347             :       defaults::use_damped_harmonic_rollon;
     348           0 :   using temporal_id = typename defaults::temporal_id;
     349           0 :   using TimeStepperBase = typename defaults::TimeStepperBase;
     350           0 :   static constexpr bool local_time_stepping = defaults::local_time_stepping;
     351           0 :   static constexpr bool use_dg_element_collection =
     352             :       defaults::use_dg_element_collection;
     353           0 :   using system = typename defaults::system;
     354             : 
     355           0 :   using analytic_variables_tags = typename defaults::analytic_variables_tags;
     356           0 :   using analytic_solution_fields = typename defaults::analytic_solution_fields;
     357           0 :   using ordered_list_of_primitive_recovery_schemes =
     358             :       typename defaults::ordered_list_of_primitive_recovery_schemes;
     359           0 :   using initialize_initial_data_dependent_quantities_actions =
     360             :       typename defaults::initialize_initial_data_dependent_quantities_actions;
     361             : 
     362           0 :   static constexpr bool use_dg_subcell = UseDgSubcell;
     363           0 :   static constexpr bool use_control_systems = UseControlSystems;
     364           0 :   using initial_data_list =
     365             :       ghmhd::GhValenciaDivClean::InitialData::initial_data_list;
     366             : 
     367             :   // Boolean verifying if parameterized deleptonization will be active.  This
     368             :   // will only be active for CCSN evolution.
     369           0 :   using parameterized_deleptonization =
     370             :       tmpl::conditional_t<UseParametrizedDeleptonization,
     371             :                           VariableFixing::Actions::FixVariables<
     372             :                               VariableFixing::ParameterizedDeleptonization>,
     373             :                           tmpl::list<>>;
     374             : 
     375           0 :   using initial_data_tag = evolution::initial_data::Tags::InitialData;
     376           0 :   using equation_of_state_tag = hydro::Tags::GrmhdEquationOfState;
     377           0 :   using measurement = control_system::measurements::BothNSCenters;
     378           0 :   using control_systems = tmpl::conditional_t<
     379             :       use_control_systems,
     380             :       tmpl::list<control_system::Systems::Rotation<3, measurement>,
     381             :                  control_system::Systems::Expansion<2, measurement>,
     382             :                  control_system::Systems::Translation<2, measurement, 2>,
     383             :                  control_system::Systems::GridCenters<2, measurement>>,
     384             :       tmpl::list<>>;
     385             : 
     386           0 :   using interpolator_source_vars =
     387             :       tmpl::remove_duplicates<tmpl::flatten<tmpl::list<
     388             :           typename InterpolationTargetTags::vars_to_interpolate_to_target...>>>;
     389             : 
     390           0 :   using analytic_compute = evolution::Tags::AnalyticSolutionsCompute<
     391             :       volume_dim, analytic_solution_fields, use_dg_subcell, initial_data_list>;
     392           0 :   using error_compute = Tags::ErrorsCompute<analytic_solution_fields>;
     393           0 :   using error_tags = db::wrap_tags_in<Tags::Error, analytic_solution_fields>;
     394           0 :   using observe_fields = tmpl::append<
     395             :       typename system::variables_tag::tags_list,
     396             :       typename system::primitive_variables_tag::tags_list, error_tags,
     397             :       tmpl::list<
     398             :           hydro::Tags::TildeDInHalfPlaneCompute<
     399             :               DataVector, volume_dim,
     400             :               ::hydro::HalfPlaneIntegralMask::PositiveXOnly,
     401             :               Events::Tags::ObserverCoordinates<3, Frame::Grid>>,
     402             :           hydro::Tags::TildeDInHalfPlaneCompute<
     403             :               DataVector, volume_dim,
     404             :               ::hydro::HalfPlaneIntegralMask::NegativeXOnly,
     405             :               Events::Tags::ObserverCoordinates<3, Frame::Grid>>,
     406             :           hydro::Tags::MassWeightedCoordsCompute<
     407             :               DataVector, volume_dim,
     408             :               ::hydro::HalfPlaneIntegralMask::PositiveXOnly,
     409             :               Events::Tags::ObserverCoordinates<3, Frame::Grid>,
     410             :               Events::Tags::ObserverCoordinates<3, Frame::Inertial>,
     411             :               Frame::Inertial>,
     412             :           hydro::Tags::MassWeightedCoordsCompute<
     413             :               DataVector, volume_dim,
     414             :               ::hydro::HalfPlaneIntegralMask::NegativeXOnly,
     415             :               Events::Tags::ObserverCoordinates<3, Frame::Grid>,
     416             :               Events::Tags::ObserverCoordinates<3, Frame::Inertial>,
     417             :               Frame::Inertial>,
     418             : 
     419             :           hydro::Tags::MassWeightedInternalEnergyCompute<DataVector>,
     420             :           hydro::Tags::MassWeightedKineticEnergyCompute<DataVector>,
     421             :           hydro::Tags::TildeDUnboundUtCriterionCompute<DataVector, volume_dim,
     422             :                                                        domain_frame>,
     423             :           hydro::Tags::LowerSpatialFourVelocityCompute,
     424             :           hydro::Tags::MassWeightedCoordsCompute<
     425             :               DataVector, volume_dim, ::hydro::HalfPlaneIntegralMask::None,
     426             :               Events::Tags::ObserverCoordinates<3, Frame::Grid>,
     427             :               Events::Tags::ObserverCoordinates<3, Frame::Inertial>,
     428             :               Frame::Inertial>,
     429             :           gr::Tags::SpacetimeNormalOneFormCompute<DataVector, volume_dim,
     430             :                                                   domain_frame>,
     431             :           gr::Tags::SpacetimeNormalVectorCompute<DataVector, volume_dim,
     432             :                                                  domain_frame>,
     433             :           gr::Tags::InverseSpacetimeMetricCompute<DataVector, volume_dim,
     434             :                                                   domain_frame>,
     435             :           gr::Tags::Lapse<DataVector>,
     436             :           gr::Tags::Shift<DataVector, volume_dim, domain_frame>,
     437             :           gr::Tags::SpatialMetric<DataVector, volume_dim, domain_frame>,
     438             :           gr::Tags::DetSpatialMetric<DataVector>,
     439             :           gr::Tags::InverseSpatialMetric<DataVector, volume_dim>,
     440             :           gh::Tags::ExtrinsicCurvatureCompute<volume_dim, domain_frame>,
     441             :           gh::Tags::DerivSpatialMetricCompute<volume_dim, ::Frame::Inertial>,
     442             :           gr::Tags::SpatialChristoffelFirstKindCompute<DataVector, volume_dim,
     443             :                                                        ::Frame::Inertial>,
     444             :           gr::Tags::SpatialChristoffelSecondKindCompute<DataVector, volume_dim,
     445             :                                                         ::Frame::Inertial>,
     446             :           ::Tags::DerivTensorCompute<
     447             :               gr::Tags::SpatialChristoffelSecondKind<DataVector, volume_dim>,
     448             :               ::Events::Tags::ObserverInverseJacobian<
     449             :                   volume_dim, Frame::ElementLogical, Frame::Inertial>,
     450             :               ::Events::Tags::ObserverMesh<volume_dim>>,
     451             :           gr::Tags::SpatialRicciCompute<DataVector, volume_dim,
     452             :                                         ::Frame::Inertial>,
     453             :           gr::Tags::SpatialRicciScalarCompute<DataVector, volume_dim,
     454             :                                               ::Frame::Inertial>,
     455             : 
     456             :           // Constraints
     457             :           gh::Tags::GaugeConstraintCompute<volume_dim, domain_frame>,
     458             :           gh::Tags::TwoIndexConstraintCompute<volume_dim, ::Frame::Inertial>,
     459             :           gh::Tags::ThreeIndexConstraintCompute<volume_dim, ::Frame::Inertial>,
     460             :           gh::Tags::FourIndexConstraintCompute<3, ::Frame::Inertial>,
     461             :           gh::Tags::FConstraintCompute<3, ::Frame::Inertial>,
     462             : 
     463             :           // L2 norms of constraints
     464             :           ::Tags::PointwiseL2NormCompute<
     465             :               gh::Tags::GaugeConstraint<DataVector, volume_dim, domain_frame>>,
     466             :           ::Tags::PointwiseL2NormCompute<
     467             :               gh::Tags::TwoIndexConstraint<DataVector, volume_dim>>,
     468             :           ::Tags::PointwiseL2NormCompute<
     469             :               gh::Tags::ThreeIndexConstraint<DataVector, volume_dim>>,
     470             :           ::Tags::PointwiseL2NormCompute<
     471             :               gh::Tags::FourIndexConstraint<DataVector, 3>>,
     472             :           gh::Tags::ConstraintEnergyCompute<3, ::Frame::Inertial>,
     473             :           ::Tags::PointwiseL2NormCompute<gh::Tags::FConstraint<DataVector, 3>>,
     474             :           ::Tags::PointwiseL2NormCompute<
     475             :               gh::Tags::GaugeH<DataVector, volume_dim>>,
     476             :           ::Tags::PointwiseL2NormCompute<
     477             :               gh::Tags::ConstraintEnergy<DataVector, volume_dim>>,
     478             :           ::Tags::PointwiseL2NormCompute<gh::Tags::Phi<DataVector, volume_dim>>,
     479             :           ::Tags::PointwiseL2NormCompute<
     480             :               ::Tags::deriv<gr::Tags::SpacetimeMetric<DataVector, volume_dim>,
     481             :                             tmpl::size_t<volume_dim>, Frame::Inertial>>,
     482             : 
     483             :           // GW Tags
     484             :           grmhd::ValenciaDivClean::Tags::QuadrupoleMomentCompute<
     485             :               DataVector, volume_dim,
     486             :               ::Events::Tags::ObserverCoordinates<volume_dim, Frame::Inertial>>,
     487             :           grmhd::ValenciaDivClean::Tags::QuadrupoleMomentDerivativeCompute<
     488             :               DataVector, volume_dim,
     489             :               ::Events::Tags::ObserverCoordinates<volume_dim, Frame::Inertial>,
     490             :               hydro::Tags::SpatialVelocity<DataVector, volume_dim,
     491             :                                            Frame::Inertial>>,
     492             :           hydro::Tags::TransportVelocityCompute<DataVector, volume_dim,
     493             :                                                 Frame::Inertial>,
     494             :           grmhd::ValenciaDivClean::Tags::QuadrupoleMomentDerivativeCompute<
     495             :               DataVector, volume_dim,
     496             :               ::Events::Tags::ObserverCoordinates<volume_dim, Frame::Inertial>,
     497             :               hydro::Tags::TransportVelocity<DataVector, volume_dim,
     498             :                                              Frame::Inertial>>,
     499             :           gh::Tags::TimeDerivLapseCompute<volume_dim, Frame::Inertial>,
     500             :           gh::Tags::TimeDerivShiftCompute<volume_dim, Frame::Inertial>,
     501             :           ::Tags::dt<gh::Tags::Phi<DataVector, volume_dim, Frame::Inertial>>,
     502             :           ::Tags::dt<gh::Tags::Pi<DataVector, volume_dim, Frame::Inertial>>,
     503             :           gh::Tags::SecondTimeDerivOfSpacetimeMetricCompute<volume_dim,
     504             :                                                             Frame::Inertial>,
     505             :           ::Tags::DerivTensorCompute<
     506             :               gr::Tags::ExtrinsicCurvature<DataVector, 3>,
     507             :               ::Events::Tags::ObserverInverseJacobian<
     508             :                   volume_dim, Frame::ElementLogical, Frame::Inertial>,
     509             :               ::Events::Tags::ObserverMesh<volume_dim>>,
     510             :           gr::Tags::WeylElectricCompute<DataVector, 3, Frame::Inertial>,
     511             :           gr::Tags::Psi4RealCompute<Frame::Inertial>,
     512             :           ::Events::Tags::ObserverMeshVelocity<3>>,
     513             :       tmpl::conditional_t<
     514             :           use_dg_subcell,
     515             :           tmpl::list<evolution::dg::subcell::Tags::TciStatusCompute<volume_dim>,
     516             :                      evolution::dg::subcell::Tags::ObserverCoordinatesCompute<
     517             :                          volume_dim, Frame::ElementLogical>,
     518             :                      evolution::dg::subcell::Tags::ObserverCoordinatesCompute<
     519             :                          volume_dim, Frame::Grid>,
     520             :                      evolution::dg::subcell::Tags::ObserverCoordinatesCompute<
     521             :                          volume_dim, Frame::Inertial>>,
     522             :           tmpl::list<::Events::Tags::ObserverCoordinatesCompute<
     523             :                          volume_dim, Frame::ElementLogical>,
     524             :                      ::Events::Tags::ObserverCoordinatesCompute<volume_dim,
     525             :                                                                 Frame::Grid>,
     526             :                      ::Events::Tags::ObserverCoordinatesCompute<
     527             :                          volume_dim, Frame::Inertial>>>>;
     528           0 :   using integrand_fields = tmpl::append<
     529             :       typename system::variables_tag::tags_list,
     530             :       tmpl::list<
     531             :           // Control system tags
     532             :           hydro::Tags::TildeDInHalfPlaneCompute<
     533             :               DataVector, volume_dim,
     534             :               ::hydro::HalfPlaneIntegralMask::PositiveXOnly,
     535             :               Events::Tags::ObserverCoordinates<3, Frame::Grid>>,
     536             :           hydro::Tags::TildeDInHalfPlaneCompute<
     537             :               DataVector, volume_dim,
     538             :               ::hydro::HalfPlaneIntegralMask::NegativeXOnly,
     539             :               Events::Tags::ObserverCoordinates<3, Frame::Grid>>,
     540             :           hydro::Tags::MassWeightedCoordsCompute<
     541             :               DataVector, volume_dim,
     542             :               ::hydro::HalfPlaneIntegralMask::PositiveXOnly,
     543             :               Events::Tags::ObserverCoordinates<3, Frame::Grid>,
     544             :               Events::Tags::ObserverCoordinates<3, Frame::Inertial>,
     545             :               Frame::Inertial>,
     546             :           hydro::Tags::MassWeightedCoordsCompute<
     547             :               DataVector, volume_dim,
     548             :               ::hydro::HalfPlaneIntegralMask::NegativeXOnly,
     549             :               Events::Tags::ObserverCoordinates<3, Frame::Grid>,
     550             :               Events::Tags::ObserverCoordinates<3, Frame::Inertial>,
     551             :               Frame::Inertial>,
     552             : 
     553             :           // General tags
     554             :           hydro::Tags::MassWeightedInternalEnergyCompute<DataVector>,
     555             :           hydro::Tags::MassWeightedKineticEnergyCompute<DataVector>,
     556             :           hydro::Tags::TildeDUnboundUtCriterionCompute<DataVector, volume_dim,
     557             :                                                        domain_frame>,
     558             :           hydro::Tags::MassWeightedCoordsCompute<
     559             :               DataVector, volume_dim, ::hydro::HalfPlaneIntegralMask::None,
     560             :               Events::Tags::ObserverCoordinates<3, Frame::Grid>,
     561             :               Events::Tags::ObserverCoordinates<3, Frame::Inertial>,
     562             :               Frame::Inertial>>>;
     563             : 
     564           0 :   using non_tensor_compute_tags = tmpl::append<
     565             :       tmpl::conditional_t<
     566             :           use_dg_subcell,
     567             :           tmpl::list<
     568             :               evolution::dg::subcell::Tags::ObserverMeshCompute<volume_dim>,
     569             :               evolution::dg::subcell::Tags::ObserverInverseJacobianCompute<
     570             :                   volume_dim, Frame::ElementLogical, Frame::Inertial>,
     571             :               evolution::dg::subcell::Tags::
     572             :                   ObserverJacobianAndDetInvJacobianCompute<
     573             :                       volume_dim, Frame::ElementLogical, Frame::Inertial>,
     574             :               evolution::dg::subcell::Tags::ObserverMeshVelocityCompute<
     575             :                   volume_dim>>,
     576             :           tmpl::list<::Events::Tags::ObserverMeshCompute<volume_dim>,
     577             :                      ::Events::Tags::ObserverInverseJacobianCompute<
     578             :                          volume_dim, Frame::ElementLogical, Frame::Inertial>,
     579             :                      ::Events::Tags::ObserverJacobianCompute<
     580             :                          volume_dim, Frame::ElementLogical, Frame::Inertial>,
     581             :                      ::Events::Tags::ObserverDetInvJacobianCompute<
     582             :                          Frame::ElementLogical, Frame::Inertial>,
     583             :                      ::Events::Tags::ObserverMeshVelocityCompute<3>>>,
     584             :       tmpl::list<analytic_compute, error_compute>,
     585             :       tmpl::list<::Tags::DerivCompute<
     586             :                      typename system::variables_tag,
     587             :                      ::Events::Tags::ObserverMesh<volume_dim>,
     588             :                      ::Events::Tags::ObserverInverseJacobian<
     589             :                          volume_dim, Frame::ElementLogical, Frame::Inertial>,
     590             :                      typename system::gradient_variables>,
     591             :                  gh::gauges::Tags::GaugeAndDerivativeCompute<
     592             :                      volume_dim, ghmhd::GhValenciaDivClean::InitialData::
     593             :                                      analytic_solutions_and_data_list>>>;
     594             : 
     595           0 :   struct factory_creation
     596             :       : tt::ConformsTo<Options::protocols::FactoryCreation> {
     597             :    private:
     598           0 :     using boundary_conditions = grmhd::GhValenciaDivClean::BoundaryConditions::
     599             :         standard_boundary_conditions<system>;
     600             : 
     601             :    public:
     602           0 :     using factory_classes = tmpl::map<
     603             :         tmpl::pair<DenseTrigger,
     604             :                    tmpl::append<DenseTriggers::standard_dense_triggers,
     605             :                                 control_system::control_system_triggers<
     606             :                                     control_systems>>>,
     607             :         tmpl::pair<
     608             :             DomainCreator<volume_dim>,
     609             :             // Currently control systems can only be used with BCO
     610             :             // domains
     611             :             tmpl::conditional_t<
     612             :                 use_control_systems,
     613             :                 tmpl::list<::domain::creators::BinaryCompactObject<false>>,
     614             :                 domain_creators<volume_dim>>>,
     615             :         tmpl::pair<Event,
     616             :                    tmpl::flatten<tmpl::list<
     617             :                        Events::Completion, ::Events::ObserveDataBox,
     618             :                        dg::Events::field_observations<
     619             :                            volume_dim, observe_fields, non_tensor_compute_tags>,
     620             :                        Events::ObserveAtExtremum<observe_fields,
     621             :                                                  non_tensor_compute_tags>,
     622             :                        Events::time_events<system>,
     623             :                        dg::Events::ObserveTimeStepVolume<system>,
     624             :                        control_system::metafunctions::control_system_events<
     625             :                            control_systems>,
     626             :                        tmpl::conditional_t<use_control_systems,
     627             :                                            control_system::CleanFunctionsOfTime,
     628             :                                            tmpl::list<>>,
     629             :                        intrp::Events::InterpolateWithoutInterpComponent<
     630             :                            volume_dim, InterpolationTargetTags,
     631             :                            interpolator_source_vars>...>>>,
     632             :         tmpl::pair<evolution::BoundaryCorrection,
     633             :                    grmhd::GhValenciaDivClean::BoundaryCorrections::
     634             :                        standard_boundary_corrections>,
     635             :         tmpl::pair<
     636             :             grmhd::GhValenciaDivClean::BoundaryConditions::BoundaryCondition,
     637             :             boundary_conditions>,
     638             :         tmpl::pair<
     639             :             grmhd::AnalyticData::InitialMagneticFields::InitialMagneticField,
     640             :             grmhd::AnalyticData::InitialMagneticFields::
     641             :                 initial_magnetic_fields>,
     642             :         tmpl::pair<gh::gauges::GaugeCondition, gh::gauges::all_gauges>,
     643             :         tmpl::pair<MathFunction<1, Frame::Inertial>,
     644             :                    MathFunctions::all_math_functions<1, Frame::Inertial>>,
     645             :         tmpl::pair<evolution::initial_data::InitialData, initial_data_list>,
     646             :         // Restrict to monotonic time steppers in LTS to avoid control
     647             :         // systems deadlocking.
     648             :         tmpl::pair<
     649             :             LtsTimeStepper,
     650             :             tmpl::conditional_t<use_control_systems,
     651             :                                 TimeSteppers::monotonic_lts_time_steppers,
     652             :                                 TimeSteppers::lts_time_steppers>>,
     653             :         tmpl::pair<PhaseChange, PhaseControl::factory_creatable_classes>,
     654             :         tmpl::pair<StepChooser<StepChooserUse::LtsStep>,
     655             :                    StepChoosers::standard_step_choosers<system>>,
     656             :         tmpl::pair<StepChooser<StepChooserUse::Slab>,
     657             :                    tmpl::append<StepChoosers::standard_slab_choosers<
     658             :                                     system, local_time_stepping>,
     659             :                                 tmpl::conditional_t<
     660             :                                     use_dg_subcell and local_time_stepping,
     661             :                                     tmpl::list<StepChoosers::FixedLtsRatio>,
     662             :                                     tmpl::list<>>>>,
     663             :         tmpl::pair<TimeSequence<double>,
     664             :                    TimeSequences::all_time_sequences<double>>,
     665             :         tmpl::pair<TimeSequence<std::uint64_t>,
     666             :                    TimeSequences::all_time_sequences<std::uint64_t>>,
     667             :         tmpl::pair<TimeStepper, TimeSteppers::time_steppers>,
     668             :         tmpl::pair<
     669             :             Trigger,
     670             :             tmpl::append<Triggers::logical_triggers, Triggers::time_triggers,
     671             :                          tmpl::conditional_t<
     672             :                              UseControlSystems,
     673             :                              tmpl::list<Triggers::SeparationLessThan<true>>,
     674             :                              tmpl::list<>>>>>;
     675             :   };
     676             : 
     677           0 :   using interpolation_target_tags = tmpl::list<InterpolationTargetTags...>;
     678             : 
     679           0 :   using observed_reduction_data_tags = observers::collect_reduction_data_tags<
     680             :       tmpl::at<typename factory_creation::factory_classes, Event>>;
     681             : 
     682           0 :   using const_global_cache_tags = tmpl::flatten<tmpl::list<
     683             :       tmpl::conditional_t<
     684             :           use_dg_subcell,
     685             :           tmpl::list<
     686             :               grmhd::GhValenciaDivClean::fd::Tags::Reconstructor<system>,
     687             :               grmhd::GhValenciaDivClean::fd::Tags::FilterOptions,
     688             :               ::Tags::VariableFixer<grmhd::ValenciaDivClean::FixConservatives>,
     689             :               grmhd::ValenciaDivClean::subcell::Tags::TciOptions>,
     690             :           tmpl::list<>>,
     691             :       grmhd::ValenciaDivClean::Tags::PrimitiveFromConservativeOptions,
     692             :       gh::gauges::Tags::GaugeCondition, initial_data_tag,
     693             :       grmhd::ValenciaDivClean::Tags::ConstraintDampingParameter,
     694             :       equation_of_state_tag,
     695             :       gh::Tags::DampingFunctionGamma0<volume_dim, Frame::Grid>,
     696             :       gh::Tags::DampingFunctionGamma1<volume_dim, Frame::Grid>,
     697             :       gh::Tags::DampingFunctionGamma2<volume_dim, Frame::Grid>>>;
     698             : 
     699           0 :   using dg_registration_list =
     700             :       tmpl::list<observers::Actions::RegisterEventsWithObservers>;
     701             : 
     702           0 :   static constexpr auto default_phase_order = std::array<Parallel::Phase, 8>{
     703             :       {Parallel::Phase::Initialization,
     704             :        Parallel::Phase::RegisterWithElementDataReader,
     705             :        Parallel::Phase::Register, Parallel::Phase::ImportInitialData,
     706             :        Parallel::Phase::InitializeInitialDataDependentQuantities,
     707             :        Parallel::Phase::InitializeTimeStepperHistory, Parallel::Phase::Evolve,
     708             :        Parallel::Phase::Exit}};
     709             : 
     710           0 :   struct SubcellOptions {
     711           0 :     using evolved_vars_tags = typename system::variables_tag::tags_list;
     712           0 :     using prim_tags = typename system::primitive_variables_tag::tags_list;
     713             : 
     714           0 :     static constexpr bool subcell_enabled = use_dg_subcell;
     715           0 :     static constexpr bool subcell_enabled_at_external_boundary = true;
     716             : 
     717             :     // We send `ghost_zone_size` cell-centered grid points for variable
     718             :     // reconstruction, of which we need `ghost_zone_size-1` for reconstruction
     719             :     // to the internal side of the element face, and `ghost_zone_size` for
     720             :     // reconstruction to the external side of the element face.
     721             :     template <typename DbTagsList>
     722           0 :     static constexpr size_t ghost_zone_size(
     723             :         const db::DataBox<DbTagsList>& box) {
     724             :       return db::get<
     725             :                  grmhd::GhValenciaDivClean::fd::Tags::Reconstructor<system>>(
     726             :                  box)
     727             :           .ghost_zone_size();
     728             :     }
     729             : 
     730           0 :     using DgComputeSubcellNeighborPackagedData =
     731             :         grmhd::GhValenciaDivClean::subcell::NeighborPackagedData<system>;
     732             : 
     733           0 :     using GhostVariables =
     734             :         grmhd::GhValenciaDivClean::subcell::PrimitiveGhostVariables;
     735             :   };
     736             : 
     737           0 :   using events_and_dense_triggers_dg_postprocessors = tmpl::list<
     738             :       ::domain::CheckFunctionsOfTimeAreReadyPostprocessor<volume_dim>,
     739             :       AlwaysReadyPostprocessor<
     740             :           typename system::template primitive_from_conservative<
     741             :               ordered_list_of_primitive_recovery_schemes>>>;
     742             : 
     743           0 :   using events_and_dense_triggers_subcell_postprocessors = tmpl::list<
     744             :       ::domain::CheckFunctionsOfTimeAreReadyPostprocessor<volume_dim>,
     745             :       AlwaysReadyPostprocessor<
     746             :           grmhd::GhValenciaDivClean::subcell::FixConservativesAndComputePrims<
     747             :               ordered_list_of_primitive_recovery_schemes, system>>>;
     748             : 
     749           0 :   using dg_step_actions = tmpl::flatten<tmpl::list<
     750             :       dg::Actions::Filter<::Filters::Exponential<0>,
     751             :                           tmpl::list<gr::Tags::SpacetimeMetric<DataVector, 3>,
     752             :                                      gh::Tags::Pi<DataVector, 3>,
     753             :                                      gh::Tags::Phi<DataVector, 3>>>,
     754             :       evolution::dg::Actions::ComputeTimeDerivative<
     755             :           volume_dim, system, AllStepChoosers, local_time_stepping,
     756             :           use_dg_element_collection>,
     757             :       evolution::dg::Actions::ApplyBoundaryCorrectionsToTimeDerivative<
     758             :           volume_dim, use_dg_element_collection>,
     759             :       tmpl::conditional_t<
     760             :           UseControlSystems,
     761             :           Actions::MutateApply<grmhd::GhValenciaDivClean::subcell::
     762             :                                    ZeroMhdTimeDerivatives<system>>,
     763             :           tmpl::list<>>,
     764             :       Actions::MutateApply<RecordTimeStepperData<system>>,
     765             :       tmpl::conditional_t<
     766             :           local_time_stepping,
     767             :           tmpl::list<
     768             :               evolution::Actions::RunEventsAndDenseTriggers<tmpl::push_front<
     769             :                   events_and_dense_triggers_dg_postprocessors,
     770             :                   evolution::dg::ApplyLtsDenseBoundaryCorrections<
     771             :                       derived_metavars>>>,
     772             :               Actions::MutateApply<UpdateU<system, local_time_stepping>>,
     773             :               evolution::dg::Actions::ApplyLtsBoundaryCorrections<
     774             :                   volume_dim, use_dg_element_collection>,
     775             :               Actions::MutateApply<ChangeTimeStepperOrder<system>>>,
     776             :           tmpl::list<
     777             :               evolution::Actions::RunEventsAndDenseTriggers<
     778             :                   events_and_dense_triggers_dg_postprocessors>,
     779             :               control_system::Actions::LimitTimeStep<control_systems>,
     780             :               Actions::MutateApply<UpdateU<system, local_time_stepping>>>>,
     781             :       tmpl::conditional_t<
     782             :           use_dg_subcell,
     783             :           // Note: The primitive variables are computed as part of the TCI.
     784             :           evolution::dg::subcell::Actions::TciAndRollback<
     785             :               grmhd::GhValenciaDivClean::subcell::TciOnDgGrid<
     786             :                   tmpl::front<ordered_list_of_primitive_recovery_schemes>>>,
     787             :           tmpl::list<>>,
     788             :       Actions::MutateApply<CleanHistory<system>>,
     789             :       tmpl::conditional_t<
     790             :           local_time_stepping,
     791             :           Actions::MutateApply<evolution::dg::CleanMortarHistory<volume_dim>>,
     792             :           tmpl::list<>>,
     793             :       tmpl::conditional_t<
     794             :           use_dg_subcell,
     795             :           tmpl::list<parameterized_deleptonization,
     796             :                      VariableFixing::Actions::FixVariables<
     797             :                          VariableFixing::FixToAtmosphere<volume_dim>>,
     798             :                      VariableFixing::Actions::FixVariables<
     799             :                          VariableFixing::LimitLorentzFactor>,
     800             :                      Actions::UpdateConservatives>,
     801             :           tmpl::list<parameterized_deleptonization,
     802             :                      VariableFixing::Actions::FixVariables<
     803             :                          grmhd::ValenciaDivClean::FixConservatives>,
     804             :                      Actions::UpdatePrimitives>>>>;
     805             : 
     806           0 :   using dg_subcell_step_actions = tmpl::flatten<tmpl::list<
     807             :       evolution::dg::subcell::Actions::SelectNumericalMethod,
     808             : 
     809             :       Actions::Label<evolution::dg::subcell::Actions::Labels::BeginDg>,
     810             :       dg_step_actions,
     811             :       Actions::Goto<evolution::dg::subcell::Actions::Labels::EndOfSolvers>,
     812             : 
     813             :       Actions::Label<evolution::dg::subcell::Actions::Labels::BeginSubcell>,
     814             :       tmpl::conditional_t<local_time_stepping,
     815             :                           // This is just to adjust for FixedLtsRatio, so we
     816             :                           // can pass an empty list of StepChoosers.
     817             :                           Actions::MutateApply<ChangeStepSize<tmpl::list<>>>,
     818             :                           tmpl::list<>>,
     819             :       Actions::MutateApply<evolution::dg::subcell::fd::CellCenteredFlux<
     820             :           system, grmhd::ValenciaDivClean::ComputeFluxes, volume_dim, false>>,
     821             :       evolution::dg::subcell::Actions::SendDataForReconstruction<
     822             :           volume_dim,
     823             :           grmhd::GhValenciaDivClean::subcell::PrimitiveGhostVariables,
     824             :           use_dg_element_collection>,
     825             :       evolution::dg::subcell::Actions::ReceiveDataForReconstruction<volume_dim>,
     826             :       Actions::Label<
     827             :           evolution::dg::subcell::Actions::Labels::BeginSubcellAfterDgRollback>,
     828             :       Actions::MutateApply<
     829             :           grmhd::GhValenciaDivClean::subcell::PrimsAfterRollback<
     830             :               ordered_list_of_primitive_recovery_schemes>>,
     831             :       Actions::MutateApply<evolution::dg::subcell::fd::CellCenteredFlux<
     832             :           system, grmhd::ValenciaDivClean::ComputeFluxes, volume_dim, true>>,
     833             :       evolution::dg::subcell::fd::Actions::TakeTimeStep<
     834             :           grmhd::GhValenciaDivClean::subcell::TimeDerivative<system>>,
     835             :       Actions::MutateApply<RecordTimeStepperData<system>>,
     836             :       evolution::Actions::RunEventsAndDenseTriggers<
     837             :           events_and_dense_triggers_subcell_postprocessors>,
     838             :       tmpl::conditional_t<
     839             :           local_time_stepping, tmpl::list<>,
     840             :           control_system::Actions::LimitTimeStep<control_systems>>,
     841             :       Actions::MutateApply<UpdateU<system, local_time_stepping>>,
     842             :       Actions::MutateApply<CleanHistory<system>>,
     843             :       tmpl::conditional_t<
     844             :           local_time_stepping,
     845             :           Actions::MutateApply<evolution::dg::CleanMortarHistory<volume_dim>>,
     846             :           tmpl::list<>>,
     847             :       Actions::MutateApply<
     848             :           grmhd::GhValenciaDivClean::subcell::FixConservativesAndComputePrims<
     849             :               ordered_list_of_primitive_recovery_schemes, system>>,
     850             :       evolution::dg::subcell::Actions::TciAndSwitchToDg<
     851             :           grmhd::GhValenciaDivClean::subcell::TciOnFdGrid>,
     852             :       Actions::MutateApply<
     853             :           grmhd::GhValenciaDivClean::subcell::ResizeAndComputePrims<
     854             :               ordered_list_of_primitive_recovery_schemes>>,
     855             :       parameterized_deleptonization,
     856             :       VariableFixing::Actions::FixVariables<
     857             :           VariableFixing::FixToAtmosphere<volume_dim>>,
     858             :       VariableFixing::Actions::FixVariables<VariableFixing::LimitLorentzFactor>,
     859             :       Actions::UpdateConservatives,
     860             : 
     861             :       Actions::Label<evolution::dg::subcell::Actions::Labels::EndOfSolvers>>>;
     862             : 
     863           0 :   using step_actions =
     864             :       tmpl::conditional_t<use_dg_subcell, dg_subcell_step_actions,
     865             :                           dg_step_actions>;
     866             : 
     867           0 :   using initialization_actions = tmpl::list<
     868             :       Initialization::Actions::InitializeItems<
     869             :           Initialization::TimeStepping<derived_metavars, TimeStepperBase>,
     870             :           evolution::dg::Initialization::Domain<derived_metavars,
     871             :                                                 use_control_systems>,
     872             :           Initialization::TimeStepperHistory<derived_metavars>>,
     873             :       Initialization::Actions::ConservativeSystem<system>,
     874             :       // This conditional is untested and probably doesn't work if
     875             :       // `use_dg_subcell` is `false`
     876             :       tmpl::conditional_t<
     877             :           use_dg_subcell,
     878             :           tmpl::list<
     879             :               evolution::dg::subcell::Actions::SetSubcellGrid<volume_dim,
     880             :                                                               system, true>,
     881             :               Actions::MutateApply<evolution::dg::subcell::SetInterpolators<
     882             :                   volume_dim,
     883             :                   grmhd::GhValenciaDivClean::fd::Tags::Reconstructor<system>>>>,
     884             :           evolution::Initialization::Actions::SetVariables<
     885             :               ::domain::Tags::Coordinates<volume_dim, Frame::ElementLogical>>>,
     886             :       Initialization::Actions::AddComputeTags<
     887             :           StepChoosers::step_chooser_compute_tags<
     888             :               GhValenciaDivCleanTemplateBase, local_time_stepping>>,
     889             :       ::evolution::dg::Initialization::Mortars<volume_dim>,
     890             :       tmpl::conditional_t<use_dg_subcell and local_time_stepping,
     891             :                           Initialization::Actions::InitializeItems<
     892             :                               evolution::dg::subcell::DisableLts<3>>,
     893             :                           tmpl::list<>>,
     894             :       evolution::Actions::InitializeRunEventsAndDenseTriggers,
     895             :       intrp::Actions::ElementInitInterpPoints<volume_dim,
     896             :                                               interpolation_target_tags>,
     897             :       tmpl::conditional_t<
     898             :           use_control_systems,
     899             :           control_system::Actions::InitializeMeasurements<control_systems>,
     900             :           tmpl::list<>>,
     901             :       Parallel::Actions::TerminatePhase>;
     902             : 
     903           0 :   using import_initial_data_action_lists = tmpl::list<
     904             :       Parallel::PhaseActions<
     905             :           Parallel::Phase::RegisterWithElementDataReader,
     906             :           tmpl::list<importers::Actions::RegisterWithElementDataReader,
     907             :                      Parallel::Actions::TerminatePhase>>,
     908             :       Parallel::PhaseActions<
     909             :           Parallel::Phase::ImportInitialData,
     910             :           tmpl::list<
     911             :               grmhd::GhValenciaDivClean::Actions::SetInitialData,
     912             :               grmhd::GhValenciaDivClean::Actions::ReceiveNumericInitialData,
     913             :               Parallel::Actions::TerminatePhase>>>;
     914             : 
     915           0 :   using dg_element_array_component = DgElementArray<
     916             :       derived_metavars,
     917             :       tmpl::flatten<tmpl::list<
     918             :           Parallel::PhaseActions<Parallel::Phase::Initialization,
     919             :                                  initialization_actions>,
     920             :           import_initial_data_action_lists,
     921             :           Parallel::PhaseActions<
     922             :               Parallel::Phase::InitializeInitialDataDependentQuantities,
     923             :               initialize_initial_data_dependent_quantities_actions>,
     924             :           Parallel::PhaseActions<
     925             :               Parallel::Phase::InitializeTimeStepperHistory,
     926             :               SelfStart::self_start_procedure<step_actions, system>>,
     927             :           Parallel::PhaseActions<Parallel::Phase::Register,
     928             :                                  tmpl::list<dg_registration_list,
     929             :                                             Parallel::Actions::TerminatePhase>>,
     930             :           Parallel::PhaseActions<Parallel::Phase::Restart,
     931             :                                  tmpl::list<dg_registration_list,
     932             :                                             Parallel::Actions::TerminatePhase>>,
     933             :           Parallel::PhaseActions<
     934             :               Parallel::Phase::WriteCheckpoint,
     935             :               tmpl::list<evolution::Actions::RunEventsAndTriggers<
     936             :                              Triggers::WhenToCheck::AtCheckpoints>,
     937             :                          Parallel::Actions::TerminatePhase>>,
     938             :           Parallel::PhaseActions<
     939             :               Parallel::Phase::Evolve,
     940             :               tmpl::flatten<tmpl::list<
     941             :                   ::domain::Actions::CheckFunctionsOfTimeAreReady<volume_dim>,
     942             :                   parameterized_deleptonization,
     943             :                   VariableFixing::Actions::FixVariables<
     944             :                       VariableFixing::FixToAtmosphere<volume_dim>>,
     945             :                   VariableFixing::Actions::FixVariables<
     946             :                       VariableFixing::LimitLorentzFactor>,
     947             :                   Actions::UpdateConservatives,
     948             :                   std::conditional_t<local_time_stepping,
     949             :                                      evolution::Actions::RunEventsAndTriggers<
     950             :                                          Triggers::WhenToCheck::AtSteps>,
     951             :                                      tmpl::list<>>,
     952             :                   evolution::Actions::RunEventsAndTriggers<
     953             :                       Triggers::WhenToCheck::AtSlabs>,
     954             :                   Actions::ChangeSlabSize, step_actions,
     955             :                   Actions::MutateApply<AdvanceTime<>>,
     956             :                   PhaseControl::Actions::ExecutePhaseChange>>>,
     957             : 
     958             :           tmpl::conditional_t<
     959             :               UseControlSystems,
     960             :               Parallel::PhaseActions<
     961             :                   Parallel::Phase::DisableRotationControl,
     962             :                   tmpl::list<
     963             :                       control_system::Actions::SwitchGridRotationToSettle,
     964             :                       Parallel::Actions::TerminatePhase>>,
     965             :               tmpl::list<>>,
     966             : 
     967             :           Parallel::PhaseActions<
     968             :               Parallel::Phase::PostFailureCleanup,
     969             :               tmpl::list<Actions::RunEventsOnFailure<Tags::Time>,
     970             :                          Parallel::Actions::TerminatePhase>>>>>;
     971             : 
     972           0 :   struct registration
     973             :       : tt::ConformsTo<Parallel::protocols::RegistrationMetavariables> {
     974           0 :     using element_registrars =
     975             :         tmpl::map<tmpl::pair<dg_element_array_component, dg_registration_list>>;
     976             :   };
     977             : 
     978           0 :   using component_list = tmpl::flatten<tmpl::list<
     979             :       observers::Observer<derived_metavars>,
     980             :       observers::ObserverWriter<derived_metavars>,
     981             :       importers::ElementDataReader<derived_metavars>,
     982             :       control_system::control_components<derived_metavars, control_systems>,
     983             :       intrp::InterpolationTarget<derived_metavars, InterpolationTargetTags>...,
     984             :       dg_element_array_component>>;
     985             : };
     986             : 
     987           0 : struct BondiSachs : tt::ConformsTo<intrp::protocols::InterpolationTargetTag> {
     988           0 :   static std::string name() { return "BondiSachsInterpolation"; }
     989           0 :   using temporal_id = ::Tags::Time;
     990           0 :   using vars_to_interpolate_to_target =
     991             :       typename gh::System<3>::variables_tag::tags_list;
     992           0 :   using compute_target_points =
     993             :       intrp::TargetPoints::Sphere<BondiSachs, ::Frame::Inertial>;
     994           0 :   using post_interpolation_callbacks =
     995             :       tmpl::list<intrp::callbacks::DumpBondiSachsOnWorldtube<BondiSachs>>;
     996           0 :   using compute_items_on_target = tmpl::list<>;
     997             :   template <typename Metavariables>
     998           0 :   using interpolating_component =
     999             :       typename Metavariables::dg_element_array_component;
    1000             : };

Generated by: LCOV version 1.14