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/RecordTimeStepperData.hpp"
218 : #include "Time/Actions/SelfStartActions.hpp"
219 : #include "Time/Actions/SelfStartActions.hpp" // IWYU pragma: keep
220 : #include "Time/Actions/UpdateU.hpp"
221 : #include "Time/ChangeSlabSize/Action.hpp"
222 : #include "Time/StepChoosers/Cfl.hpp"
223 : #include "Time/StepChoosers/Constant.hpp"
224 : #include "Time/StepChoosers/Factory.hpp"
225 : #include "Time/StepChoosers/Increase.hpp"
226 : #include "Time/StepChoosers/PreventRapidIncrease.hpp"
227 : #include "Time/StepChoosers/StepChooser.hpp"
228 : #include "Time/StepChoosers/StepToTimes.hpp"
229 : #include "Time/Tags/Time.hpp"
230 : #include "Time/Tags/TimeStepId.hpp"
231 : #include "Time/TimeSequence.hpp"
232 : #include "Time/TimeSteppers/Factory.hpp"
233 : #include "Time/TimeSteppers/LtsTimeStepper.hpp"
234 : #include "Time/TimeSteppers/TimeStepper.hpp"
235 : #include "Time/Triggers/TimeTriggers.hpp"
236 : #include "Utilities/ErrorHandling/Error.hpp"
237 : #include "Utilities/Functional.hpp"
238 : #include "Utilities/NoSuchType.hpp"
239 : #include "Utilities/ProtocolHelpers.hpp"
240 : #include "Utilities/TMPL.hpp"
241 :
242 : /// \cond
243 : namespace Frame {
244 : // IWYU pragma: no_forward_declare MathFunction
245 : struct Inertial;
246 : } // namespace Frame
247 : namespace PUP {
248 : class er;
249 : } // namespace PUP
250 : namespace Parallel {
251 : template <typename Metavariables>
252 : class CProxy_GlobalCache;
253 : } // namespace Parallel
254 : /// \endcond
255 :
256 : template <bool UseDgSubcell>
257 0 : struct GhValenciaDivCleanDefaults {
258 : public:
259 0 : static constexpr size_t volume_dim = 3;
260 0 : using domain_frame = Frame::Inertial;
261 0 : static constexpr bool use_damped_harmonic_rollon = true;
262 0 : using temporal_id = Tags::TimeStepId;
263 0 : using TimeStepperBase = TimeStepper;
264 :
265 0 : static constexpr bool local_time_stepping =
266 : TimeStepperBase::local_time_stepping;
267 :
268 0 : using system = grmhd::GhValenciaDivClean::System;
269 0 : using analytic_variables_tags =
270 : typename system::primitive_variables_tag::tags_list;
271 0 : using analytic_solution_fields =
272 : tmpl::append<typename system::primitive_variables_tag::tags_list,
273 : typename system::gh_system::variables_tag::tags_list>;
274 0 : using ordered_list_of_primitive_recovery_schemes = tmpl::list<
275 : grmhd::ValenciaDivClean::PrimitiveRecoverySchemes::KastaunEtAl,
276 : grmhd::ValenciaDivClean::PrimitiveRecoverySchemes::NewmanHamlin,
277 : grmhd::ValenciaDivClean::PrimitiveRecoverySchemes::PalenzuelaEtAl>;
278 :
279 : // Do not limit the divergence-cleaning field Phi or the GH fields
280 0 : using limiter = Tags::Limiter<
281 : Limiters::Minmod<3, tmpl::list<grmhd::ValenciaDivClean::Tags::TildeD,
282 : grmhd::ValenciaDivClean::Tags::TildeTau,
283 : grmhd::ValenciaDivClean::Tags::TildeS<>,
284 : grmhd::ValenciaDivClean::Tags::TildeB<>>>>;
285 :
286 0 : using initialize_initial_data_dependent_quantities_actions = tmpl::list<
287 : gh::Actions::InitializeGhAnd3Plus1Variables<volume_dim>,
288 : Actions::MutateApply<tmpl::conditional_t<
289 : UseDgSubcell, grmhd::GhValenciaDivClean::SetPiAndPhiFromConstraints,
290 : gh::gauges::SetPiAndPhiFromConstraints<3>>>,
291 : Initialization::Actions::AddComputeTags<
292 : tmpl::list<gr::Tags::SqrtDetSpatialMetricCompute<
293 : DataVector, volume_dim, domain_frame>>>,
294 : VariableFixing::Actions::FixVariables<
295 : VariableFixing::FixToAtmosphere<volume_dim>>,
296 : VariableFixing::Actions::FixVariables<VariableFixing::LimitLorentzFactor>,
297 : Actions::UpdateConservatives,
298 : tmpl::conditional_t<
299 : UseDgSubcell,
300 : tmpl::list<
301 : Initialization::Actions::AddSimpleTags<
302 : grmhd::ValenciaDivClean::SetVariablesNeededFixingToFalse>,
303 :
304 : evolution::dg::subcell::Actions::SetAndCommunicateInitialRdmpData<
305 : volume_dim,
306 : grmhd::ValenciaDivClean::subcell::SetInitialRdmpData>,
307 : evolution::dg::subcell::Actions::ComputeAndSendTciOnInitialGrid<
308 : volume_dim, system,
309 : grmhd::GhValenciaDivClean::subcell::TciOnFdGrid>,
310 : evolution::dg::subcell::Actions::SetInitialGridFromTciData<
311 : volume_dim, system>,
312 : Actions::MutateApply<
313 : grmhd::GhValenciaDivClean::subcell::ResizeAndComputePrims<
314 : ordered_list_of_primitive_recovery_schemes>>,
315 :
316 : VariableFixing::Actions::FixVariables<
317 : VariableFixing::FixToAtmosphere<volume_dim>>,
318 : VariableFixing::Actions::FixVariables<
319 : VariableFixing::LimitLorentzFactor>,
320 : Actions::UpdateConservatives,
321 : Actions::MutateApply<
322 : grmhd::GhValenciaDivClean::SetPiAndPhiFromConstraints>>,
323 : tmpl::list<>>,
324 : Parallel::Actions::TerminatePhase>;
325 :
326 : // NOLINTNEXTLINE(google-runtime-references)
327 0 : void pup(PUP::er& /*p*/) {}
328 : };
329 :
330 : template <typename EvolutionMetavarsDerived, bool UseDgSubcell,
331 : bool UseControlSystems>
332 0 : struct GhValenciaDivCleanTemplateBase;
333 :
334 : template <bool UseDgSubcell, bool UseControlSystems,
335 : template <bool, typename...> class EvolutionMetavarsDerived,
336 : typename... InterpolationTargetTags>
337 0 : struct GhValenciaDivCleanTemplateBase<
338 : EvolutionMetavarsDerived<UseControlSystems, InterpolationTargetTags...>,
339 : UseDgSubcell, UseControlSystems>
340 : : public virtual GhValenciaDivCleanDefaults<UseDgSubcell> {
341 0 : using derived_metavars =
342 : EvolutionMetavarsDerived<UseControlSystems, 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 : using system = typename defaults::system;
352 0 : using analytic_variables_tags = typename defaults::analytic_variables_tags;
353 0 : using analytic_solution_fields = typename defaults::analytic_solution_fields;
354 0 : using ordered_list_of_primitive_recovery_schemes =
355 : typename defaults::ordered_list_of_primitive_recovery_schemes;
356 0 : using limiter = typename defaults::limiter;
357 0 : using initialize_initial_data_dependent_quantities_actions =
358 : typename defaults::initialize_initial_data_dependent_quantities_actions;
359 :
360 0 : static constexpr bool use_dg_subcell = UseDgSubcell;
361 0 : static constexpr bool use_control_systems = UseControlSystems;
362 :
363 0 : using initial_data_list =
364 : ghmhd::GhValenciaDivClean::InitialData::initial_data_list;
365 :
366 0 : using initial_data_tag = evolution::initial_data::Tags::InitialData;
367 0 : using equation_of_state_tag = hydro::Tags::GrmhdEquationOfState;
368 0 : using measurement = control_system::measurements::BothNSCenters;
369 0 : using control_systems = tmpl::conditional_t<
370 : use_control_systems,
371 : tmpl::list<control_system::Systems::Rotation<3, measurement>,
372 : control_system::Systems::Expansion<2, measurement>,
373 : control_system::Systems::Translation<2, measurement>>,
374 : tmpl::list<>>;
375 :
376 0 : using interpolator_source_vars =
377 : tmpl::remove_duplicates<tmpl::flatten<tmpl::list<
378 : typename InterpolationTargetTags::vars_to_interpolate_to_target...>>>;
379 :
380 0 : using analytic_compute = evolution::Tags::AnalyticSolutionsCompute<
381 : volume_dim, analytic_solution_fields, use_dg_subcell, initial_data_list>;
382 0 : using error_compute = Tags::ErrorsCompute<analytic_solution_fields>;
383 0 : using error_tags = db::wrap_tags_in<Tags::Error, analytic_solution_fields>;
384 0 : using observe_fields = tmpl::append<
385 : typename system::variables_tag::tags_list,
386 : typename system::primitive_variables_tag::tags_list, error_tags,
387 : tmpl::list<
388 : hydro::Tags::TildeDInHalfPlaneCompute<
389 : DataVector, volume_dim,
390 : ::hydro::HalfPlaneIntegralMask::PositiveXOnly,
391 : Events::Tags::ObserverCoordinates<3, Frame::Grid>>,
392 : hydro::Tags::TildeDInHalfPlaneCompute<
393 : DataVector, volume_dim,
394 : ::hydro::HalfPlaneIntegralMask::NegativeXOnly,
395 : Events::Tags::ObserverCoordinates<3, Frame::Grid>>,
396 : hydro::Tags::MassWeightedCoordsCompute<
397 : DataVector, volume_dim,
398 : ::hydro::HalfPlaneIntegralMask::PositiveXOnly,
399 : Events::Tags::ObserverCoordinates<3, Frame::Grid>,
400 : Events::Tags::ObserverCoordinates<3, Frame::Inertial>,
401 : Frame::Inertial>,
402 : hydro::Tags::MassWeightedCoordsCompute<
403 : DataVector, volume_dim,
404 : ::hydro::HalfPlaneIntegralMask::NegativeXOnly,
405 : Events::Tags::ObserverCoordinates<3, Frame::Grid>,
406 : Events::Tags::ObserverCoordinates<3, Frame::Inertial>,
407 : Frame::Inertial>,
408 :
409 : hydro::Tags::MassWeightedInternalEnergyCompute<DataVector>,
410 : hydro::Tags::MassWeightedKineticEnergyCompute<DataVector>,
411 : hydro::Tags::TildeDUnboundUtCriterionCompute<DataVector, volume_dim,
412 : domain_frame>,
413 : hydro::Tags::LowerSpatialFourVelocityCompute,
414 : hydro::Tags::MassWeightedCoordsCompute<
415 : DataVector, volume_dim, ::hydro::HalfPlaneIntegralMask::None,
416 : Events::Tags::ObserverCoordinates<3, Frame::Grid>,
417 : Events::Tags::ObserverCoordinates<3, Frame::Inertial>,
418 : Frame::Inertial>,
419 : gr::Tags::SpacetimeNormalOneFormCompute<DataVector, volume_dim,
420 : domain_frame>,
421 : gr::Tags::SpacetimeNormalVectorCompute<DataVector, volume_dim,
422 : domain_frame>,
423 : gr::Tags::InverseSpacetimeMetricCompute<DataVector, volume_dim,
424 : domain_frame>,
425 : gr::Tags::Lapse<DataVector>,
426 : gr::Tags::Shift<DataVector, volume_dim, domain_frame>,
427 : gr::Tags::SpatialMetric<DataVector, volume_dim, domain_frame>,
428 : gr::Tags::DetSpatialMetric<DataVector>,
429 : gr::Tags::InverseSpatialMetric<DataVector, volume_dim>,
430 : gh::Tags::ExtrinsicCurvatureCompute<volume_dim, domain_frame>,
431 : gh::Tags::DerivSpatialMetricCompute<volume_dim, ::Frame::Inertial>,
432 : gr::Tags::SpatialChristoffelFirstKindCompute<DataVector, volume_dim,
433 : ::Frame::Inertial>,
434 : gr::Tags::SpatialChristoffelSecondKindCompute<DataVector, volume_dim,
435 : ::Frame::Inertial>,
436 : ::Tags::DerivTensorCompute<
437 : gr::Tags::SpatialChristoffelSecondKind<DataVector, volume_dim>,
438 : ::Events::Tags::ObserverInverseJacobian<
439 : volume_dim, Frame::ElementLogical, Frame::Inertial>,
440 : ::Events::Tags::ObserverMesh<volume_dim>>,
441 : gr::Tags::SpatialRicciCompute<DataVector, volume_dim,
442 : ::Frame::Inertial>,
443 : gr::Tags::SpatialRicciScalarCompute<DataVector, volume_dim,
444 : ::Frame::Inertial>,
445 :
446 : // Constraints
447 : gh::Tags::GaugeConstraintCompute<volume_dim, domain_frame>,
448 : gh::Tags::TwoIndexConstraintCompute<volume_dim, ::Frame::Inertial>,
449 : gh::Tags::ThreeIndexConstraintCompute<volume_dim, ::Frame::Inertial>,
450 : gh::Tags::FourIndexConstraintCompute<3, ::Frame::Inertial>,
451 : gh::Tags::FConstraintCompute<3, ::Frame::Inertial>,
452 :
453 : // L2 norms of constraints
454 : ::Tags::PointwiseL2NormCompute<
455 : gh::Tags::GaugeConstraint<DataVector, volume_dim, domain_frame>>,
456 : ::Tags::PointwiseL2NormCompute<
457 : gh::Tags::TwoIndexConstraint<DataVector, volume_dim>>,
458 : ::Tags::PointwiseL2NormCompute<
459 : gh::Tags::ThreeIndexConstraint<DataVector, volume_dim>>,
460 : ::Tags::PointwiseL2NormCompute<
461 : gh::Tags::FourIndexConstraint<DataVector, 3>>,
462 : gh::Tags::ConstraintEnergyCompute<3, ::Frame::Inertial>,
463 : ::Tags::PointwiseL2NormCompute<gh::Tags::FConstraint<DataVector, 3>>,
464 : ::Tags::PointwiseL2NormCompute<
465 : gh::Tags::GaugeH<DataVector, volume_dim>>,
466 : ::Tags::PointwiseL2NormCompute<gh::Tags::Phi<DataVector, volume_dim>>,
467 : ::Tags::PointwiseL2NormCompute<
468 : ::Tags::deriv<gr::Tags::SpacetimeMetric<DataVector, volume_dim>,
469 : tmpl::size_t<volume_dim>, Frame::Inertial>>,
470 :
471 : // GW Tags
472 : grmhd::ValenciaDivClean::Tags::QuadrupoleMomentCompute<
473 : DataVector, volume_dim,
474 : ::Events::Tags::ObserverCoordinates<volume_dim, Frame::Inertial>>,
475 : grmhd::ValenciaDivClean::Tags::QuadrupoleMomentDerivativeCompute<
476 : DataVector, volume_dim,
477 : ::Events::Tags::ObserverCoordinates<volume_dim, Frame::Inertial>,
478 : hydro::Tags::SpatialVelocity<DataVector, volume_dim,
479 : Frame::Inertial>>,
480 : hydro::Tags::TransportVelocityCompute<DataVector, volume_dim,
481 : Frame::Inertial>,
482 : grmhd::ValenciaDivClean::Tags::QuadrupoleMomentDerivativeCompute<
483 : DataVector, volume_dim,
484 : ::Events::Tags::ObserverCoordinates<volume_dim, Frame::Inertial>,
485 : hydro::Tags::TransportVelocity<DataVector, volume_dim,
486 : Frame::Inertial>>,
487 : gh::Tags::TimeDerivLapseCompute<volume_dim, Frame::Inertial>,
488 : gh::Tags::TimeDerivShiftCompute<volume_dim, Frame::Inertial>,
489 : ::Tags::dt<gh::Tags::Phi<DataVector, volume_dim, Frame::Inertial>>,
490 : ::Tags::dt<gh::Tags::Pi<DataVector, volume_dim, Frame::Inertial>>,
491 : gh::Tags::SecondTimeDerivOfSpacetimeMetricCompute<volume_dim,
492 : Frame::Inertial>,
493 : ::Tags::DerivTensorCompute<
494 : gr::Tags::ExtrinsicCurvature<DataVector, 3>,
495 : ::Events::Tags::ObserverInverseJacobian<
496 : volume_dim, Frame::ElementLogical, Frame::Inertial>,
497 : ::Events::Tags::ObserverMesh<volume_dim>>,
498 : gr::Tags::WeylElectricCompute<DataVector, 3, Frame::Inertial>,
499 : gr::Tags::Psi4RealCompute<Frame::Inertial>
500 :
501 : >,
502 : tmpl::conditional_t<
503 : use_dg_subcell,
504 : tmpl::list<evolution::dg::subcell::Tags::TciStatusCompute<volume_dim>,
505 : evolution::dg::subcell::Tags::ObserverCoordinatesCompute<
506 : volume_dim, Frame::ElementLogical>,
507 : evolution::dg::subcell::Tags::ObserverCoordinatesCompute<
508 : volume_dim, Frame::Grid>,
509 : evolution::dg::subcell::Tags::ObserverCoordinatesCompute<
510 : volume_dim, Frame::Inertial>>,
511 : tmpl::list<::Events::Tags::ObserverCoordinatesCompute<
512 : volume_dim, Frame::ElementLogical>,
513 : ::Events::Tags::ObserverCoordinatesCompute<volume_dim,
514 : Frame::Grid>,
515 : ::Events::Tags::ObserverCoordinatesCompute<
516 : volume_dim, Frame::Inertial>>>>;
517 0 : using integrand_fields = tmpl::append<
518 : typename system::variables_tag::tags_list,
519 : tmpl::list<
520 : // Control system tags
521 : hydro::Tags::TildeDInHalfPlaneCompute<
522 : DataVector, volume_dim,
523 : ::hydro::HalfPlaneIntegralMask::PositiveXOnly,
524 : Events::Tags::ObserverCoordinates<3, Frame::Grid>>,
525 : hydro::Tags::TildeDInHalfPlaneCompute<
526 : DataVector, volume_dim,
527 : ::hydro::HalfPlaneIntegralMask::NegativeXOnly,
528 : Events::Tags::ObserverCoordinates<3, Frame::Grid>>,
529 : hydro::Tags::MassWeightedCoordsCompute<
530 : DataVector, volume_dim,
531 : ::hydro::HalfPlaneIntegralMask::PositiveXOnly,
532 : Events::Tags::ObserverCoordinates<3, Frame::Grid>,
533 : Events::Tags::ObserverCoordinates<3, Frame::Inertial>,
534 : Frame::Inertial>,
535 : hydro::Tags::MassWeightedCoordsCompute<
536 : DataVector, volume_dim,
537 : ::hydro::HalfPlaneIntegralMask::NegativeXOnly,
538 : Events::Tags::ObserverCoordinates<3, Frame::Grid>,
539 : Events::Tags::ObserverCoordinates<3, Frame::Inertial>,
540 : Frame::Inertial>,
541 :
542 : // General tags
543 : hydro::Tags::MassWeightedInternalEnergyCompute<DataVector>,
544 : hydro::Tags::MassWeightedKineticEnergyCompute<DataVector>,
545 : hydro::Tags::TildeDUnboundUtCriterionCompute<DataVector, volume_dim,
546 : domain_frame>,
547 : hydro::Tags::MassWeightedCoordsCompute<
548 : DataVector, volume_dim, ::hydro::HalfPlaneIntegralMask::None,
549 : Events::Tags::ObserverCoordinates<3, Frame::Grid>,
550 : Events::Tags::ObserverCoordinates<3, Frame::Inertial>,
551 : Frame::Inertial>>>;
552 :
553 0 : using non_tensor_compute_tags = tmpl::append<
554 : tmpl::conditional_t<
555 : use_dg_subcell,
556 : tmpl::list<
557 : evolution::dg::subcell::Tags::ObserverMeshCompute<volume_dim>,
558 : evolution::dg::subcell::Tags::ObserverInverseJacobianCompute<
559 : volume_dim, Frame::ElementLogical, Frame::Inertial>,
560 : evolution::dg::subcell::Tags::
561 : ObserverJacobianAndDetInvJacobianCompute<
562 : volume_dim, Frame::ElementLogical, Frame::Inertial>,
563 : evolution::dg::subcell::Tags::ObserverMeshVelocityCompute<
564 : volume_dim>>,
565 : tmpl::list<::Events::Tags::ObserverMeshCompute<volume_dim>,
566 : ::Events::Tags::ObserverInverseJacobianCompute<
567 : volume_dim, Frame::ElementLogical, Frame::Inertial>,
568 : ::Events::Tags::ObserverJacobianCompute<
569 : volume_dim, Frame::ElementLogical, Frame::Inertial>,
570 : ::Events::Tags::ObserverDetInvJacobianCompute<
571 : Frame::ElementLogical, Frame::Inertial>>>,
572 : tmpl::list<analytic_compute, error_compute>,
573 : tmpl::list<::Tags::DerivCompute<
574 : typename system::variables_tag,
575 : ::Events::Tags::ObserverMesh<volume_dim>,
576 : ::Events::Tags::ObserverInverseJacobian<
577 : volume_dim, Frame::ElementLogical, Frame::Inertial>,
578 : typename system::gradient_variables>,
579 : gh::gauges::Tags::GaugeAndDerivativeCompute<volume_dim>>>;
580 :
581 0 : struct factory_creation
582 : : tt::ConformsTo<Options::protocols::FactoryCreation> {
583 : private:
584 0 : using boundary_conditions = grmhd::GhValenciaDivClean::BoundaryConditions::
585 : standard_boundary_conditions;
586 :
587 : public:
588 0 : using factory_classes = tmpl::map<
589 : tmpl::pair<DenseTrigger,
590 : tmpl::append<DenseTriggers::standard_dense_triggers,
591 : control_system::control_system_triggers<
592 : control_systems>>>,
593 : tmpl::pair<DomainCreator<volume_dim>,
594 : // Currently control systems can only be used with BCO
595 : // domains
596 : tmpl::conditional_t<
597 : use_control_systems,
598 : tmpl::list<::domain::creators::BinaryCompactObject>,
599 : domain_creators<volume_dim>>>,
600 : tmpl::pair<Event,
601 : tmpl::flatten<tmpl::list<
602 : Events::Completion,
603 : dg::Events::field_observations<
604 : volume_dim, observe_fields, non_tensor_compute_tags>,
605 : Events::ObserveAtExtremum<observe_fields,
606 : non_tensor_compute_tags>,
607 : Events::time_events<system>,
608 : control_system::metafunctions::control_system_events<
609 : control_systems>,
610 : intrp::Events::InterpolateWithoutInterpComponent<
611 : volume_dim, InterpolationTargetTags,
612 : interpolator_source_vars>...>>>,
613 : tmpl::pair<
614 : grmhd::GhValenciaDivClean::BoundaryConditions::BoundaryCondition,
615 : boundary_conditions>,
616 : tmpl::pair<gh::gauges::GaugeCondition, gh::gauges::all_gauges>,
617 : tmpl::pair<evolution::initial_data::InitialData, initial_data_list>,
618 : tmpl::pair<LtsTimeStepper, TimeSteppers::lts_time_steppers>,
619 : tmpl::pair<PhaseChange, PhaseControl::factory_creatable_classes>,
620 : tmpl::pair<StepChooser<StepChooserUse::LtsStep>,
621 : StepChoosers::standard_step_choosers<system>>,
622 : tmpl::pair<
623 : StepChooser<StepChooserUse::Slab>,
624 : StepChoosers::standard_slab_choosers<system, local_time_stepping>>,
625 : tmpl::pair<TimeSequence<double>,
626 : TimeSequences::all_time_sequences<double>>,
627 : tmpl::pair<TimeSequence<std::uint64_t>,
628 : TimeSequences::all_time_sequences<std::uint64_t>>,
629 : tmpl::pair<TimeStepper, TimeSteppers::time_steppers>,
630 : tmpl::pair<Trigger, tmpl::append<Triggers::logical_triggers,
631 : Triggers::time_triggers>>>;
632 : };
633 :
634 0 : using interpolation_target_tags = tmpl::list<InterpolationTargetTags...>;
635 :
636 0 : using observed_reduction_data_tags = observers::collect_reduction_data_tags<
637 : tmpl::at<typename factory_creation::factory_classes, Event>>;
638 :
639 0 : using const_global_cache_tags = tmpl::flatten<tmpl::list<
640 : tmpl::conditional_t<
641 : use_dg_subcell,
642 : tmpl::list<
643 : grmhd::GhValenciaDivClean::fd::Tags::Reconstructor,
644 : grmhd::GhValenciaDivClean::fd::Tags::FilterOptions,
645 : ::Tags::VariableFixer<grmhd::ValenciaDivClean::FixConservatives>,
646 : grmhd::ValenciaDivClean::subcell::Tags::TciOptions>,
647 : tmpl::list<>>,
648 : grmhd::ValenciaDivClean::Tags::PrimitiveFromConservativeOptions,
649 : gh::gauges::Tags::GaugeCondition, initial_data_tag,
650 : grmhd::ValenciaDivClean::Tags::ConstraintDampingParameter,
651 : equation_of_state_tag,
652 : gh::ConstraintDamping::Tags::DampingFunctionGamma0<volume_dim,
653 : Frame::Grid>,
654 : gh::ConstraintDamping::Tags::DampingFunctionGamma1<volume_dim,
655 : Frame::Grid>,
656 : gh::ConstraintDamping::Tags::DampingFunctionGamma2<volume_dim,
657 : Frame::Grid>>>;
658 :
659 0 : using dg_registration_list =
660 : tmpl::list<intrp::Actions::RegisterElementWithInterpolator,
661 : observers::Actions::RegisterEventsWithObservers>;
662 :
663 0 : static constexpr auto default_phase_order = std::array<Parallel::Phase, 8>{
664 : {Parallel::Phase::Initialization,
665 : Parallel::Phase::RegisterWithElementDataReader,
666 : Parallel::Phase::ImportInitialData,
667 : Parallel::Phase::InitializeInitialDataDependentQuantities,
668 : Parallel::Phase::InitializeTimeStepperHistory, Parallel::Phase::Register,
669 : Parallel::Phase::Evolve, Parallel::Phase::Exit}};
670 :
671 0 : struct SubcellOptions {
672 0 : using evolved_vars_tags = typename system::variables_tag::tags_list;
673 0 : using prim_tags = typename system::primitive_variables_tag::tags_list;
674 :
675 0 : static constexpr bool subcell_enabled = use_dg_subcell;
676 0 : static constexpr bool subcell_enabled_at_external_boundary = true;
677 :
678 : // We send `ghost_zone_size` cell-centered grid points for variable
679 : // reconstruction, of which we need `ghost_zone_size-1` for reconstruction
680 : // to the internal side of the element face, and `ghost_zone_size` for
681 : // reconstruction to the external side of the element face.
682 : template <typename DbTagsList>
683 0 : static constexpr size_t ghost_zone_size(
684 : const db::DataBox<DbTagsList>& box) {
685 : return db::get<grmhd::GhValenciaDivClean::fd::Tags::Reconstructor>(box)
686 : .ghost_zone_size();
687 : }
688 :
689 0 : using DgComputeSubcellNeighborPackagedData =
690 : grmhd::GhValenciaDivClean::subcell::NeighborPackagedData;
691 :
692 0 : using GhostVariables =
693 : grmhd::GhValenciaDivClean::subcell::PrimitiveGhostVariables;
694 : };
695 :
696 0 : using events_and_dense_triggers_subcell_postprocessors = tmpl::list<
697 : ::domain::CheckFunctionsOfTimeAreReadyPostprocessor,
698 : AlwaysReadyPostprocessor<
699 : grmhd::GhValenciaDivClean::subcell::FixConservativesAndComputePrims<
700 : ordered_list_of_primitive_recovery_schemes>>>;
701 :
702 0 : using dg_step_actions = tmpl::flatten<tmpl::list<
703 : evolution::dg::Actions::ComputeTimeDerivative<
704 : volume_dim, system, AllStepChoosers, local_time_stepping>,
705 : tmpl::conditional_t<
706 : local_time_stepping,
707 : tmpl::list<evolution::dg::Actions::ApplyLtsBoundaryCorrections<
708 : system, volume_dim, false>>,
709 : tmpl::list<
710 : evolution::dg::Actions::ApplyBoundaryCorrectionsToTimeDerivative<
711 : system, volume_dim, false>,
712 : Actions::RecordTimeStepperData<system>,
713 : Actions::UpdateU<system>>>,
714 : Limiters::Actions::SendData<derived_metavars>,
715 : Limiters::Actions::Limit<derived_metavars>,
716 : VariableFixing::Actions::FixVariables<
717 : grmhd::ValenciaDivClean::FixConservatives>,
718 : Actions::UpdatePrimitives>>;
719 :
720 0 : using dg_subcell_step_actions = tmpl::flatten<tmpl::list<
721 : evolution::dg::subcell::Actions::SelectNumericalMethod,
722 :
723 : Actions::Label<evolution::dg::subcell::Actions::Labels::BeginDg>,
724 : dg::Actions::Filter<::Filters::Exponential<0>,
725 : tmpl::list<gr::Tags::SpacetimeMetric<DataVector, 3>,
726 : gh::Tags::Pi<DataVector, 3>,
727 : gh::Tags::Phi<DataVector, 3>>>,
728 : evolution::dg::Actions::ComputeTimeDerivative<
729 : volume_dim, system, AllStepChoosers, local_time_stepping>,
730 : evolution::dg::Actions::ApplyBoundaryCorrectionsToTimeDerivative<
731 : system, volume_dim, false>,
732 : tmpl::conditional_t<
733 : local_time_stepping, tmpl::list<>,
734 : tmpl::list<Actions::RecordTimeStepperData<system>,
735 : evolution::Actions::RunEventsAndDenseTriggers<
736 : events_and_dense_triggers_subcell_postprocessors>,
737 : control_system::Actions::LimitTimeStep<control_systems>,
738 : Actions::UpdateU<system>>>,
739 : // Note: The primitive variables are computed as part of the TCI.
740 : evolution::dg::subcell::Actions::TciAndRollback<
741 : grmhd::GhValenciaDivClean::subcell::TciOnDgGrid<
742 : tmpl::front<ordered_list_of_primitive_recovery_schemes>>>,
743 : VariableFixing::Actions::FixVariables<
744 : VariableFixing::FixToAtmosphere<volume_dim>>,
745 : VariableFixing::Actions::FixVariables<VariableFixing::LimitLorentzFactor>,
746 : Actions::UpdateConservatives,
747 : Actions::Goto<evolution::dg::subcell::Actions::Labels::EndOfSolvers>,
748 :
749 : Actions::Label<evolution::dg::subcell::Actions::Labels::BeginSubcell>,
750 : evolution::dg::subcell::Actions::SendDataForReconstruction<
751 : volume_dim,
752 : grmhd::GhValenciaDivClean::subcell::PrimitiveGhostVariables,
753 : local_time_stepping>,
754 : evolution::dg::subcell::Actions::ReceiveDataForReconstruction<volume_dim>,
755 : Actions::Label<
756 : evolution::dg::subcell::Actions::Labels::BeginSubcellAfterDgRollback>,
757 : Actions::MutateApply<
758 : grmhd::GhValenciaDivClean::subcell::PrimsAfterRollback<
759 : ordered_list_of_primitive_recovery_schemes>>,
760 : evolution::dg::subcell::fd::Actions::TakeTimeStep<
761 : grmhd::GhValenciaDivClean::subcell::TimeDerivative>,
762 : Actions::RecordTimeStepperData<system>,
763 : evolution::Actions::RunEventsAndDenseTriggers<
764 : events_and_dense_triggers_subcell_postprocessors>,
765 : control_system::Actions::LimitTimeStep<control_systems>,
766 : Actions::UpdateU<system>,
767 : Actions::MutateApply<
768 : grmhd::GhValenciaDivClean::subcell::FixConservativesAndComputePrims<
769 : ordered_list_of_primitive_recovery_schemes>>,
770 : evolution::dg::subcell::Actions::TciAndSwitchToDg<
771 : grmhd::GhValenciaDivClean::subcell::TciOnFdGrid>,
772 : Actions::MutateApply<
773 : grmhd::GhValenciaDivClean::subcell::ResizeAndComputePrims<
774 : ordered_list_of_primitive_recovery_schemes>>,
775 : VariableFixing::Actions::FixVariables<
776 : VariableFixing::FixToAtmosphere<volume_dim>>,
777 : VariableFixing::Actions::FixVariables<VariableFixing::LimitLorentzFactor>,
778 : Actions::UpdateConservatives,
779 :
780 : Actions::Label<evolution::dg::subcell::Actions::Labels::EndOfSolvers>>>;
781 :
782 0 : using step_actions =
783 : tmpl::conditional_t<use_dg_subcell, dg_subcell_step_actions,
784 : dg_step_actions>;
785 :
786 0 : using initialization_actions = tmpl::list<
787 : Initialization::Actions::InitializeItems<
788 : Initialization::TimeStepping<derived_metavars, TimeStepperBase>,
789 : evolution::dg::Initialization::Domain<3, use_control_systems>,
790 : Initialization::TimeStepperHistory<derived_metavars>>,
791 : Initialization::Actions::ConservativeSystem<system>,
792 : // This conditional is untested and probably doesn't work if
793 : // `use_dg_subcell` is `false`
794 : tmpl::conditional_t<
795 : use_dg_subcell,
796 : tmpl::list<evolution::dg::subcell::Actions::SetSubcellGrid<
797 : volume_dim, system, true>,
798 : Actions::MutateApply<
799 : evolution::dg::subcell::SetInterpolators<volume_dim>>>,
800 : evolution::Initialization::Actions::SetVariables<
801 : ::domain::Tags::Coordinates<volume_dim, Frame::ElementLogical>>>,
802 : Initialization::Actions::AddComputeTags<
803 : StepChoosers::step_chooser_compute_tags<
804 : GhValenciaDivCleanTemplateBase, local_time_stepping>>,
805 : ::evolution::dg::Initialization::Mortars<volume_dim, system>,
806 : Initialization::Actions::Minmod<3>,
807 : evolution::Actions::InitializeRunEventsAndDenseTriggers,
808 : intrp::Actions::ElementInitInterpPoints<
809 : intrp::Tags::InterpPointInfo<derived_metavars>>,
810 : tmpl::conditional_t<
811 : use_control_systems,
812 : control_system::Actions::InitializeMeasurements<control_systems>,
813 : tmpl::list<>>,
814 : Parallel::Actions::TerminatePhase>;
815 :
816 0 : using import_initial_data_action_lists = tmpl::list<
817 : Parallel::PhaseActions<
818 : Parallel::Phase::RegisterWithElementDataReader,
819 : tmpl::list<importers::Actions::RegisterWithElementDataReader,
820 : Parallel::Actions::TerminatePhase>>,
821 : Parallel::PhaseActions<
822 : Parallel::Phase::ImportInitialData,
823 : tmpl::list<
824 : grmhd::GhValenciaDivClean::Actions::SetInitialData,
825 : grmhd::GhValenciaDivClean::Actions::ReceiveNumericInitialData,
826 : Parallel::Actions::TerminatePhase>>>;
827 :
828 0 : using dg_element_array_component = DgElementArray<
829 : derived_metavars,
830 : tmpl::flatten<tmpl::list<
831 : Parallel::PhaseActions<Parallel::Phase::Initialization,
832 : initialization_actions>,
833 : import_initial_data_action_lists,
834 : Parallel::PhaseActions<
835 : Parallel::Phase::InitializeInitialDataDependentQuantities,
836 : initialize_initial_data_dependent_quantities_actions>,
837 : Parallel::PhaseActions<
838 : Parallel::Phase::InitializeTimeStepperHistory,
839 : SelfStart::self_start_procedure<step_actions, system>>,
840 : Parallel::PhaseActions<Parallel::Phase::Register,
841 : tmpl::list<dg_registration_list,
842 : Parallel::Actions::TerminatePhase>>,
843 : Parallel::PhaseActions<
844 : Parallel::Phase::Evolve,
845 : tmpl::list<::domain::Actions::CheckFunctionsOfTimeAreReady,
846 : VariableFixing::Actions::FixVariables<
847 : VariableFixing::FixToAtmosphere<volume_dim>>,
848 : VariableFixing::Actions::FixVariables<
849 : VariableFixing::LimitLorentzFactor>,
850 : Actions::UpdateConservatives,
851 : evolution::Actions::RunEventsAndTriggers,
852 : Actions::ChangeSlabSize, step_actions,
853 : Actions::AdvanceTime,
854 : PhaseControl::Actions::ExecutePhaseChange>>,
855 : Parallel::PhaseActions<
856 : Parallel::Phase::PostFailureCleanup,
857 : tmpl::list<Actions::RunEventsOnFailure<Tags::Time>,
858 : Parallel::Actions::TerminatePhase>>>>>;
859 :
860 0 : struct registration
861 : : tt::ConformsTo<Parallel::protocols::RegistrationMetavariables> {
862 0 : using element_registrars =
863 : tmpl::map<tmpl::pair<dg_element_array_component, dg_registration_list>>;
864 : };
865 :
866 0 : using component_list = tmpl::flatten<tmpl::list<
867 : observers::Observer<derived_metavars>,
868 : observers::ObserverWriter<derived_metavars>,
869 : importers::ElementDataReader<derived_metavars>,
870 : control_system::control_components<derived_metavars, control_systems>,
871 : intrp::Interpolator<derived_metavars>,
872 : intrp::InterpolationTarget<derived_metavars, InterpolationTargetTags>...,
873 : dg_element_array_component>>;
874 : };
875 :
876 0 : struct BondiSachs : tt::ConformsTo<intrp::protocols::InterpolationTargetTag> {
877 0 : static std::string name() { return "BondiSachsInterpolation"; }
878 0 : using temporal_id = ::Tags::Time;
879 0 : using vars_to_interpolate_to_target =
880 : typename gh::System<3>::variables_tag::tags_list;
881 0 : using compute_target_points =
882 : intrp::TargetPoints::Sphere<BondiSachs, ::Frame::Inertial>;
883 0 : using post_interpolation_callbacks =
884 : tmpl::list<intrp::callbacks::DumpBondiSachsOnWorldtube<BondiSachs>>;
885 0 : using compute_items_on_target = tmpl::list<>;
886 : template <typename Metavariables>
887 0 : using interpolating_component =
888 : typename Metavariables::dg_element_array_component;
889 : };
|