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