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/Initialization/SetVariables.hpp"
34 : #include "Evolution/Systems/CurvedScalarWave/BoundaryConditions/Factory.hpp"
35 : #include "Evolution/Systems/CurvedScalarWave/Initialize.hpp"
36 : #include "Evolution/Systems/CurvedScalarWave/PsiSquared.hpp"
37 : #include "Evolution/Systems/CurvedScalarWave/System.hpp"
38 : #include "Evolution/Systems/CurvedScalarWave/Tags.hpp"
39 : #include "Evolution/Systems/GeneralizedHarmonic/Actions/SetInitialData.hpp"
40 : #include "Evolution/Systems/GeneralizedHarmonic/BoundaryConditions/Factory.hpp"
41 : #include "Evolution/Systems/GeneralizedHarmonic/Equations.hpp"
42 : #include "Evolution/Systems/GeneralizedHarmonic/GaugeSourceFunctions/Factory.hpp"
43 : #include "Evolution/Systems/GeneralizedHarmonic/GaugeSourceFunctions/Gauges.hpp"
44 : #include "Evolution/Systems/GeneralizedHarmonic/GaugeSourceFunctions/SetPiAndPhiFromConstraints.hpp"
45 : #include "Evolution/Systems/GeneralizedHarmonic/GaugeSourceFunctions/Tags/GaugeCondition.hpp"
46 : #include "Evolution/Systems/GeneralizedHarmonic/Initialize.hpp"
47 : #include "Evolution/Systems/GeneralizedHarmonic/System.hpp"
48 : #include "Evolution/Systems/GeneralizedHarmonic/Tags.hpp"
49 : #include "Evolution/Systems/ScalarTensor/Actions/SetInitialData.hpp"
50 : #include "Evolution/Systems/ScalarTensor/BoundaryConditions/Factory.hpp"
51 : #include "Evolution/Systems/ScalarTensor/BoundaryCorrections/Factory.hpp"
52 : #include "Evolution/Systems/ScalarTensor/Constraints.hpp"
53 : #include "Evolution/Systems/ScalarTensor/Initialize.hpp"
54 : #include "Evolution/Systems/ScalarTensor/System.hpp"
55 : #include "Evolution/Systems/ScalarTensor/Tags.hpp"
56 : #include "Evolution/TypeTraits.hpp"
57 : #include "IO/Importers/Actions/RegisterWithElementDataReader.hpp"
58 : #include "IO/Importers/ElementDataReader.hpp"
59 : #include "IO/Observer/Actions/ObserverRegistration.hpp"
60 : #include "IO/Observer/Actions/RegisterEvents.hpp"
61 : #include "IO/Observer/Helpers.hpp"
62 : #include "IO/Observer/ObserverComponent.hpp"
63 : #include "IO/Observer/Tags.hpp"
64 : #include "NumericalAlgorithms/DiscontinuousGalerkin/Tags.hpp"
65 : #include "NumericalAlgorithms/LinearOperators/Filters/Factory.hpp"
66 : #include "NumericalAlgorithms/LinearOperators/Filters/Tag.hpp"
67 : #include "Options/Protocols/FactoryCreation.hpp"
68 : #include "Options/String.hpp"
69 : #include "Parallel/Algorithms/AlgorithmSingleton.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/Reduction.hpp"
78 : #include "ParallelAlgorithms/Actions/AddComputeTags.hpp"
79 : #include "ParallelAlgorithms/Actions/AddSimpleTags.hpp"
80 : #include "ParallelAlgorithms/Actions/FunctionsOfTimeAreReady.hpp"
81 : #include "ParallelAlgorithms/Actions/InitializeItems.hpp"
82 : #include "ParallelAlgorithms/Actions/MemoryMonitor/ContributeMemoryData.hpp"
83 : #include "ParallelAlgorithms/Actions/MutateApply.hpp"
84 : #include "ParallelAlgorithms/Actions/RandomizeVariables.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/MonitorMemory.hpp"
91 : #include "ParallelAlgorithms/Events/ObserveTimeStep.hpp"
92 : #include "ParallelAlgorithms/Events/ObserveTimeStepVolume.hpp"
93 : #include "ParallelAlgorithms/Events/Tags.hpp"
94 : #include "ParallelAlgorithms/EventsAndDenseTriggers/DenseTrigger.hpp"
95 : #include "ParallelAlgorithms/EventsAndDenseTriggers/DenseTriggers/Factory.hpp"
96 : #include "ParallelAlgorithms/EventsAndTriggers/Event.hpp"
97 : #include "ParallelAlgorithms/EventsAndTriggers/EventsAndTriggers.hpp"
98 : #include "ParallelAlgorithms/EventsAndTriggers/LogicalTriggers.hpp"
99 : #include "ParallelAlgorithms/EventsAndTriggers/Trigger.hpp"
100 : #include "ParallelAlgorithms/Interpolation/Actions/InitializeInterpolationTarget.hpp"
101 : #include "ParallelAlgorithms/Interpolation/Callbacks/ObserveTimeSeriesOnSurface.hpp"
102 : #include "ParallelAlgorithms/Interpolation/InterpolationTarget.hpp"
103 : #include "ParallelAlgorithms/Interpolation/Tags.hpp"
104 : #include "PointwiseFunctions/AnalyticData/GhScalarTensor/Factory.hpp"
105 : #include "PointwiseFunctions/AnalyticSolutions/GeneralRelativity/Factory.hpp"
106 : #include "PointwiseFunctions/AnalyticSolutions/GeneralRelativity/KerrSchild.hpp"
107 : #include "PointwiseFunctions/AnalyticSolutions/GeneralRelativity/SphericalKerrSchild.hpp"
108 : #include "PointwiseFunctions/AnalyticSolutions/GeneralRelativity/WrappedGr.hpp"
109 : #include "PointwiseFunctions/AnalyticSolutions/Tags.hpp"
110 : #include "PointwiseFunctions/GeneralRelativity/Christoffel.hpp"
111 : #include "PointwiseFunctions/GeneralRelativity/DetAndInverseSpatialMetric.hpp"
112 : #include "PointwiseFunctions/GeneralRelativity/GeneralizedHarmonic/ConstraintDampingTags.hpp"
113 : #include "PointwiseFunctions/GeneralRelativity/GeneralizedHarmonic/ConstraintGammas.hpp"
114 : #include "PointwiseFunctions/GeneralRelativity/Psi4Real.hpp"
115 : #include "PointwiseFunctions/GeneralRelativity/Ricci.hpp"
116 : #include "PointwiseFunctions/GeneralRelativity/Surfaces/Tags.hpp"
117 : #include "PointwiseFunctions/GeneralRelativity/Tags.hpp"
118 : #include "PointwiseFunctions/GeneralRelativity/WeylElectric.hpp"
119 : #include "PointwiseFunctions/InitialDataUtilities/InitialData.hpp"
120 : #include "PointwiseFunctions/InitialDataUtilities/Tags/InitialData.hpp"
121 : #include "PointwiseFunctions/MathFunctions/MathFunction.hpp"
122 : #include "PointwiseFunctions/ScalarTensor/ConstraintDampingTags.hpp"
123 : #include "PointwiseFunctions/ScalarTensor/ConstraintGammas.hpp"
124 : #include "PointwiseFunctions/ScalarTensor/ScalarCharge.hpp"
125 : #include "PointwiseFunctions/ScalarTensor/ScalarGaussBonnet/Tags.hpp"
126 : #include "PointwiseFunctions/ScalarTensor/ScalarSource.hpp"
127 : #include "PointwiseFunctions/ScalarTensor/SourceTags.hpp"
128 : #include "PointwiseFunctions/ScalarTensor/StressEnergy.hpp"
129 : #include "Time/Actions/SelfStartActions.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/TimeStepper.hpp"
139 : #include "Time/Triggers/TimeTriggers.hpp"
140 : #include "Time/UpdateU.hpp"
141 : #include "Utilities/ErrorHandling/Error.hpp"
142 : #include "Utilities/Functional.hpp"
143 : #include "Utilities/ProtocolHelpers.hpp"
144 : #include "Utilities/TMPL.hpp"
145 :
146 : /// \cond
147 : namespace Frame {
148 : struct Inertial;
149 : } // namespace Frame
150 : namespace PUP {
151 : class er;
152 : } // namespace PUP
153 : namespace Parallel {
154 : template <typename Metavariables>
155 : class CProxy_GlobalCache;
156 : } // namespace Parallel
157 : /// \endcond
158 :
159 : template <typename EvolutionMetavarsDerived>
160 : struct ScalarTensorTemplateBase;
161 :
162 : namespace detail {
163 : constexpr auto make_default_phase_order() {
164 : return std::array{Parallel::Phase::Initialization,
165 : Parallel::Phase::RegisterWithElementDataReader,
166 : Parallel::Phase::ImportInitialData,
167 : Parallel::Phase::InitializeInitialDataDependentQuantities,
168 : Parallel::Phase::Register,
169 : Parallel::Phase::InitializeTimeStepperHistory,
170 : Parallel::Phase::Evolve,
171 : Parallel::Phase::Exit};
172 : }
173 :
174 : struct ObserverTags {
175 : static constexpr size_t volume_dim = 3_st;
176 : static constexpr bool backreaction_is_enabled = false;
177 :
178 : using system = ScalarTensor::System;
179 :
180 : using variables_tag = typename system::variables_tag;
181 :
182 : using initial_data_list = gh::ScalarTensor::AnalyticData::all_analytic_data;
183 :
184 : using deriv_compute = ::Tags::DerivCompute<
185 : variables_tag, domain::Tags::Mesh<volume_dim>,
186 : domain::Tags::InverseJacobian<volume_dim, Frame::ElementLogical,
187 : Frame::Inertial>,
188 : typename system::gradient_variables>;
189 :
190 : using observe_fields = tmpl::append<
191 : tmpl::push_back<
192 : system::gh_system::variables_tag::tags_list,
193 : ScalarTensor::Tags::CswCompute<CurvedScalarWave::Tags::Psi>,
194 : ScalarTensor::Tags::CswCompute<CurvedScalarWave::Tags::Pi>,
195 : ScalarTensor::Tags::CswCompute<
196 : CurvedScalarWave::Tags::Phi<volume_dim>>,
197 : gh::Tags::GaugeH<DataVector, volume_dim, Frame::Inertial>,
198 : gh::Tags::SpacetimeDerivGaugeH<DataVector, volume_dim,
199 : Frame::Inertial>,
200 : // 3 plus 1 Tags and derivatives
201 : gr::Tags::SpatialMetric<DataVector, volume_dim, Frame::Inertial>,
202 : gr::Tags::DetSpatialMetric<DataVector>,
203 : gr::Tags::InverseSpatialMetric<DataVector, volume_dim,
204 : Frame::Inertial>,
205 : gr::Tags::Shift<DataVector, volume_dim, Frame::Inertial>,
206 : gr::Tags::Lapse<DataVector>,
207 : gr::Tags::SqrtDetSpatialMetric<DataVector>,
208 : gr::Tags::SpacetimeNormalOneFormCompute<DataVector, volume_dim,
209 : Frame::Inertial>,
210 : gr::Tags::SpacetimeNormalVector<DataVector, volume_dim,
211 : Frame::Inertial>,
212 : gr::Tags::InverseSpacetimeMetric<DataVector, volume_dim,
213 : Frame::Inertial>,
214 : ::Tags::deriv<
215 : gr::Tags::SpatialMetric<DataVector, volume_dim, Frame::Inertial>,
216 : tmpl::size_t<volume_dim>, Frame::Inertial>,
217 : gr::Tags::SpatialChristoffelFirstKind<DataVector, volume_dim,
218 : Frame::Inertial>,
219 : gr::Tags::SpatialChristoffelSecondKind<DataVector, volume_dim,
220 : Frame::Inertial>,
221 : // 3 plus 1 variables used by CSW
222 : gr::Tags::TraceSpatialChristoffelSecondKind<DataVector, volume_dim,
223 : Frame::Inertial>,
224 : gr::Tags::ExtrinsicCurvature<DataVector, volume_dim, Frame::Inertial>,
225 : gr::Tags::TraceExtrinsicCurvature<DataVector>,
226 : // More 3 plus 1 variables
227 : ::Tags::deriv<gr::Tags::SpatialChristoffelSecondKind<
228 : DataVector, volume_dim, Frame::Inertial>,
229 : tmpl::size_t<volume_dim>, Frame::Inertial>,
230 : gr::Tags::SpatialRicci<DataVector, volume_dim, Frame::Inertial>,
231 : gr::Tags::SpatialRicciScalar<DataVector>,
232 : // Compute the constraints of GH
233 : gh::Tags::GaugeConstraintCompute<volume_dim, Frame::Inertial>,
234 : gh::Tags::TwoIndexConstraintCompute<volume_dim, Frame::Inertial>,
235 : gh::Tags::ThreeIndexConstraintCompute<volume_dim, Frame::Inertial>,
236 : // Compute the constraints of CSW
237 : ScalarTensor::Tags::CswOneIndexConstraintCompute<volume_dim>,
238 : ScalarTensor::Tags::CswTwoIndexConstraintCompute<volume_dim>,
239 : // GH constraint norms
240 : ::Tags::PointwiseL2NormCompute<gh::Tags::GaugeConstraint<
241 : DataVector, volume_dim, Frame::Inertial>>,
242 : ::Tags::PointwiseL2NormCompute<gh::Tags::TwoIndexConstraint<
243 : DataVector, volume_dim, Frame::Inertial>>,
244 : ::Tags::PointwiseL2NormCompute<gh::Tags::ThreeIndexConstraint<
245 : DataVector, volume_dim, Frame::Inertial>>,
246 : // CSW constraint norms
247 : ::Tags::PointwiseL2NormCompute<ScalarTensor::Tags::Csw<
248 : CurvedScalarWave::Tags::OneIndexConstraint<volume_dim>>>,
249 : ::Tags::PointwiseL2NormCompute<ScalarTensor::Tags::Csw<
250 : CurvedScalarWave::Tags::TwoIndexConstraint<volume_dim>>>,
251 : // Damping parameters
252 : gh::Tags::ConstraintGamma0, gh::Tags::ConstraintGamma1,
253 : gh::Tags::ConstraintGamma2,
254 : ScalarTensor::Tags::CswCompute<
255 : CurvedScalarWave::Tags::ConstraintGamma1>,
256 : ScalarTensor::Tags::CswCompute<
257 : CurvedScalarWave::Tags::ConstraintGamma2>,
258 : // Sources
259 : ScalarTensor::Tags::TraceReversedStressEnergyCompute,
260 : ScalarTensor::Tags::ScalarSource,
261 :
262 : ::domain::Tags::Coordinates<volume_dim, Frame::Grid>,
263 : ::domain::Tags::Coordinates<volume_dim, Frame::Inertial>>,
264 : // The 4-index constraint is only implemented in 3d
265 : tmpl::list<
266 : tmpl::conditional_t<
267 : backreaction_is_enabled,
268 : ScalarTensor::Tags::FConstraintCompute<
269 : volume_dim, Frame::Inertial>,
270 : gh::Tags::FConstraintCompute<volume_dim, Frame::Inertial>>,
271 : gh::Tags::FourIndexConstraintCompute<volume_dim, Frame::Inertial>,
272 : ::Tags::PointwiseL2NormCompute<
273 : gh::Tags::FConstraint<DataVector, volume_dim>>,
274 : ::Tags::PointwiseL2NormCompute<
275 : gh::Tags::FourIndexConstraint<DataVector, volume_dim>>,
276 : gh::Tags::ConstraintEnergyCompute<volume_dim, Frame::Inertial>,
277 : ::Tags::deriv<gr::Tags::ExtrinsicCurvature<DataVector, volume_dim,
278 : Frame::Inertial>,
279 : tmpl::size_t<volume_dim>, Frame::Inertial>,
280 : gr::Tags::CovariantDerivativeOfExtrinsicCurvature<
281 : DataVector, volume_dim, Frame::Inertial>,
282 : gr::Tags::WeylElectric<DataVector, volume_dim, Frame::Inertial>,
283 : gr::Tags::WeylElectricScalar<DataVector>,
284 : gr::Tags::WeylMagneticScalar<DataVector>,
285 : gr::Tags::Psi4RealCompute<Frame::Inertial>>>;
286 : using non_tensor_compute_tags = tmpl::list<
287 : ::Events::Tags::ObserverMeshCompute<volume_dim>,
288 : ::Events::Tags::ObserverCoordinatesCompute<volume_dim, Frame::Inertial>,
289 : ::Events::Tags::ObserverInverseJacobianCompute<
290 : volume_dim, Frame::ElementLogical, Frame::Inertial>,
291 : ::Events::Tags::ObserverJacobianCompute<volume_dim, Frame::ElementLogical,
292 : Frame::Inertial>,
293 : ::Events::Tags::ObserverDetInvJacobianCompute<Frame::ElementLogical,
294 : Frame::Inertial>,
295 : ::Events::Tags::ObserverMeshVelocityCompute<volume_dim, Frame::Inertial>,
296 : gh::gauges::Tags::GaugeAndDerivativeCompute<
297 : volume_dim, gh::ScalarTensor::AnalyticData::all_analytic_data>>;
298 :
299 : using field_observations =
300 : dg::Events::field_observations<volume_dim, observe_fields,
301 : non_tensor_compute_tags>;
302 :
303 : // We collect here all the tags needed for interpolation in all surfaces
304 : using scalar_charge_vars_to_interpolate_to_target = tmpl::list<
305 : gr::Tags::SpatialMetric<DataVector, volume_dim, Frame::Inertial>,
306 : gr::Tags::InverseSpatialMetric<DataVector, volume_dim, Frame::Inertial>,
307 : CurvedScalarWave::Tags::Phi<volume_dim>, CurvedScalarWave::Tags::Psi>;
308 :
309 : using scalar_charge_compute_items_on_target = tmpl::list<
310 : ylm::Tags::ThetaPhiCompute<::Frame::Inertial>,
311 : ylm::Tags::RadiusCompute<::Frame::Inertial>,
312 : ylm::Tags::RhatCompute<::Frame::Inertial>,
313 : ylm::Tags::InvJacobianCompute<::Frame::Inertial>,
314 : ylm::Tags::JacobianCompute<::Frame::Inertial>,
315 : ylm::Tags::DxRadiusCompute<::Frame::Inertial>,
316 : ylm::Tags::NormalOneFormCompute<::Frame::Inertial>,
317 : ylm::Tags::OneOverOneFormMagnitudeCompute<DataVector, volume_dim,
318 : ::Frame::Inertial>,
319 : ylm::Tags::UnitNormalOneFormCompute<::Frame::Inertial>,
320 : ylm::Tags::UnitNormalVectorCompute<::Frame::Inertial>,
321 : gr::surfaces::Tags::AreaElementCompute<::Frame::Inertial>,
322 : ScalarTensor::StrahlkorperScalar::Tags::ScalarChargeIntegrandCompute,
323 : gr::surfaces::Tags::SurfaceIntegralCompute<
324 : ScalarTensor::StrahlkorperScalar::Tags::ScalarChargeIntegrand,
325 : ::Frame::Inertial>,
326 : gr::surfaces::Tags::SurfaceIntegralCompute<CurvedScalarWave::Tags::Psi,
327 : ::Frame::Inertial>,
328 : CurvedScalarWave::Tags::PsiSquaredCompute,
329 : gr::surfaces::Tags::SurfaceIntegralCompute<
330 : CurvedScalarWave::Tags::PsiSquared, ::Frame::Inertial>>;
331 :
332 : using scalar_charge_surface_obs_tags = tmpl::list<
333 : gr::surfaces::Tags::SurfaceIntegral<
334 : ScalarTensor::StrahlkorperScalar::Tags::ScalarChargeIntegrand,
335 : ::Frame::Inertial>,
336 : gr::surfaces::Tags::SurfaceIntegral<CurvedScalarWave::Tags::Psi,
337 : ::Frame::Inertial>,
338 : gr::surfaces::Tags::SurfaceIntegral<CurvedScalarWave::Tags::PsiSquared,
339 : ::Frame::Inertial>>;
340 : };
341 :
342 : struct FactoryCreation : tt::ConformsTo<Options::protocols::FactoryCreation> {
343 : static constexpr size_t volume_dim = 3_st;
344 :
345 : using system = ScalarTensor::System;
346 :
347 : using initial_data_list = gh::ScalarTensor::AnalyticData::all_analytic_data;
348 : using factory_classes = tmpl::map<
349 : tmpl::pair<DenseTrigger, DenseTriggers::standard_dense_triggers>,
350 : tmpl::pair<DomainCreator<volume_dim>, domain_creators<volume_dim>>,
351 : tmpl::pair<Event,
352 : tmpl::flatten<tmpl::list<
353 : Events::Completion, Events::MonitorMemory<volume_dim>,
354 : typename detail::ObserverTags::field_observations,
355 : Events::time_events<system>,
356 : dg::Events::ObserveTimeStepVolume<system>,
357 : dg::Events::ChangeFixedLtsRatio<volume_dim>>>>,
358 : tmpl::pair<
359 : evolution::BoundaryCorrection,
360 : ScalarTensor::BoundaryCorrections::standard_boundary_corrections>,
361 : tmpl::pair<
362 : ScalarTensor::BoundaryConditions::BoundaryCondition,
363 : ScalarTensor::BoundaryConditions::standard_boundary_conditions>,
364 : tmpl::pair<gh::gauges::GaugeCondition, gh::gauges::all_gauges>,
365 : tmpl::pair<MathFunction<1, Frame::Inertial>, tmpl::list<>>,
366 : tmpl::pair<
367 : evolution::initial_data::InitialData,
368 : tmpl::push_back<initial_data_list, ScalarTensor::NumericInitialData>>,
369 : tmpl::pair<PhaseChange, PhaseControl::factory_creatable_classes>,
370 : tmpl::pair<StepChooser<StepChooserUse::LtsStep>,
371 : StepChoosers::standard_step_choosers<system>>,
372 : tmpl::pair<StepChooser<StepChooserUse::Slab>,
373 : tmpl::push_back<
374 : StepChoosers::standard_slab_choosers<system>,
375 : evolution::dg::StepChoosers::FixedLtsRatio<volume_dim>>>,
376 : tmpl::pair<TimeSequence<double>,
377 : TimeSequences::all_time_sequences<double>>,
378 : tmpl::pair<TimeSequence<std::uint64_t>,
379 : TimeSequences::all_time_sequences<std::uint64_t>>,
380 : tmpl::pair<TimeStepper, TimeSteppers::time_steppers>,
381 : tmpl::pair<Trigger, tmpl::append<Triggers::logical_triggers,
382 : Triggers::time_triggers>>,
383 : tmpl::pair<Filters::Filter<volume_dim,
384 : typename system::variables_tag::tags_list>,
385 : Filters::all_filters<
386 : volume_dim, typename system::variables_tag::tags_list>>>;
387 : };
388 : } // namespace detail
389 :
390 : template <class EvolutionMetavarsDerived>
391 0 : struct ScalarTensorTemplateBase {
392 0 : using derived_metavars = EvolutionMetavarsDerived;
393 :
394 0 : static constexpr size_t volume_dim = 3_st;
395 0 : using system = ScalarTensor::System;
396 :
397 0 : static constexpr bool use_dg_element_collection = false;
398 :
399 : // NOLINTNEXTLINE(google-runtime-references)
400 0 : void pup(PUP::er& /*p*/) {}
401 :
402 0 : using factory_creation = detail::FactoryCreation;
403 :
404 0 : using observed_reduction_data_tags =
405 : observers::collect_reduction_data_tags<tmpl::push_back<
406 : tmpl::at<typename factory_creation::factory_classes, Event>>>;
407 :
408 0 : using initialize_initial_data_dependent_quantities_actions = tmpl::list<
409 : ScalarTensor::Actions::InitializeGhAnd3Plus1Variables,
410 : gh::gauges::SetPiAndPhiFromConstraints<
411 : gh::ScalarTensor::AnalyticData::all_analytic_data, volume_dim>,
412 : Parallel::Actions::TerminatePhase>;
413 :
414 : // A tmpl::list of tags to be added to the GlobalCache by the
415 : // metavariables
416 0 : using const_global_cache_tags = tmpl::list<
417 : gh::gauges::Tags::GaugeCondition,
418 : evolution::initial_data::Tags::InitialData,
419 : gh::Tags::DampingFunctionGamma0<volume_dim, Frame::Grid>,
420 : gh::Tags::DampingFunctionGamma1<volume_dim, Frame::Grid>,
421 : gh::Tags::DampingFunctionGamma2<volume_dim, Frame::Grid>,
422 : ScalarTensor::Tags::DampingFunctionGamma1<volume_dim, Frame::Grid>,
423 : ScalarTensor::Tags::DampingFunctionGamma2<volume_dim, Frame::Grid>,
424 : // Source parameters
425 : ScalarTensor::Tags::RampUpParameters,
426 : ScalarTensor::Tags::CouplingParameters, ScalarTensor::Tags::ScalarMass>;
427 :
428 0 : using dg_registration_list =
429 : tmpl::list<observers::Actions::RegisterEventsWithObservers>;
430 :
431 0 : using equal_rate_regions =
432 : tmpl::list<evolution::dg::NonconformingEqualRateRegions<volume_dim>>;
433 :
434 0 : static constexpr auto default_phase_order =
435 : detail::make_default_phase_order();
436 :
437 : template <typename ControlSystems>
438 0 : using step_actions = tmpl::list<
439 : evolution::dg::Actions::ComputeTimeDerivative<
440 : volume_dim, system, AllStepChoosers, use_dg_element_collection>,
441 : evolution::dg::Actions::ApplyBoundaryCorrectionsToTimeDerivative<
442 : volume_dim, use_dg_element_collection>,
443 : Actions::MutateApply<RecordTimeStepperData<system>>,
444 : evolution::Actions::RunEventsAndDenseTriggers<tmpl::list<
445 : ::domain::CheckFunctionsOfTimeAreReadyPostprocessor<volume_dim>,
446 : evolution::dg::ApplyLtsDenseBoundaryCorrections<derived_metavars>>>,
447 : control_system::Actions::LimitTimeStep<ControlSystems>,
448 : Actions::MutateApply<UpdateU<system>>,
449 : evolution::dg::Actions::ApplyLtsBoundaryCorrections<
450 : volume_dim, use_dg_element_collection>,
451 : Actions::MutateApply<ChangeTimeStepperOrder<system>>,
452 : Actions::MutateApply<CleanHistory<system>>,
453 : Actions::MutateApply<evolution::dg::CleanMortarHistory<volume_dim>>,
454 : dg::Actions::SpectralFilter<volume_dim,
455 : typename system::variables_tag::tags_list>>;
456 :
457 : template <bool UseControlSystems>
458 0 : using initialization_actions = tmpl::list<
459 : Initialization::Actions::InitializeItems<
460 : Initialization::TimeStepping<derived_metavars, TimeStepper,
461 : UseControlSystems, true>,
462 : evolution::dg::Initialization::Domain<derived_metavars,
463 : UseControlSystems>>,
464 : Initialization::Actions::NonconservativeSystem<system>,
465 : Initialization::Actions::InitializeItems<
466 : Initialization::TimeStepperHistory<system>>,
467 : Initialization::Actions::AddComputeTags<::Tags::DerivCompute<
468 : typename system::variables_tag, domain::Tags::Mesh<volume_dim>,
469 : domain::Tags::InverseJacobian<volume_dim, Frame::ElementLogical,
470 : Frame::Inertial>,
471 : typename system::gradient_variables>>,
472 : Initialization::Actions::AddComputeTags<
473 : StepChoosers::step_chooser_compute_tags<ScalarTensorTemplateBase>>,
474 : ::evolution::dg::Initialization::Mortars<volume_dim>,
475 : evolution::dg::Initialization::Actions::SetupEqualRateRegions<
476 : derived_metavars, volume_dim, equal_rate_regions>,
477 : evolution::Actions::InitializeRunEventsAndDenseTriggers,
478 : Initialization::Actions::InitializeItems<
479 : evolution::dg::Initialization::SpectralFilters<
480 : volume_dim, typename system::variables_tag::tags_list>>,
481 : Parallel::Actions::TerminatePhase>;
482 : };
|