Line data Source code
1 0 : // Distributed under the MIT License.
2 : // See LICENSE.txt for details.
3 :
4 : #pragma once
5 :
6 : #include <cstddef>
7 : #include <vector>
8 :
9 : #include "ControlSystem/Actions/LimitTimeStep.hpp"
10 : #include "DataStructures/DataBox/PrefixHelpers.hpp"
11 : #include "DataStructures/DataBox/Tag.hpp"
12 : #include "DataStructures/Tensor/EagerMath/RaiseOrLowerIndex.hpp"
13 : #include "Domain/Creators/Factory1D.hpp"
14 : #include "Domain/Creators/Factory2D.hpp"
15 : #include "Domain/Creators/Factory3D.hpp"
16 : #include "Domain/Tags.hpp"
17 : #include "Domain/TagsCharacteristicSpeeds.hpp"
18 : #include "Evolution/Actions/RunEventsAndDenseTriggers.hpp"
19 : #include "Evolution/BoundaryCorrection.hpp"
20 : #include "Evolution/ComputeTags.hpp"
21 : #include "Evolution/DiscontinuousGalerkin/Actions/ApplyBoundaryCorrections.hpp"
22 : #include "Evolution/DiscontinuousGalerkin/Actions/ComputeTimeDerivative.hpp"
23 : #include "Evolution/DiscontinuousGalerkin/CleanMortarHistory.hpp"
24 : #include "Evolution/DiscontinuousGalerkin/DgElementArray.hpp"
25 : #include "Evolution/DiscontinuousGalerkin/Initialization/Mortars.hpp"
26 : #include "Evolution/Initialization/DgDomain.hpp"
27 : #include "Evolution/Initialization/Evolution.hpp"
28 : #include "Evolution/Initialization/NonconservativeSystem.hpp"
29 : #include "Evolution/Systems/GeneralizedHarmonic/Actions/SetInitialData.hpp"
30 : #include "Evolution/Systems/GeneralizedHarmonic/BoundaryConditions/Factory.hpp"
31 : #include "Evolution/Systems/GeneralizedHarmonic/BoundaryCorrections/Factory.hpp"
32 : #include "Evolution/Systems/GeneralizedHarmonic/Equations.hpp"
33 : #include "Evolution/Systems/GeneralizedHarmonic/GaugeSourceFunctions/Factory.hpp"
34 : #include "Evolution/Systems/GeneralizedHarmonic/GaugeSourceFunctions/Gauges.hpp"
35 : #include "Evolution/Systems/GeneralizedHarmonic/GaugeSourceFunctions/SetPiAndPhiFromConstraints.hpp"
36 : #include "Evolution/Systems/GeneralizedHarmonic/GaugeSourceFunctions/Tags/GaugeCondition.hpp"
37 : #include "Evolution/Systems/GeneralizedHarmonic/Initialize.hpp"
38 : #include "Evolution/Systems/GeneralizedHarmonic/System.hpp"
39 : #include "Evolution/Systems/GeneralizedHarmonic/Tags.hpp"
40 : #include "Evolution/Tags/Filter.hpp"
41 : #include "Evolution/TypeTraits.hpp"
42 : #include "IO/Importers/Actions/RegisterWithElementDataReader.hpp"
43 : #include "IO/Importers/ElementDataReader.hpp"
44 : #include "IO/Observer/Actions/ObserverRegistration.hpp"
45 : #include "IO/Observer/Actions/RegisterEvents.hpp"
46 : #include "IO/Observer/Helpers.hpp"
47 : #include "IO/Observer/ObserverComponent.hpp"
48 : #include "IO/Observer/Tags.hpp"
49 : #include "NumericalAlgorithms/DiscontinuousGalerkin/Tags.hpp"
50 : #include "NumericalAlgorithms/LinearOperators/ExponentialFilter.hpp"
51 : #include "Options/Protocols/FactoryCreation.hpp"
52 : #include "Options/String.hpp"
53 : #include "Parallel/Algorithms/AlgorithmSingleton.hpp"
54 : #include "Parallel/Local.hpp"
55 : #include "Parallel/Phase.hpp"
56 : #include "Parallel/PhaseControl/CheckpointAndExitAfterWallclock.hpp"
57 : #include "Parallel/PhaseControl/ExecutePhaseChange.hpp"
58 : #include "Parallel/PhaseControl/Factory.hpp"
59 : #include "Parallel/PhaseControl/VisitAndReturn.hpp"
60 : #include "Parallel/PhaseDependentActionList.hpp"
61 : #include "Parallel/Reduction.hpp"
62 : #include "ParallelAlgorithms/Actions/AddComputeTags.hpp"
63 : #include "ParallelAlgorithms/Actions/FilterAction.hpp"
64 : #include "ParallelAlgorithms/Actions/FunctionsOfTimeAreReady.hpp"
65 : #include "ParallelAlgorithms/Actions/InitializeItems.hpp"
66 : #include "ParallelAlgorithms/Actions/MemoryMonitor/ContributeMemoryData.hpp"
67 : #include "ParallelAlgorithms/Actions/MutateApply.hpp"
68 : #include "ParallelAlgorithms/Actions/TerminatePhase.hpp"
69 : #include "ParallelAlgorithms/Amr/Actions/CollectDataFromChildren.hpp"
70 : #include "ParallelAlgorithms/Amr/Actions/Component.hpp"
71 : #include "ParallelAlgorithms/Amr/Actions/CreateChild.hpp"
72 : #include "ParallelAlgorithms/Amr/Actions/Initialize.hpp"
73 : #include "ParallelAlgorithms/Amr/Actions/SendAmrDiagnostics.hpp"
74 : #include "ParallelAlgorithms/Amr/Criteria/Constraints.hpp"
75 : #include "ParallelAlgorithms/Amr/Criteria/Criterion.hpp"
76 : #include "ParallelAlgorithms/Amr/Criteria/Factory.hpp"
77 : #include "ParallelAlgorithms/Amr/Criteria/Tags/Criteria.hpp"
78 : #include "ParallelAlgorithms/Amr/Criteria/Type.hpp"
79 : #include "ParallelAlgorithms/Amr/Projectors/CopyFromCreatorOrLeaveAsIs.hpp"
80 : #include "ParallelAlgorithms/Amr/Projectors/DefaultInitialize.hpp"
81 : #include "ParallelAlgorithms/Amr/Projectors/Tensors.hpp"
82 : #include "ParallelAlgorithms/Amr/Projectors/Variables.hpp"
83 : #include "ParallelAlgorithms/Amr/Protocols/AmrMetavariables.hpp"
84 : #include "ParallelAlgorithms/Events/Completion.hpp"
85 : #include "ParallelAlgorithms/Events/Factory.hpp"
86 : #include "ParallelAlgorithms/Events/MonitorMemory.hpp"
87 : #include "ParallelAlgorithms/Events/ObserveTimeStep.hpp"
88 : #include "ParallelAlgorithms/Events/ObserveTimeStepVolume.hpp"
89 : #include "ParallelAlgorithms/Events/Tags.hpp"
90 : #include "ParallelAlgorithms/EventsAndDenseTriggers/DenseTrigger.hpp"
91 : #include "ParallelAlgorithms/EventsAndDenseTriggers/DenseTriggers/Factory.hpp"
92 : #include "ParallelAlgorithms/EventsAndTriggers/Event.hpp"
93 : #include "ParallelAlgorithms/EventsAndTriggers/EventsAndTriggers.hpp"
94 : #include "ParallelAlgorithms/EventsAndTriggers/LogicalTriggers.hpp"
95 : #include "ParallelAlgorithms/EventsAndTriggers/Trigger.hpp"
96 : #include "ParallelAlgorithms/Interpolation/Actions/InitializeInterpolationTarget.hpp"
97 : #include "ParallelAlgorithms/Interpolation/Callbacks/ObserveTimeSeriesOnSurface.hpp"
98 : #include "ParallelAlgorithms/Interpolation/InterpolationTarget.hpp"
99 : #include "ParallelAlgorithms/Interpolation/Tags.hpp"
100 : #include "PointwiseFunctions/AnalyticSolutions/GeneralRelativity/Factory.hpp"
101 : #include "PointwiseFunctions/AnalyticSolutions/GeneralRelativity/KerrSchild.hpp"
102 : #include "PointwiseFunctions/AnalyticSolutions/GeneralRelativity/SphericalKerrSchild.hpp"
103 : #include "PointwiseFunctions/AnalyticSolutions/GeneralRelativity/WrappedGr.hpp"
104 : #include "PointwiseFunctions/AnalyticSolutions/Tags.hpp"
105 : #include "PointwiseFunctions/GeneralRelativity/Christoffel.hpp"
106 : #include "PointwiseFunctions/GeneralRelativity/DerivativeSpatialMetric.hpp"
107 : #include "PointwiseFunctions/GeneralRelativity/DetAndInverseSpatialMetric.hpp"
108 : #include "PointwiseFunctions/GeneralRelativity/GeneralizedHarmonic/ConstraintGammas.hpp"
109 : #include "PointwiseFunctions/GeneralRelativity/GeneralizedHarmonic/DerivSpatialMetric.hpp"
110 : #include "PointwiseFunctions/GeneralRelativity/GeneralizedHarmonic/ExtrinsicCurvature.hpp"
111 : #include "PointwiseFunctions/GeneralRelativity/GeneralizedHarmonic/SpatialDerivOfLapse.hpp"
112 : #include "PointwiseFunctions/GeneralRelativity/GeneralizedHarmonic/SpatialDerivOfShift.hpp"
113 : #include "PointwiseFunctions/GeneralRelativity/Psi4Real.hpp"
114 : #include "PointwiseFunctions/GeneralRelativity/Ricci.hpp"
115 : #include "PointwiseFunctions/GeneralRelativity/SpacetimeNormalVector.hpp"
116 : #include "PointwiseFunctions/GeneralRelativity/Surfaces/Tags.hpp"
117 : #include "PointwiseFunctions/GeneralRelativity/Tags.hpp"
118 : #include "PointwiseFunctions/GeneralRelativity/WeylElectric.hpp"
119 : #include "PointwiseFunctions/GeneralRelativity/WeylTypeD1.hpp"
120 : #include "PointwiseFunctions/InitialDataUtilities/InitialData.hpp"
121 : #include "PointwiseFunctions/InitialDataUtilities/Tags/InitialData.hpp"
122 : #include "PointwiseFunctions/MathFunctions/Factory.hpp"
123 : #include "PointwiseFunctions/MathFunctions/MathFunction.hpp"
124 : #include "Time/ChangeTimeStepperOrder.hpp"
125 : #include "Time/CleanHistory.hpp"
126 : #include "Time/RecordTimeStepperData.hpp"
127 : #include "Time/StepChoosers/Factory.hpp"
128 : #include "Time/StepChoosers/StepChooser.hpp"
129 : #include "Time/Tags/Time.hpp"
130 : #include "Time/TimeSequence.hpp"
131 : #include "Time/TimeSteppers/Factory.hpp"
132 : #include "Time/TimeSteppers/LtsTimeStepper.hpp"
133 : #include "Time/TimeSteppers/TimeStepper.hpp"
134 : #include "Time/Triggers/TimeTriggers.hpp"
135 : #include "Time/UpdateU.hpp"
136 : #include "Utilities/ErrorHandling/Error.hpp"
137 : #include "Utilities/Functional.hpp"
138 : #include "Utilities/ProtocolHelpers.hpp"
139 : #include "Utilities/TMPL.hpp"
140 :
141 : /// \cond
142 : namespace Frame {
143 :
144 : struct Inertial;
145 : } // namespace Frame
146 : namespace PUP {
147 : class er;
148 : } // namespace PUP
149 : namespace Parallel {
150 : template <typename Metavariables>
151 : class CProxy_GlobalCache;
152 : } // namespace Parallel
153 : /// \endcond
154 :
155 : namespace detail {
156 :
157 : template <size_t volume_dim>
158 : struct ObserverTags {
159 : using system = gh::System<volume_dim>;
160 :
161 : using variables_tag = typename system::variables_tag;
162 : using analytic_solution_fields = typename variables_tag::tags_list;
163 :
164 : using initial_data_list = gh::Solutions::all_solutions<volume_dim>;
165 :
166 : using analytic_compute = evolution::Tags::AnalyticSolutionsCompute<
167 : volume_dim, analytic_solution_fields, false, initial_data_list>;
168 : using deriv_compute = ::Tags::DerivCompute<
169 : variables_tag, domain::Tags::Mesh<volume_dim>,
170 : domain::Tags::InverseJacobian<volume_dim, Frame::ElementLogical,
171 : Frame::Inertial>,
172 : typename system::gradient_variables>;
173 : using error_compute = Tags::ErrorsCompute<analytic_solution_fields>;
174 : using error_tags = db::wrap_tags_in<Tags::Error, analytic_solution_fields>;
175 :
176 : using observe_fields = tmpl::append<
177 : tmpl::push_back<
178 : analytic_solution_fields, gh::Tags::GaugeH<DataVector, volume_dim>,
179 : gh::Tags::SpacetimeDerivGaugeH<DataVector, volume_dim>,
180 : gr::Tags::SpatialMetric<DataVector, volume_dim>,
181 : gr::Tags::DetSpatialMetric<DataVector>,
182 : gr::Tags::InverseSpatialMetric<DataVector, volume_dim>,
183 : gr::Tags::Shift<DataVector, volume_dim>, gr::Tags::Lapse<DataVector>,
184 : gr::Tags::SqrtDetSpatialMetricCompute<DataVector, volume_dim,
185 : Frame::Inertial>,
186 : gr::Tags::SpacetimeNormalOneFormCompute<DataVector, volume_dim,
187 : Frame::Inertial>,
188 : gr::Tags::SpacetimeNormalVectorCompute<DataVector, volume_dim,
189 : Frame::Inertial>,
190 : gr::Tags::InverseSpacetimeMetricCompute<DataVector, volume_dim,
191 : Frame::Inertial>,
192 : gh::Tags::DerivLapseCompute<volume_dim, Frame::Inertial>,
193 : gh::Tags::DerivShiftCompute<volume_dim, Frame::Inertial>,
194 : gh::Tags::DerivSpatialMetricCompute<volume_dim, Frame::Inertial>,
195 : gr::Tags::DerivInverseSpatialMetricCompute<volume_dim,
196 : Frame::Inertial>,
197 :
198 : gh::Tags::GaugeConstraintCompute<volume_dim, Frame::Inertial>,
199 : gh::Tags::TwoIndexConstraintCompute<volume_dim, Frame::Inertial>,
200 : gh::Tags::ThreeIndexConstraintCompute<volume_dim, Frame::Inertial>,
201 : gh::Tags::VSpacetimeMetricSpeedCompute<volume_dim, Frame::Inertial,
202 : Frame::ElementLogical>,
203 : gh::Tags::VZeroSpeedCompute<volume_dim, Frame::Inertial,
204 : Frame::ElementLogical>,
205 : gh::Tags::VMinusSpeedCompute<volume_dim, Frame::Inertial,
206 : Frame::ElementLogical>,
207 : gh::Tags::VPlusSpeedCompute<volume_dim, Frame::Inertial,
208 : Frame::ElementLogical>,
209 : gh::Tags::DerivSpatialMetricCompute<volume_dim, ::Frame::Inertial>,
210 : gr::Tags::SpatialChristoffelFirstKindCompute<DataVector, volume_dim,
211 : ::Frame::Inertial>,
212 : gr::Tags::SpatialChristoffelSecondKindCompute<DataVector, volume_dim,
213 : ::Frame::Inertial>,
214 : ::Tags::DerivTensorCompute<
215 : gr::Tags::SpatialChristoffelSecondKind<DataVector, volume_dim>,
216 : ::domain::Tags::InverseJacobian<volume_dim, Frame::ElementLogical,
217 : Frame::Inertial>,
218 : ::domain::Tags::Mesh<volume_dim>>,
219 : gr::Tags::SpatialRicciCompute<DataVector, volume_dim,
220 : ::Frame::Inertial>,
221 : gr::Tags::SpatialRicciScalarCompute<DataVector, volume_dim,
222 : ::Frame::Inertial>,
223 : // following tags added to observe constraints
224 : ::Tags::PointwiseL2NormCompute<
225 : gh::Tags::GaugeConstraint<DataVector, volume_dim>>,
226 : ::Tags::PointwiseL2NormCompute<
227 : gh::Tags::TwoIndexConstraint<DataVector, volume_dim>>,
228 : ::Tags::PointwiseL2NormCompute<
229 : gh::Tags::ThreeIndexConstraint<DataVector, volume_dim>>,
230 : ::domain::Tags::Coordinates<volume_dim, Frame::Grid>,
231 : ::domain::Tags::Coordinates<volume_dim, Frame::Inertial>>,
232 : error_tags,
233 : // The 4-index constraint is only implemented in 3d
234 : tmpl::conditional_t<
235 : volume_dim == 3,
236 : tmpl::list<
237 : gh::Tags::FourIndexConstraintCompute<3, Frame::Inertial>,
238 : gh::Tags::FConstraintCompute<3, Frame::Inertial>,
239 : ::Tags::PointwiseL2NormCompute<
240 : gh::Tags::FConstraint<DataVector, 3>>,
241 : ::Tags::PointwiseL2NormCompute<
242 : gh::Tags::FourIndexConstraint<DataVector, 3>>,
243 : gh::Tags::ConstraintEnergyCompute<3, Frame::Inertial>,
244 : gh::Tags::ExtrinsicCurvatureCompute<3, Frame::Inertial>,
245 : ::Tags::DerivTensorCompute<
246 : gr::Tags::ExtrinsicCurvature<DataVector, 3>,
247 : ::domain::Tags::InverseJacobian<
248 : volume_dim, Frame::ElementLogical, Frame::Inertial>,
249 : ::domain::Tags::Mesh<volume_dim>>,
250 : gr::Tags::WeylElectricCompute<DataVector, 3, Frame::Inertial>,
251 : gr::Tags::WeylElectricScalarCompute<DataVector, 3,
252 : Frame::Inertial>,
253 : gr::Tags::WeylTypeD1Compute<DataVector, 3, Frame::Inertial>,
254 : gr::Tags::WeylTypeD1ScalarCompute<DataVector, 3, Frame::Inertial>,
255 : gr::Tags::Psi4RealCompute<Frame::Inertial>>,
256 : tmpl::list<>>>;
257 : using non_tensor_compute_tags = tmpl::list<
258 : ::Events::Tags::ObserverMeshCompute<volume_dim>,
259 : ::Events::Tags::ObserverCoordinatesCompute<volume_dim, Frame::Inertial>,
260 : ::Events::Tags::ObserverInverseJacobianCompute<
261 : volume_dim, Frame::ElementLogical, Frame::Inertial>,
262 : ::Events::Tags::ObserverJacobianCompute<volume_dim, Frame::ElementLogical,
263 : Frame::Inertial>,
264 : ::Events::Tags::ObserverDetInvJacobianCompute<Frame::ElementLogical,
265 : Frame::Inertial>,
266 : ::Events::Tags::ObserverMeshVelocityCompute<volume_dim, Frame::Inertial>,
267 : analytic_compute, error_compute,
268 : gh::gauges::Tags::GaugeAndDerivativeCompute<
269 : volume_dim, gh::Solutions::all_solutions<volume_dim>>>;
270 :
271 : using field_observations =
272 : dg::Events::field_observations<volume_dim, observe_fields,
273 : non_tensor_compute_tags>;
274 : };
275 :
276 : template <size_t volume_dim, bool LocalTimeStepping>
277 : struct FactoryCreation : tt::ConformsTo<Options::protocols::FactoryCreation> {
278 : using system = gh::System<volume_dim>;
279 :
280 : using factory_classes = tmpl::map<
281 : tmpl::pair<
282 : amr::Criterion,
283 : tmpl::push_back<
284 : amr::Criteria::standard_criteria<
285 : volume_dim, typename system::variables_tag::tags_list>,
286 : amr::Criteria::Constraints<
287 : volume_dim, tmpl::list<gh::Tags::ThreeIndexConstraintCompute<
288 : volume_dim, Frame::Inertial>>>>>,
289 : tmpl::pair<DenseTrigger, DenseTriggers::standard_dense_triggers>,
290 : tmpl::pair<DomainCreator<volume_dim>, domain_creators<volume_dim>>,
291 : tmpl::pair<
292 : Event,
293 : tmpl::flatten<tmpl::list<
294 : Events::Completion, Events::MonitorMemory<volume_dim>,
295 : typename detail::ObserverTags<volume_dim>::field_observations,
296 : Events::time_events<system>,
297 : dg::Events::ObserveTimeStepVolume<system>>>>,
298 : tmpl::pair<
299 : evolution::BoundaryCorrection,
300 : gh::BoundaryCorrections::standard_boundary_corrections<volume_dim>>,
301 : tmpl::pair<
302 : gh::BoundaryConditions::BoundaryCondition<volume_dim>,
303 : gh::BoundaryConditions::standard_boundary_conditions<volume_dim>>,
304 : tmpl::pair<gh::gauges::GaugeCondition, gh::gauges::all_gauges>,
305 : tmpl::pair<
306 : evolution::initial_data::InitialData,
307 : tmpl::append<gh::Solutions::all_solutions<volume_dim>,
308 : tmpl::conditional_t<volume_dim == 3,
309 : tmpl::list<gh::NumericInitialData>,
310 : tmpl::list<>>>>,
311 : tmpl::pair<LtsTimeStepper, TimeSteppers::lts_time_steppers>,
312 : tmpl::pair<MathFunction<1, Frame::Inertial>,
313 : MathFunctions::all_math_functions<1, Frame::Inertial>>,
314 : tmpl::pair<PhaseChange, PhaseControl::factory_creatable_classes>,
315 : tmpl::pair<StepChooser<StepChooserUse::LtsStep>,
316 : StepChoosers::standard_step_choosers<system>>,
317 : tmpl::pair<
318 : StepChooser<StepChooserUse::Slab>,
319 : StepChoosers::standard_slab_choosers<system, LocalTimeStepping>>,
320 : tmpl::pair<TimeSequence<double>,
321 : TimeSequences::all_time_sequences<double>>,
322 : tmpl::pair<TimeSequence<std::uint64_t>,
323 : TimeSequences::all_time_sequences<std::uint64_t>>,
324 : tmpl::pair<TimeStepper, TimeSteppers::time_steppers>,
325 : tmpl::pair<Trigger, tmpl::append<Triggers::logical_triggers,
326 : Triggers::time_triggers>>>;
327 : };
328 : } // namespace detail
329 :
330 : template <size_t VolumeDim, bool LocalTimeStepping>
331 0 : struct GeneralizedHarmonicTemplateBase {
332 0 : static constexpr size_t volume_dim = VolumeDim;
333 0 : using system = gh::System<volume_dim>;
334 0 : using TimeStepperBase =
335 : tmpl::conditional_t<LocalTimeStepping, LtsTimeStepper, TimeStepper>;
336 :
337 0 : static constexpr bool local_time_stepping =
338 : TimeStepperBase::local_time_stepping;
339 0 : static constexpr bool use_dg_element_collection = false;
340 :
341 : // NOLINTNEXTLINE(google-runtime-references)
342 0 : void pup(PUP::er& /*p*/) {}
343 :
344 0 : using factory_creation =
345 : detail::FactoryCreation<volume_dim, local_time_stepping>;
346 :
347 0 : using observed_reduction_data_tags =
348 : observers::collect_reduction_data_tags<tmpl::push_back<
349 : tmpl::at<typename factory_creation::factory_classes, Event>>>;
350 :
351 0 : using initialize_initial_data_dependent_quantities_actions =
352 : tmpl::list<gh::gauges::SetPiAndPhiFromConstraints<
353 : gh::Solutions::all_solutions<volume_dim>, volume_dim>,
354 : Parallel::Actions::TerminatePhase>;
355 :
356 : // A tmpl::list of tags to be added to the GlobalCache by the
357 : // metavariables
358 0 : using const_global_cache_tags =
359 : tmpl::list<gh::gauges::Tags::GaugeCondition,
360 : evolution::initial_data::Tags::InitialData,
361 : gh::Tags::DampingFunctionGamma0<volume_dim, Frame::Grid>,
362 : gh::Tags::DampingFunctionGamma1<volume_dim, Frame::Grid>,
363 : gh::Tags::DampingFunctionGamma2<volume_dim, Frame::Grid>>;
364 :
365 0 : using dg_registration_list =
366 : tmpl::list<observers::Actions::RegisterEventsWithObservers>;
367 :
368 : // Register needs to be before InitializeTimeStepperHistory so that CCE is
369 : // properly registered when the self-start happens
370 0 : static constexpr auto default_phase_order =
371 : std::array{Parallel::Phase::Initialization,
372 : Parallel::Phase::RegisterWithElementDataReader,
373 : Parallel::Phase::ImportInitialData,
374 : Parallel::Phase::InitializeInitialDataDependentQuantities,
375 : Parallel::Phase::Register,
376 : Parallel::Phase::InitializeTimeStepperHistory,
377 : Parallel::Phase::CheckDomain,
378 : Parallel::Phase::Evolve,
379 : Parallel::Phase::Exit};
380 :
381 : template <typename DerivedMetavars, typename ControlSystems>
382 0 : using step_actions = tmpl::list<
383 : evolution::dg::Actions::ComputeTimeDerivative<
384 : volume_dim, system, AllStepChoosers, local_time_stepping,
385 : use_dg_element_collection>,
386 : evolution::dg::Actions::ApplyBoundaryCorrectionsToTimeDerivative<
387 : volume_dim, use_dg_element_collection>,
388 : Actions::MutateApply<RecordTimeStepperData<system>>,
389 : tmpl::conditional_t<
390 : local_time_stepping,
391 : tmpl::list<evolution::Actions::RunEventsAndDenseTriggers<tmpl::list<
392 : ::domain::CheckFunctionsOfTimeAreReadyPostprocessor<
393 : volume_dim>,
394 : evolution::dg::ApplyLtsDenseBoundaryCorrections<
395 : DerivedMetavars>>>,
396 : Actions::MutateApply<UpdateU<system, local_time_stepping>>,
397 : evolution::dg::Actions::ApplyLtsBoundaryCorrections<
398 : volume_dim, use_dg_element_collection>,
399 : Actions::MutateApply<ChangeTimeStepperOrder<system>>>,
400 : tmpl::list<
401 : evolution::Actions::RunEventsAndDenseTriggers<tmpl::list<>>,
402 : control_system::Actions::LimitTimeStep<ControlSystems>,
403 : Actions::MutateApply<UpdateU<system, local_time_stepping>>>>,
404 : Actions::MutateApply<CleanHistory<system>>,
405 : tmpl::conditional_t<
406 : local_time_stepping,
407 : Actions::MutateApply<evolution::dg::CleanMortarHistory<volume_dim>>,
408 : tmpl::list<>>,
409 : dg::Actions::Filter<
410 : Filters::Exponential<0>,
411 : tmpl::list<gr::Tags::SpacetimeMetric<DataVector, volume_dim>,
412 : gh::Tags::Pi<DataVector, volume_dim>,
413 : gh::Tags::Phi<DataVector, volume_dim>>>>;
414 :
415 : template <typename DerivedMetavars, bool UseControlSystems>
416 0 : using initialization_actions = tmpl::list<
417 : Initialization::Actions::InitializeItems<
418 : Initialization::TimeStepping<DerivedMetavars, TimeStepperBase>,
419 : evolution::dg::Initialization::Domain<DerivedMetavars,
420 : UseControlSystems>,
421 : ::amr::Initialization::Initialize<volume_dim, DerivedMetavars>,
422 : Initialization::TimeStepperHistory<DerivedMetavars>>,
423 : Initialization::Actions::NonconservativeSystem<system>,
424 : Initialization::Actions::AddComputeTags<::Tags::DerivCompute<
425 : typename system::variables_tag, domain::Tags::Mesh<volume_dim>,
426 : domain::Tags::InverseJacobian<volume_dim, Frame::ElementLogical,
427 : Frame::Inertial>,
428 : typename system::gradient_variables>>,
429 : gh::Actions::InitializeGhAnd3Plus1Variables<volume_dim>,
430 : Initialization::Actions::AddComputeTags<
431 : tmpl::push_back<StepChoosers::step_chooser_compute_tags<
432 : GeneralizedHarmonicTemplateBase, local_time_stepping>>>,
433 : ::evolution::dg::Initialization::Mortars<volume_dim>,
434 : evolution::Actions::InitializeRunEventsAndDenseTriggers,
435 : Parallel::Actions::TerminatePhase>;
436 : };
|