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