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