SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Executables/GeneralizedHarmonic - GeneralizedHarmonicBase.hpp Hit Total Coverage
Commit: 1e29a35ad8559408f21493dc5db8a49a237bb2f0 Lines: 0 16 0.0 %
Date: 2026-03-31 22:27:51
Legend: Lines: hit not hit

          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/Completion.hpp"
      87             : #include "ParallelAlgorithms/Events/Factory.hpp"
      88             : #include "ParallelAlgorithms/Events/MonitorMemory.hpp"
      89             : #include "ParallelAlgorithms/Events/ObserveTimeStep.hpp"
      90             : #include "ParallelAlgorithms/Events/ObserveTimeStepVolume.hpp"
      91             : #include "ParallelAlgorithms/Events/Tags.hpp"
      92             : #include "ParallelAlgorithms/EventsAndDenseTriggers/DenseTrigger.hpp"
      93             : #include "ParallelAlgorithms/EventsAndDenseTriggers/DenseTriggers/Factory.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::VSpacetimeMetricSpeedCompute<volume_dim, Frame::Inertial,
     212             :                                                  Frame::ElementLogical>,
     213             :           gh::Tags::VZeroSpeedCompute<volume_dim, Frame::Inertial,
     214             :                                       Frame::ElementLogical>,
     215             :           gh::Tags::VMinusSpeedCompute<volume_dim, Frame::Inertial,
     216             :                                        Frame::ElementLogical>,
     217             :           gh::Tags::VPlusSpeedCompute<volume_dim, Frame::Inertial,
     218             :                                       Frame::ElementLogical>,
     219             :           gh::Tags::DerivSpatialMetricCompute<volume_dim, ::Frame::Inertial>,
     220             :           gr::Tags::SpatialChristoffelFirstKindCompute<DataVector, volume_dim,
     221             :                                                        ::Frame::Inertial>,
     222             :           gr::Tags::SpatialChristoffelSecondKindCompute<DataVector, volume_dim,
     223             :                                                         ::Frame::Inertial>,
     224             :           ::Tags::DerivTensorCompute<
     225             :               gr::Tags::SpatialChristoffelSecondKind<DataVector, volume_dim>,
     226             :               ::domain::Tags::InverseJacobian<volume_dim, Frame::ElementLogical,
     227             :                                               Frame::Inertial>,
     228             :               ::domain::Tags::Mesh<volume_dim>>,
     229             :           gr::Tags::SpatialRicciCompute<DataVector, volume_dim,
     230             :                                         ::Frame::Inertial>,
     231             :           gr::Tags::SpatialRicciScalarCompute<DataVector, volume_dim,
     232             :                                               ::Frame::Inertial>,
     233             :           // following tags added to observe constraints
     234             :           ::Tags::PointwiseL2NormCompute<
     235             :               gh::Tags::GaugeConstraint<DataVector, volume_dim>>,
     236             :           ::Tags::PointwiseL2NormCompute<
     237             :               gh::Tags::TwoIndexConstraint<DataVector, volume_dim>>,
     238             :           ::Tags::PointwiseL2NormCompute<
     239             :               gh::Tags::ThreeIndexConstraint<DataVector, volume_dim>>,
     240             :           ::domain::Tags::Coordinates<volume_dim, Frame::Grid>,
     241             :           ::domain::Tags::Coordinates<volume_dim, Frame::Inertial>>,
     242             :       error_tags,
     243             :       // The 4-index constraint is only implemented in 3d
     244             :       tmpl::conditional_t<
     245             :           volume_dim == 3,
     246             :           tmpl::list<
     247             :               gh::Tags::FourIndexConstraintCompute<3, Frame::Inertial>,
     248             :               gh::Tags::FConstraintCompute<3, Frame::Inertial>,
     249             :               ::Tags::PointwiseL2NormCompute<
     250             :                   gh::Tags::FConstraint<DataVector, 3>>,
     251             :               ::Tags::PointwiseL2NormCompute<
     252             :                   gh::Tags::FourIndexConstraint<DataVector, 3>>,
     253             :               gh::Tags::ConstraintEnergyCompute<3, Frame::Inertial>,
     254             :               gh::Tags::ExtrinsicCurvatureCompute<3, Frame::Inertial>,
     255             :               ::Tags::DerivTensorCompute<
     256             :                   gr::Tags::ExtrinsicCurvature<DataVector, 3>,
     257             :                   ::domain::Tags::InverseJacobian<
     258             :                       volume_dim, Frame::ElementLogical, Frame::Inertial>,
     259             :                   ::domain::Tags::Mesh<volume_dim>>,
     260             :               gr::Tags::WeylElectricCompute<DataVector, 3, Frame::Inertial>,
     261             :               gr::Tags::WeylElectricScalarCompute<DataVector, 3,
     262             :                                                   Frame::Inertial>,
     263             :               gr::Tags::WeylTypeD1Compute<DataVector, 3, Frame::Inertial>,
     264             :               gr::Tags::WeylTypeD1ScalarCompute<DataVector, 3, Frame::Inertial>,
     265             :               gr::Tags::Psi4RealCompute<Frame::Inertial>>,
     266             :           tmpl::list<>>>;
     267             :   using non_tensor_compute_tags = tmpl::list<
     268             :       ::Events::Tags::ObserverMeshCompute<volume_dim>,
     269             :       ::Events::Tags::ObserverCoordinatesCompute<volume_dim, Frame::Inertial>,
     270             :       ::Events::Tags::ObserverInverseJacobianCompute<
     271             :           volume_dim, Frame::ElementLogical, Frame::Inertial>,
     272             :       ::Events::Tags::ObserverJacobianCompute<volume_dim, Frame::ElementLogical,
     273             :                                               Frame::Inertial>,
     274             :       ::Events::Tags::ObserverDetInvJacobianCompute<Frame::ElementLogical,
     275             :                                                     Frame::Inertial>,
     276             :       ::Events::Tags::ObserverMeshVelocityCompute<volume_dim, Frame::Inertial>,
     277             :       analytic_compute, error_compute,
     278             :       gh::gauges::Tags::GaugeAndDerivativeCompute<
     279             :           volume_dim, gh::Solutions::all_solutions<volume_dim>>>;
     280             : 
     281             :   using field_observations =
     282             :       dg::Events::field_observations<volume_dim, observe_fields,
     283             :                                      non_tensor_compute_tags>;
     284             : };
     285             : 
     286             : template <size_t volume_dim, bool LocalTimeStepping>
     287             : struct FactoryCreation : tt::ConformsTo<Options::protocols::FactoryCreation> {
     288             :   using system = gh::System<volume_dim>;
     289             : 
     290             :   using factory_classes = tmpl::map<
     291             :       tmpl::pair<
     292             :           amr::Criterion,
     293             :           tmpl::push_back<
     294             :               amr::Criteria::standard_criteria<
     295             :                   volume_dim, typename system::variables_tag::tags_list>,
     296             :               amr::Criteria::Constraints<
     297             :                   volume_dim, tmpl::list<gh::Tags::ThreeIndexConstraintCompute<
     298             :                                   volume_dim, Frame::Inertial>>>>>,
     299             :       tmpl::pair<DenseTrigger, DenseTriggers::standard_dense_triggers>,
     300             :       tmpl::pair<DomainCreator<volume_dim>, domain_creators<volume_dim>>,
     301             :       tmpl::pair<
     302             :           Event,
     303             :           tmpl::flatten<tmpl::list<
     304             :               Events::Completion, Events::MonitorMemory<volume_dim>,
     305             :               typename detail::ObserverTags<volume_dim>::field_observations,
     306             :               Events::time_events<system>,
     307             :               dg::Events::ObserveTimeStepVolume<system>>>>,
     308             :       tmpl::pair<
     309             :           evolution::BoundaryCorrection,
     310             :           gh::BoundaryCorrections::standard_boundary_corrections<volume_dim>>,
     311             :       tmpl::pair<
     312             :           gh::BoundaryConditions::BoundaryCondition<volume_dim>,
     313             :           gh::BoundaryConditions::standard_boundary_conditions<volume_dim>>,
     314             :       tmpl::pair<gh::gauges::GaugeCondition, gh::gauges::all_gauges>,
     315             :       tmpl::pair<
     316             :           evolution::initial_data::InitialData,
     317             :           tmpl::append<gh::Solutions::all_solutions<volume_dim>,
     318             :                        tmpl::conditional_t<volume_dim == 3,
     319             :                                            tmpl::list<gh::NumericInitialData>,
     320             :                                            tmpl::list<>>>>,
     321             :       tmpl::pair<LtsTimeStepper, TimeSteppers::lts_time_steppers>,
     322             :       tmpl::pair<MathFunction<1, Frame::Inertial>,
     323             :                  MathFunctions::all_math_functions<1, Frame::Inertial>>,
     324             :       tmpl::pair<PhaseChange, PhaseControl::factory_creatable_classes>,
     325             :       tmpl::pair<StepChooser<StepChooserUse::LtsStep>,
     326             :                  StepChoosers::standard_step_choosers<system>>,
     327             :       tmpl::pair<
     328             :           StepChooser<StepChooserUse::Slab>,
     329             :           StepChoosers::standard_slab_choosers<system, LocalTimeStepping>>,
     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             : };
     338             : }  // namespace detail
     339             : 
     340             : template <size_t VolumeDim, bool LocalTimeStepping>
     341           0 : struct GeneralizedHarmonicTemplateBase {
     342           0 :   static constexpr size_t volume_dim = VolumeDim;
     343           0 :   using system = gh::System<volume_dim>;
     344           0 :   using TimeStepperBase =
     345             :       tmpl::conditional_t<LocalTimeStepping, LtsTimeStepper, TimeStepper>;
     346             : 
     347           0 :   static constexpr bool local_time_stepping =
     348             :       TimeStepperBase::local_time_stepping;
     349           0 :   static constexpr bool use_dg_element_collection = false;
     350             : 
     351             :   // NOLINTNEXTLINE(google-runtime-references)
     352           0 :   void pup(PUP::er& /*p*/) {}
     353             : 
     354           0 :   using factory_creation =
     355             :       detail::FactoryCreation<volume_dim, local_time_stepping>;
     356             : 
     357           0 :   using observed_reduction_data_tags =
     358             :       observers::collect_reduction_data_tags<tmpl::push_back<
     359             :           tmpl::at<typename factory_creation::factory_classes, Event>>>;
     360             : 
     361           0 :   using initialize_initial_data_dependent_quantities_actions =
     362             :       tmpl::list<gh::gauges::SetPiAndPhiFromConstraints<
     363             :                      gh::Solutions::all_solutions<volume_dim>, volume_dim>,
     364             :                  Parallel::Actions::TerminatePhase>;
     365             : 
     366             :   // A tmpl::list of tags to be added to the GlobalCache by the
     367             :   // metavariables
     368           0 :   using const_global_cache_tags =
     369             :       tmpl::list<gh::gauges::Tags::GaugeCondition,
     370             :                  evolution::initial_data::Tags::InitialData,
     371             :                  gh::Tags::DampingFunctionGamma0<volume_dim, Frame::Grid>,
     372             :                  gh::Tags::DampingFunctionGamma1<volume_dim, Frame::Grid>,
     373             :                  gh::Tags::DampingFunctionGamma2<volume_dim, Frame::Grid>>;
     374             : 
     375           0 :   using dg_registration_list =
     376             :       tmpl::list<observers::Actions::RegisterEventsWithObservers>;
     377             : 
     378             :   // Register needs to be before InitializeTimeStepperHistory so that CCE is
     379             :   // properly registered when the self-start happens
     380           0 :   static constexpr auto default_phase_order =
     381             :       std::array{Parallel::Phase::Initialization,
     382             :                  Parallel::Phase::RegisterWithElementDataReader,
     383             :                  Parallel::Phase::ImportInitialData,
     384             :                  Parallel::Phase::InitializeInitialDataDependentQuantities,
     385             :                  Parallel::Phase::Register,
     386             :                  Parallel::Phase::InitializeTimeStepperHistory,
     387             :                  Parallel::Phase::CheckDomain,
     388             :                  Parallel::Phase::Evolve,
     389             :                  Parallel::Phase::Exit};
     390             : 
     391             :   template <typename DerivedMetavars, typename ControlSystems>
     392           0 :   using step_actions = tmpl::list<
     393             :       evolution::dg::Actions::ComputeTimeDerivative<
     394             :           volume_dim, system, AllStepChoosers, local_time_stepping,
     395             :           use_dg_element_collection>,
     396             :       evolution::dg::Actions::ApplyBoundaryCorrectionsToTimeDerivative<
     397             :           volume_dim, use_dg_element_collection>,
     398             :       Actions::MutateApply<RecordTimeStepperData<system>>,
     399             :       tmpl::conditional_t<
     400             :           local_time_stepping,
     401             :           tmpl::list<
     402             :               evolution::Actions::RunEventsAndDenseTriggers<tmpl::list<
     403             :                   ::domain::CheckFunctionsOfTimeAreReadyPostprocessor<
     404             :                       volume_dim>,
     405             :                   evolution::dg::ApplyBoundaryCorrections<
     406             :                       local_time_stepping, DerivedMetavars, volume_dim, true>>>,
     407             :               Actions::MutateApply<UpdateU<system, local_time_stepping>>,
     408             :               evolution::dg::Actions::ApplyLtsBoundaryCorrections<
     409             :                   volume_dim, false, use_dg_element_collection>,
     410             :               Actions::MutateApply<ChangeTimeStepperOrder<system>>>,
     411             :           tmpl::list<
     412             :               evolution::Actions::RunEventsAndDenseTriggers<tmpl::list<>>,
     413             :               control_system::Actions::LimitTimeStep<ControlSystems>,
     414             :               Actions::MutateApply<UpdateU<system, local_time_stepping>>>>,
     415             :       Actions::MutateApply<CleanHistory<system>>,
     416             :       tmpl::conditional_t<
     417             :           local_time_stepping,
     418             :           Actions::MutateApply<evolution::dg::CleanMortarHistory<volume_dim>>,
     419             :           tmpl::list<>>,
     420             :       dg::Actions::Filter<
     421             :           Filters::Exponential<0>,
     422             :           tmpl::list<gr::Tags::SpacetimeMetric<DataVector, volume_dim>,
     423             :                      gh::Tags::Pi<DataVector, volume_dim>,
     424             :                      gh::Tags::Phi<DataVector, volume_dim>>>>;
     425             : 
     426             :   template <typename DerivedMetavars, bool UseControlSystems>
     427           0 :   using initialization_actions = tmpl::list<
     428             :       Initialization::Actions::InitializeItems<
     429             :           Initialization::TimeStepping<DerivedMetavars, TimeStepperBase>,
     430             :           evolution::dg::Initialization::Domain<DerivedMetavars,
     431             :                                                 UseControlSystems>,
     432             :           ::amr::Initialization::Initialize<volume_dim, DerivedMetavars>,
     433             :           Initialization::TimeStepperHistory<DerivedMetavars>>,
     434             :       Initialization::Actions::NonconservativeSystem<system>,
     435             :       Initialization::Actions::AddComputeTags<::Tags::DerivCompute<
     436             :           typename system::variables_tag, domain::Tags::Mesh<volume_dim>,
     437             :           domain::Tags::InverseJacobian<volume_dim, Frame::ElementLogical,
     438             :                                         Frame::Inertial>,
     439             :           typename system::gradient_variables>>,
     440             :       gh::Actions::InitializeGhAnd3Plus1Variables<volume_dim>,
     441             :       Initialization::Actions::AddComputeTags<
     442             :           tmpl::push_back<StepChoosers::step_chooser_compute_tags<
     443             :               GeneralizedHarmonicTemplateBase, local_time_stepping>>>,
     444             :       ::evolution::dg::Initialization::Mortars<volume_dim>,
     445             :       evolution::Actions::InitializeRunEventsAndDenseTriggers,
     446             :       Parallel::Actions::TerminatePhase>;
     447             : };

Generated by: LCOV version 1.14