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 <cstdint>
8 : #include <vector>
9 :
10 : #include "Domain/Creators/Factory1D.hpp"
11 : #include "Domain/Creators/Factory2D.hpp"
12 : #include "Domain/Creators/Factory3D.hpp"
13 : #include "Domain/Tags.hpp"
14 : #include "Evolution/Actions/RunEventsAndDenseTriggers.hpp"
15 : #include "Evolution/Actions/RunEventsAndTriggers.hpp"
16 : #include "Evolution/BoundaryCorrection.hpp"
17 : #include "Evolution/ComputeTags.hpp"
18 : #include "Evolution/Conservative/UpdateConservatives.hpp"
19 : #include "Evolution/DgSubcell/Actions/Initialize.hpp"
20 : #include "Evolution/DgSubcell/Actions/Labels.hpp"
21 : #include "Evolution/DgSubcell/Actions/ReconstructionCommunication.hpp"
22 : #include "Evolution/DgSubcell/Actions/SelectNumericalMethod.hpp"
23 : #include "Evolution/DgSubcell/Actions/TakeTimeStep.hpp"
24 : #include "Evolution/DgSubcell/Actions/TciAndRollback.hpp"
25 : #include "Evolution/DgSubcell/Actions/TciAndSwitchToDg.hpp"
26 : #include "Evolution/DgSubcell/GetTciDecision.hpp"
27 : #include "Evolution/DgSubcell/NeighborReconstructedFaceSolution.hpp"
28 : #include "Evolution/DgSubcell/NeighborTciDecision.hpp"
29 : #include "Evolution/DgSubcell/PrepareNeighborData.hpp"
30 : #include "Evolution/DgSubcell/Tags/ObserverCoordinates.hpp"
31 : #include "Evolution/DgSubcell/Tags/ObserverMesh.hpp"
32 : #include "Evolution/DgSubcell/Tags/TciStatus.hpp"
33 : #include "Evolution/DiscontinuousGalerkin/Actions/ApplyBoundaryCorrections.hpp"
34 : #include "Evolution/DiscontinuousGalerkin/Actions/ComputeTimeDerivative.hpp"
35 : #include "Evolution/DiscontinuousGalerkin/CleanMortarHistory.hpp"
36 : #include "Evolution/DiscontinuousGalerkin/DgElementArray.hpp"
37 : #include "Evolution/DiscontinuousGalerkin/Initialization/Mortars.hpp"
38 : #include "Evolution/DiscontinuousGalerkin/Initialization/QuadratureTag.hpp"
39 : #include "Evolution/DiscontinuousGalerkin/Limiters/Tags.hpp"
40 : #include "Evolution/Initialization/ConservativeSystem.hpp"
41 : #include "Evolution/Initialization/DgDomain.hpp"
42 : #include "Evolution/Initialization/Evolution.hpp"
43 : #include "Evolution/Initialization/Limiter.hpp"
44 : #include "Evolution/Initialization/SetVariables.hpp"
45 : #include "Evolution/Systems/NewtonianEuler/AllSolutions.hpp"
46 : #include "Evolution/Systems/NewtonianEuler/BoundaryConditions/Factory.hpp"
47 : #include "Evolution/Systems/NewtonianEuler/BoundaryCorrections/Factory.hpp"
48 : #include "Evolution/Systems/NewtonianEuler/FiniteDifference/Factory.hpp"
49 : #include "Evolution/Systems/NewtonianEuler/FiniteDifference/Tag.hpp"
50 : #include "Evolution/Systems/NewtonianEuler/Limiters/Minmod.hpp"
51 : #include "Evolution/Systems/NewtonianEuler/SoundSpeedSquared.hpp"
52 : #include "Evolution/Systems/NewtonianEuler/Sources/Factory.hpp"
53 : #include "Evolution/Systems/NewtonianEuler/Subcell/NeighborPackagedData.hpp"
54 : #include "Evolution/Systems/NewtonianEuler/Subcell/PrimitiveGhostData.hpp"
55 : #include "Evolution/Systems/NewtonianEuler/Subcell/PrimsAfterRollback.hpp"
56 : #include "Evolution/Systems/NewtonianEuler/Subcell/ResizeAndComputePrimitives.hpp"
57 : #include "Evolution/Systems/NewtonianEuler/Subcell/SetInitialRdmpData.hpp"
58 : #include "Evolution/Systems/NewtonianEuler/Subcell/TciOnDgGrid.hpp"
59 : #include "Evolution/Systems/NewtonianEuler/Subcell/TciOnFdGrid.hpp"
60 : #include "Evolution/Systems/NewtonianEuler/Subcell/TimeDerivative.hpp"
61 : #include "Evolution/Systems/NewtonianEuler/System.hpp"
62 : #include "Evolution/Systems/NewtonianEuler/Tags.hpp"
63 : #include "IO/Observer/Actions/RegisterEvents.hpp"
64 : #include "IO/Observer/Helpers.hpp"
65 : #include "IO/Observer/ObserverComponent.hpp"
66 : #include "NumericalAlgorithms/DiscontinuousGalerkin/Formulation.hpp"
67 : #include "NumericalAlgorithms/DiscontinuousGalerkin/Tags.hpp"
68 : #include "Options/Protocols/FactoryCreation.hpp"
69 : #include "Options/String.hpp"
70 : #include "Parallel/Local.hpp"
71 : #include "Parallel/Phase.hpp"
72 : #include "Parallel/PhaseControl/CheckpointAndExitAfterWallclock.hpp"
73 : #include "Parallel/PhaseControl/ExecutePhaseChange.hpp"
74 : #include "Parallel/PhaseControl/Factory.hpp"
75 : #include "Parallel/PhaseControl/VisitAndReturn.hpp"
76 : #include "Parallel/PhaseDependentActionList.hpp"
77 : #include "Parallel/Protocols/RegistrationMetavariables.hpp"
78 : #include "ParallelAlgorithms/Actions/AddComputeTags.hpp"
79 : #include "ParallelAlgorithms/Actions/InitializeItems.hpp"
80 : #include "ParallelAlgorithms/Actions/LimiterActions.hpp"
81 : #include "ParallelAlgorithms/Actions/MutateApply.hpp"
82 : #include "ParallelAlgorithms/Actions/TerminatePhase.hpp"
83 : #include "ParallelAlgorithms/Events/Factory.hpp"
84 : #include "ParallelAlgorithms/Events/Tags.hpp"
85 : #include "ParallelAlgorithms/EventsAndDenseTriggers/DenseTrigger.hpp"
86 : #include "ParallelAlgorithms/EventsAndDenseTriggers/DenseTriggers/Factory.hpp"
87 : #include "ParallelAlgorithms/EventsAndTriggers/Completion.hpp"
88 : #include "ParallelAlgorithms/EventsAndTriggers/Event.hpp"
89 : #include "ParallelAlgorithms/EventsAndTriggers/EventsAndTriggers.hpp"
90 : #include "ParallelAlgorithms/EventsAndTriggers/LogicalTriggers.hpp"
91 : #include "ParallelAlgorithms/EventsAndTriggers/Trigger.hpp"
92 : #include "PointwiseFunctions/AnalyticData/AnalyticData.hpp"
93 : #include "PointwiseFunctions/AnalyticData/NewtonianEuler/KhInstability.hpp"
94 : #include "PointwiseFunctions/AnalyticSolutions/AnalyticSolution.hpp"
95 : #include "PointwiseFunctions/AnalyticSolutions/NewtonianEuler/IsentropicVortex.hpp"
96 : #include "PointwiseFunctions/AnalyticSolutions/NewtonianEuler/LaneEmdenStar.hpp"
97 : #include "PointwiseFunctions/AnalyticSolutions/NewtonianEuler/RiemannProblem.hpp"
98 : #include "PointwiseFunctions/AnalyticSolutions/NewtonianEuler/SmoothFlow.hpp"
99 : #include "PointwiseFunctions/AnalyticSolutions/Tags.hpp"
100 : #include "PointwiseFunctions/Hydro/EquationsOfState/Factory.hpp"
101 : #include "PointwiseFunctions/Hydro/EquationsOfState/RegisterDerivedWithCharm.hpp"
102 : #include "PointwiseFunctions/Hydro/Tags.hpp"
103 : #include "Time/Actions/SelfStartActions.hpp"
104 : #include "Time/AdvanceTime.hpp"
105 : #include "Time/ChangeSlabSize/Action.hpp"
106 : #include "Time/ChangeTimeStepperOrder.hpp"
107 : #include "Time/CleanHistory.hpp"
108 : #include "Time/RecordTimeStepperData.hpp"
109 : #include "Time/StepChoosers/Factory.hpp"
110 : #include "Time/StepChoosers/StepChooser.hpp"
111 : #include "Time/Tags/Time.hpp"
112 : #include "Time/Tags/TimeStepId.hpp"
113 : #include "Time/TimeSequence.hpp"
114 : #include "Time/TimeSteppers/Factory.hpp"
115 : #include "Time/TimeSteppers/LtsTimeStepper.hpp"
116 : #include "Time/TimeSteppers/TimeStepper.hpp"
117 : #include "Time/Triggers/TimeTriggers.hpp"
118 : #include "Time/UpdateU.hpp"
119 : #include "Utilities/Functional.hpp"
120 : #include "Utilities/ProtocolHelpers.hpp"
121 : #include "Utilities/TMPL.hpp"
122 :
123 : /// \cond
124 : namespace PUP {
125 : class er;
126 : } // namespace PUP
127 : namespace Parallel {
128 : template <typename Metavariables>
129 : class CProxy_GlobalCache;
130 : } // namespace Parallel
131 : /// \endcond
132 :
133 : template <size_t Dim>
134 : struct EvolutionMetavars {
135 : static constexpr size_t volume_dim = Dim;
136 : // The use_dg_subcell flag controls whether to use "standard" limiting (false)
137 : // or a DG-FD hybrid scheme (true).
138 : static constexpr bool use_dg_subcell = true;
139 :
140 0 : using system = NewtonianEuler::System<Dim>;
141 :
142 0 : using temporal_id = Tags::TimeStepId;
143 0 : using TimeStepperBase = TimeStepper;
144 :
145 : static constexpr bool local_time_stepping =
146 : TimeStepperBase::local_time_stepping;
147 : static constexpr bool use_dg_element_collection = false;
148 :
149 0 : using initial_data_tag = evolution::initial_data::Tags::InitialData;
150 0 : using initial_data_list = NewtonianEuler::InitialData::initial_data_list<Dim>;
151 :
152 0 : using analytic_variables_tags =
153 : typename system::primitive_variables_tag::tags_list;
154 :
155 0 : using equation_of_state_tag = hydro::Tags::EquationOfState<false, 2>;
156 :
157 0 : using limiter = Tags::Limiter<NewtonianEuler::Limiters::Minmod<Dim>>;
158 :
159 0 : using analytic_compute = evolution::Tags::AnalyticSolutionsCompute<
160 : volume_dim, analytic_variables_tags, use_dg_subcell, initial_data_list>;
161 0 : using error_compute = Tags::ErrorsCompute<analytic_variables_tags>;
162 0 : using error_tags = db::wrap_tags_in<Tags::Error, analytic_variables_tags>;
163 0 : using observe_fields = tmpl::push_back<
164 : tmpl::append<
165 : typename system::variables_tag::tags_list,
166 : typename system::primitive_variables_tag::tags_list, error_tags,
167 : tmpl::conditional_t<use_dg_subcell,
168 : tmpl::list<evolution::dg::subcell::Tags::
169 : TciStatusCompute<volume_dim>>,
170 : tmpl::list<>>>,
171 : tmpl::conditional_t<
172 : use_dg_subcell,
173 : evolution::dg::subcell::Tags::ObserverCoordinatesCompute<
174 : volume_dim, Frame::ElementLogical>,
175 : ::Events::Tags::ObserverCoordinatesCompute<volume_dim,
176 : Frame::ElementLogical>>,
177 : tmpl::conditional_t<
178 : use_dg_subcell,
179 : evolution::dg::subcell::Tags::ObserverCoordinatesCompute<volume_dim,
180 : Frame::Grid>,
181 : domain::Tags::Coordinates<volume_dim, Frame::Grid>>,
182 : tmpl::conditional_t<
183 : use_dg_subcell,
184 : evolution::dg::subcell::Tags::ObserverCoordinatesCompute<
185 : volume_dim, Frame::Inertial>,
186 : domain::Tags::Coordinates<volume_dim, Frame::Inertial>>>;
187 0 : using non_tensor_compute_tags = tmpl::append<
188 : tmpl::conditional_t<
189 : use_dg_subcell,
190 : tmpl::list<
191 : evolution::dg::subcell::Tags::ObserverMeshCompute<volume_dim>,
192 : evolution::dg::subcell::Tags::ObserverInverseJacobianCompute<
193 : volume_dim, Frame::ElementLogical, Frame::Inertial>,
194 : evolution::dg::subcell::Tags::
195 : ObserverJacobianAndDetInvJacobianCompute<
196 : volume_dim, Frame::ElementLogical, Frame::Inertial>>,
197 : tmpl::list<::Events::Tags::ObserverMeshCompute<volume_dim>,
198 : ::Events::Tags::ObserverInverseJacobianCompute<
199 : volume_dim, Frame::ElementLogical, Frame::Inertial>,
200 : ::Events::Tags::ObserverJacobianCompute<
201 : volume_dim, Frame::ElementLogical, Frame::Inertial>,
202 : ::Events::Tags::ObserverDetInvJacobianCompute<
203 : Frame::ElementLogical, Frame::Inertial>>>,
204 : tmpl::list<analytic_compute, error_compute>>;
205 :
206 : struct factory_creation
207 : : tt::ConformsTo<Options::protocols::FactoryCreation> {
208 0 : using factory_classes = tmpl::map<
209 : tmpl::pair<DenseTrigger, DenseTriggers::standard_dense_triggers>,
210 : tmpl::pair<DomainCreator<volume_dim>, domain_creators<volume_dim>>,
211 : tmpl::pair<NewtonianEuler::Sources::Source<Dim>,
212 : NewtonianEuler::Sources::all_sources<Dim>>,
213 : tmpl::pair<evolution::initial_data::InitialData,
214 : NewtonianEuler::InitialData::initial_data_list<Dim>>,
215 : tmpl::pair<Event,
216 : tmpl::flatten<tmpl::list<
217 : Events::Completion,
218 : dg::Events::field_observations<
219 : volume_dim, observe_fields, non_tensor_compute_tags>,
220 : Events::time_events<system>>>>,
221 : tmpl::pair<evolution::BoundaryCorrection,
222 : NewtonianEuler::BoundaryCorrections::
223 : standard_boundary_corrections<volume_dim>>,
224 : tmpl::pair<LtsTimeStepper, TimeSteppers::lts_time_steppers>,
225 : tmpl::pair<
226 : NewtonianEuler::BoundaryConditions::BoundaryCondition<volume_dim>,
227 : NewtonianEuler::BoundaryConditions::standard_boundary_conditions<
228 : volume_dim>>,
229 : tmpl::pair<PhaseChange, PhaseControl::factory_creatable_classes>,
230 : tmpl::pair<StepChooser<StepChooserUse::LtsStep>,
231 : StepChoosers::standard_step_choosers<system>>,
232 : tmpl::pair<
233 : StepChooser<StepChooserUse::Slab>,
234 : StepChoosers::standard_slab_choosers<system, local_time_stepping>>,
235 : tmpl::pair<TimeSequence<double>,
236 : TimeSequences::all_time_sequences<double>>,
237 : tmpl::pair<TimeSequence<std::uint64_t>,
238 : TimeSequences::all_time_sequences<std::uint64_t>>,
239 : tmpl::pair<TimeStepper, TimeSteppers::time_steppers>,
240 : tmpl::pair<Trigger, tmpl::append<Triggers::logical_triggers,
241 : Triggers::time_triggers>>>;
242 : };
243 :
244 0 : using observed_reduction_data_tags =
245 : observers::collect_reduction_data_tags<tmpl::flatten<tmpl::list<
246 : tmpl::at<typename factory_creation::factory_classes, Event>>>>;
247 :
248 0 : using dg_registration_list =
249 : tmpl::list<observers::Actions::RegisterEventsWithObservers>;
250 :
251 0 : using initialization_actions = tmpl::flatten<tmpl::list<
252 : Initialization::Actions::InitializeItems<
253 : Initialization::TimeStepping<EvolutionMetavars, TimeStepperBase>,
254 : evolution::dg::Initialization::Domain<EvolutionMetavars>,
255 : Initialization::TimeStepperHistory<EvolutionMetavars>>,
256 : Initialization::Actions::ConservativeSystem<system>,
257 :
258 : tmpl::conditional_t<
259 : use_dg_subcell,
260 : tmpl::list<
261 : evolution::dg::subcell::Actions::SetSubcellGrid<volume_dim,
262 : system, false>,
263 : Actions::UpdateConservatives,
264 : evolution::dg::subcell::Actions::SetAndCommunicateInitialRdmpData<
265 : volume_dim,
266 : NewtonianEuler::subcell::SetInitialRdmpData<volume_dim>>,
267 : evolution::dg::subcell::Actions::ComputeAndSendTciOnInitialGrid<
268 : volume_dim, system,
269 : NewtonianEuler::subcell::TciOnFdGrid<volume_dim>>,
270 : evolution::dg::subcell::Actions::SetInitialGridFromTciData<
271 : volume_dim, system>,
272 : Actions::MutateApply<
273 : NewtonianEuler::subcell::ResizeAndComputePrims<volume_dim>>,
274 : Actions::UpdateConservatives>,
275 : tmpl::list<evolution::Initialization::Actions::SetVariables<
276 : domain::Tags::Coordinates<Dim, Frame::ElementLogical>>,
277 : Actions::UpdateConservatives>>,
278 : Initialization::Actions::AddComputeTags<
279 : tmpl::list<NewtonianEuler::Tags::SoundSpeedSquaredCompute<DataVector>,
280 : NewtonianEuler::Tags::SoundSpeedCompute<DataVector>>>,
281 : Initialization::Actions::AddComputeTags<
282 : StepChoosers::step_chooser_compute_tags<EvolutionMetavars,
283 : local_time_stepping>>,
284 : ::evolution::dg::Initialization::Mortars<volume_dim, system>,
285 : Initialization::Actions::Minmod<Dim>,
286 : evolution::Actions::InitializeRunEventsAndDenseTriggers,
287 : Parallel::Actions::TerminatePhase>>;
288 :
289 0 : using dg_step_actions = tmpl::flatten<tmpl::list<
290 : evolution::dg::Actions::ComputeTimeDerivative<
291 : volume_dim, system, AllStepChoosers, local_time_stepping,
292 : use_dg_element_collection>,
293 : tmpl::conditional_t<
294 : local_time_stepping,
295 : tmpl::list<Actions::MutateApply<RecordTimeStepperData<system>>,
296 : evolution::Actions::RunEventsAndDenseTriggers<tmpl::list<
297 : evolution::dg::ApplyBoundaryCorrections<
298 : local_time_stepping, system, volume_dim, true>,
299 : typename system::primitive_from_conservative>>,
300 : Actions::MutateApply<UpdateU<system, local_time_stepping>>,
301 : evolution::dg::Actions::ApplyLtsBoundaryCorrections<
302 : volume_dim, false, use_dg_element_collection>,
303 : Actions::MutateApply<ChangeTimeStepperOrder<system>>>,
304 : tmpl::list<
305 : evolution::dg::Actions::ApplyBoundaryCorrectionsToTimeDerivative<
306 : volume_dim, false, use_dg_element_collection>,
307 : Actions::MutateApply<RecordTimeStepperData<system>>,
308 : evolution::Actions::RunEventsAndDenseTriggers<
309 : tmpl::list<typename system::primitive_from_conservative>>,
310 : Actions::MutateApply<UpdateU<system, local_time_stepping>>>>,
311 : Actions::MutateApply<CleanHistory<system>>,
312 : tmpl::conditional_t<
313 : local_time_stepping,
314 : Actions::MutateApply<evolution::dg::CleanMortarHistory<system>>,
315 : tmpl::list<>>,
316 : Limiters::Actions::SendData<EvolutionMetavars>,
317 : Limiters::Actions::Limit<EvolutionMetavars>,
318 : // Conservative `UpdatePrimitives` expects system to possess
319 : // list of recovery schemes so we use `MutateApply` instead.
320 : Actions::MutateApply<typename system::primitive_from_conservative>>>;
321 :
322 : struct SubcellOptions {
323 : static constexpr bool subcell_enabled = use_dg_subcell;
324 : static constexpr bool subcell_enabled_at_external_boundary = false;
325 :
326 : // We send `ghost_zone_size` cell-centered grid points for variable
327 : // reconstruction, of which we need `ghost_zone_size-1` for reconstruction
328 : // to the internal side of the element face, and `ghost_zone_size` for
329 : // reconstruction to the external side of the element face.
330 : template <typename DbTagsList>
331 0 : static constexpr size_t ghost_zone_size(
332 : const db::DataBox<DbTagsList>& box) {
333 : return db::get<NewtonianEuler::fd::Tags::Reconstructor<Dim>>(box)
334 : .ghost_zone_size();
335 : }
336 :
337 0 : using DgComputeSubcellNeighborPackagedData =
338 : NewtonianEuler::subcell::NeighborPackagedData;
339 :
340 0 : using GhostVariables =
341 : NewtonianEuler::subcell::PrimitiveGhostVariables<volume_dim>;
342 : };
343 :
344 0 : using dg_subcell_step_actions = tmpl::flatten<tmpl::list<
345 : evolution::dg::subcell::Actions::SelectNumericalMethod,
346 :
347 : Actions::Label<evolution::dg::subcell::Actions::Labels::BeginDg>,
348 : evolution::dg::Actions::ComputeTimeDerivative<
349 : volume_dim, system, AllStepChoosers, local_time_stepping,
350 : use_dg_element_collection>,
351 : evolution::dg::Actions::ApplyBoundaryCorrectionsToTimeDerivative<
352 : volume_dim, false, use_dg_element_collection>,
353 : Actions::MutateApply<RecordTimeStepperData<system>>,
354 : Actions::MutateApply<UpdateU<system, local_time_stepping>>,
355 : Actions::MutateApply<typename system::primitive_from_conservative>,
356 : // Note: The primitive variables are computed as part of the TCI.
357 : evolution::dg::subcell::Actions::TciAndRollback<
358 : NewtonianEuler::subcell::TciOnDgGrid<volume_dim>>,
359 : Actions::MutateApply<CleanHistory<system>>,
360 : tmpl::conditional_t<
361 : local_time_stepping,
362 : Actions::MutateApply<evolution::dg::CleanMortarHistory<system>>,
363 : tmpl::list<>>,
364 : Actions::Goto<evolution::dg::subcell::Actions::Labels::EndOfSolvers>,
365 :
366 : Actions::Label<evolution::dg::subcell::Actions::Labels::BeginSubcell>,
367 : evolution::dg::subcell::Actions::SendDataForReconstruction<
368 : volume_dim,
369 : NewtonianEuler::subcell::PrimitiveGhostVariables<volume_dim>,
370 : local_time_stepping, use_dg_element_collection>,
371 : evolution::dg::subcell::Actions::ReceiveDataForReconstruction<volume_dim>,
372 : Actions::Label<
373 : evolution::dg::subcell::Actions::Labels::BeginSubcellAfterDgRollback>,
374 : Actions::MutateApply<
375 : NewtonianEuler::subcell::PrimsAfterRollback<volume_dim>>,
376 : evolution::dg::subcell::fd::Actions::TakeTimeStep<
377 : NewtonianEuler::subcell::TimeDerivative<volume_dim>>,
378 : Actions::MutateApply<RecordTimeStepperData<system>>,
379 : Actions::MutateApply<UpdateU<system, local_time_stepping>>,
380 : Actions::MutateApply<CleanHistory<system>>,
381 : tmpl::conditional_t<
382 : local_time_stepping,
383 : Actions::MutateApply<evolution::dg::CleanMortarHistory<system>>,
384 : tmpl::list<>>,
385 : Actions::MutateApply<typename system::primitive_from_conservative>,
386 : evolution::dg::subcell::Actions::TciAndSwitchToDg<
387 : NewtonianEuler::subcell::TciOnFdGrid<volume_dim>>,
388 : Actions::MutateApply<
389 : NewtonianEuler::subcell::ResizeAndComputePrims<volume_dim>>,
390 :
391 : Actions::Label<evolution::dg::subcell::Actions::Labels::EndOfSolvers>>>;
392 :
393 0 : using step_actions =
394 : tmpl::conditional_t<use_dg_subcell, dg_subcell_step_actions,
395 : dg_step_actions>;
396 :
397 0 : using dg_element_array = DgElementArray<
398 : EvolutionMetavars,
399 : tmpl::list<
400 : Parallel::PhaseActions<Parallel::Phase::Initialization,
401 : initialization_actions>,
402 :
403 : Parallel::PhaseActions<
404 : Parallel::Phase::InitializeTimeStepperHistory,
405 : SelfStart::self_start_procedure<step_actions, system>>,
406 :
407 : Parallel::PhaseActions<Parallel::Phase::Register,
408 : tmpl::list<dg_registration_list,
409 : Parallel::Actions::TerminatePhase>>,
410 :
411 : Parallel::PhaseActions<Parallel::Phase::Restart,
412 : tmpl::list<dg_registration_list,
413 : Parallel::Actions::TerminatePhase>>,
414 :
415 : Parallel::PhaseActions<
416 : Parallel::Phase::WriteCheckpoint,
417 : tmpl::list<evolution::Actions::RunEventsAndTriggers<
418 : Triggers::WhenToCheck::AtCheckpoints>,
419 : Parallel::Actions::TerminatePhase>>,
420 :
421 : Parallel::PhaseActions<
422 : Parallel::Phase::Evolve,
423 : tmpl::flatten<tmpl::list<
424 : std::conditional_t<local_time_stepping,
425 : evolution::Actions::RunEventsAndTriggers<
426 : Triggers::WhenToCheck::AtSteps>,
427 : tmpl::list<>>,
428 : evolution::Actions::RunEventsAndTriggers<
429 : Triggers::WhenToCheck::AtSlabs>,
430 : Actions::ChangeSlabSize, step_actions,
431 : Actions::MutateApply<AdvanceTime>,
432 : PhaseControl::Actions::ExecutePhaseChange>>>>>;
433 :
434 : struct registration
435 : : tt::ConformsTo<Parallel::protocols::RegistrationMetavariables> {
436 0 : using element_registrars =
437 : tmpl::map<tmpl::pair<dg_element_array, dg_registration_list>>;
438 : };
439 :
440 0 : using component_list =
441 : tmpl::list<observers::Observer<EvolutionMetavars>,
442 : observers::ObserverWriter<EvolutionMetavars>,
443 : dg_element_array>;
444 :
445 0 : using const_global_cache_tags = tmpl::push_back<
446 : tmpl::conditional_t<
447 : use_dg_subcell,
448 : tmpl::list<NewtonianEuler::fd::Tags::Reconstructor<volume_dim>>,
449 : tmpl::list<>>,
450 : initial_data_tag, equation_of_state_tag,
451 : NewtonianEuler::Tags::SourceTerm<Dim>>;
452 :
453 : static constexpr Options::String help{
454 : "Evolve the Newtonian Euler system in conservative form.\n\n"};
455 :
456 : static constexpr std::array<Parallel::Phase, 5> default_phase_order{
457 : {Parallel::Phase::Initialization,
458 : Parallel::Phase::InitializeTimeStepperHistory, Parallel::Phase::Register,
459 : Parallel::Phase::Evolve, Parallel::Phase::Exit}};
460 :
461 : // NOLINTNEXTLINE(google-runtime-references)
462 0 : void pup(PUP::er& /*p*/) {}
463 : };
|