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