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

Generated by: LCOV version 1.14