SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Executables/GeneralizedHarmonic - EvolveGhBinaryBlackHole.hpp Hit Total Coverage
Commit: 3528f39684ab2ee5d689cee48331779e729b0a07 Lines: 0 70 0.0 %
Date: 2024-02-27 07:22:14
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 <cstdint>
       7             : #include <vector>
       8             : 
       9             : #include "ControlSystem/Actions/InitializeMeasurements.hpp"
      10             : #include "ControlSystem/Actions/LimitTimeStep.hpp"
      11             : #include "ControlSystem/Actions/PrintCurrentMeasurement.hpp"
      12             : #include "ControlSystem/Component.hpp"
      13             : #include "ControlSystem/Measurements/BothHorizons.hpp"
      14             : #include "ControlSystem/Metafunctions.hpp"
      15             : #include "ControlSystem/Systems/Expansion.hpp"
      16             : #include "ControlSystem/Systems/Rotation.hpp"
      17             : #include "ControlSystem/Systems/Shape.hpp"
      18             : #include "ControlSystem/Systems/Size.hpp"
      19             : #include "ControlSystem/Trigger.hpp"
      20             : #include "DataStructures/DataBox/PrefixHelpers.hpp"
      21             : #include "DataStructures/DataBox/Tag.hpp"
      22             : #include "DataStructures/Tensor/EagerMath/RaiseOrLowerIndex.hpp"
      23             : #include "Domain/Creators/BinaryCompactObject.hpp"
      24             : #include "Domain/Creators/CylindricalBinaryCompactObject.hpp"
      25             : #include "Domain/FunctionsOfTime/FunctionsOfTimeAreReady.hpp"
      26             : #include "Domain/FunctionsOfTime/OutputTimeBounds.hpp"
      27             : #include "Domain/FunctionsOfTime/Tags.hpp"
      28             : #include "Domain/Protocols/Metavariables.hpp"
      29             : #include "Domain/Tags.hpp"
      30             : #include "Domain/TagsCharacteristicSpeeds.hpp"
      31             : #include "Evolution/Actions/RunEventsAndDenseTriggers.hpp"
      32             : #include "Evolution/Actions/RunEventsAndTriggers.hpp"
      33             : #include "Evolution/ComputeTags.hpp"
      34             : #include "Evolution/Deadlock/PrintDgElementArray.hpp"
      35             : #include "Evolution/DiscontinuousGalerkin/Actions/ApplyBoundaryCorrections.hpp"
      36             : #include "Evolution/DiscontinuousGalerkin/Actions/ComputeTimeDerivative.hpp"
      37             : #include "Evolution/DiscontinuousGalerkin/DgElementArray.hpp"
      38             : #include "Evolution/DiscontinuousGalerkin/Initialization/Mortars.hpp"
      39             : #include "Evolution/EventsAndDenseTriggers/DenseTrigger.hpp"
      40             : #include "Evolution/EventsAndDenseTriggers/DenseTriggers/Factory.hpp"
      41             : #include "Evolution/Initialization/DgDomain.hpp"
      42             : #include "Evolution/Initialization/Evolution.hpp"
      43             : #include "Evolution/Initialization/NonconservativeSystem.hpp"
      44             : #include "Evolution/Systems/Cce/Callbacks/DumpBondiSachsOnWorldtube.hpp"
      45             : #include "Evolution/Systems/GeneralizedHarmonic/Actions/SetInitialData.hpp"
      46             : #include "Evolution/Systems/GeneralizedHarmonic/BoundaryConditions/Bjorhus.hpp"
      47             : #include "Evolution/Systems/GeneralizedHarmonic/BoundaryConditions/DemandOutgoingCharSpeeds.hpp"
      48             : #include "Evolution/Systems/GeneralizedHarmonic/BoundaryConditions/DirichletMinkowski.hpp"
      49             : #include "Evolution/Systems/GeneralizedHarmonic/BoundaryConditions/Factory.hpp"
      50             : #include "Evolution/Systems/GeneralizedHarmonic/BoundaryCorrections/Factory.hpp"
      51             : #include "Evolution/Systems/GeneralizedHarmonic/Characteristics.hpp"
      52             : #include "Evolution/Systems/GeneralizedHarmonic/Equations.hpp"
      53             : #include "Evolution/Systems/GeneralizedHarmonic/GaugeSourceFunctions/Factory.hpp"
      54             : #include "Evolution/Systems/GeneralizedHarmonic/GaugeSourceFunctions/Gauges.hpp"
      55             : #include "Evolution/Systems/GeneralizedHarmonic/GaugeSourceFunctions/SetPiAndPhiFromConstraints.hpp"
      56             : #include "Evolution/Systems/GeneralizedHarmonic/GaugeSourceFunctions/Tags/GaugeCondition.hpp"
      57             : #include "Evolution/Systems/GeneralizedHarmonic/Initialize.hpp"
      58             : #include "Evolution/Systems/GeneralizedHarmonic/System.hpp"
      59             : #include "Evolution/Systems/GeneralizedHarmonic/Tags.hpp"
      60             : #include "Evolution/Tags/Filter.hpp"
      61             : #include "Evolution/Triggers/SeparationLessThan.hpp"
      62             : #include "Evolution/TypeTraits.hpp"
      63             : #include "IO/Importers/Actions/RegisterWithElementDataReader.hpp"
      64             : #include "IO/Importers/ElementDataReader.hpp"
      65             : #include "IO/Observer/Actions/ObserverRegistration.hpp"
      66             : #include "IO/Observer/Actions/RegisterEvents.hpp"
      67             : #include "IO/Observer/Helpers.hpp"
      68             : #include "IO/Observer/ObserverComponent.hpp"
      69             : #include "IO/Observer/Tags.hpp"
      70             : #include "NumericalAlgorithms/DiscontinuousGalerkin/Tags.hpp"
      71             : #include "NumericalAlgorithms/LinearOperators/ExponentialFilter.hpp"
      72             : #include "NumericalAlgorithms/LinearOperators/FilterAction.hpp"
      73             : #include "Options/Options.hpp"
      74             : #include "Options/ParseOptions.hpp"
      75             : #include "Options/Protocols/FactoryCreation.hpp"
      76             : #include "Options/String.hpp"
      77             : #include "Parallel/Algorithms/AlgorithmSingleton.hpp"
      78             : #include "Parallel/GlobalCache.hpp"
      79             : #include "Parallel/Invoke.hpp"
      80             : #include "Parallel/Local.hpp"
      81             : #include "Parallel/MemoryMonitor/MemoryMonitor.hpp"
      82             : #include "Parallel/Phase.hpp"
      83             : #include "Parallel/PhaseControl/CheckpointAndExitAfterWallclock.hpp"
      84             : #include "Parallel/PhaseControl/ExecutePhaseChange.hpp"
      85             : #include "Parallel/PhaseControl/Factory.hpp"
      86             : #include "Parallel/PhaseControl/VisitAndReturn.hpp"
      87             : #include "Parallel/PhaseDependentActionList.hpp"
      88             : #include "Parallel/Printf.hpp"
      89             : #include "Parallel/Protocols/RegistrationMetavariables.hpp"
      90             : #include "Parallel/Reduction.hpp"
      91             : #include "ParallelAlgorithms/Actions/AddComputeTags.hpp"
      92             : #include "ParallelAlgorithms/Actions/InitializeItems.hpp"
      93             : #include "ParallelAlgorithms/Actions/MemoryMonitor/ContributeMemoryData.hpp"
      94             : #include "ParallelAlgorithms/Actions/MutateApply.hpp"
      95             : #include "ParallelAlgorithms/Actions/TerminatePhase.hpp"
      96             : #include "ParallelAlgorithms/Amr/Actions/CollectDataFromChildren.hpp"
      97             : #include "ParallelAlgorithms/Amr/Actions/Component.hpp"
      98             : #include "ParallelAlgorithms/Amr/Actions/CreateChild.hpp"
      99             : #include "ParallelAlgorithms/Amr/Actions/Initialize.hpp"
     100             : #include "ParallelAlgorithms/Amr/Actions/SendAmrDiagnostics.hpp"
     101             : #include "ParallelAlgorithms/Amr/Criteria/Constraints.hpp"
     102             : #include "ParallelAlgorithms/Amr/Criteria/Criterion.hpp"
     103             : #include "ParallelAlgorithms/Amr/Criteria/DriveToTarget.hpp"
     104             : #include "ParallelAlgorithms/Amr/Criteria/Random.hpp"
     105             : #include "ParallelAlgorithms/Amr/Criteria/TruncationError.hpp"
     106             : #include "ParallelAlgorithms/Amr/Projectors/CopyFromCreatorOrLeaveAsIs.hpp"
     107             : #include "ParallelAlgorithms/Amr/Projectors/DefaultInitialize.hpp"
     108             : #include "ParallelAlgorithms/Amr/Projectors/Tensors.hpp"
     109             : #include "ParallelAlgorithms/Amr/Projectors/Variables.hpp"
     110             : #include "ParallelAlgorithms/Amr/Protocols/AmrMetavariables.hpp"
     111             : #include "ParallelAlgorithms/ApparentHorizonFinder/Callbacks/ErrorOnFailedApparentHorizon.hpp"
     112             : #include "ParallelAlgorithms/ApparentHorizonFinder/Callbacks/FindApparentHorizon.hpp"
     113             : #include "ParallelAlgorithms/ApparentHorizonFinder/Callbacks/IgnoreFailedApparentHorizon.hpp"
     114             : #include "ParallelAlgorithms/ApparentHorizonFinder/ComputeExcisionBoundaryVolumeQuantities.hpp"
     115             : #include "ParallelAlgorithms/ApparentHorizonFinder/ComputeExcisionBoundaryVolumeQuantities.tpp"
     116             : #include "ParallelAlgorithms/ApparentHorizonFinder/ComputeHorizonVolumeQuantities.hpp"
     117             : #include "ParallelAlgorithms/ApparentHorizonFinder/ComputeHorizonVolumeQuantities.tpp"
     118             : #include "ParallelAlgorithms/ApparentHorizonFinder/HorizonAliases.hpp"
     119             : #include "ParallelAlgorithms/ApparentHorizonFinder/InterpolationTarget.hpp"
     120             : #include "ParallelAlgorithms/ApparentHorizonFinder/ObserveCenters.hpp"
     121             : #include "ParallelAlgorithms/Events/Factory.hpp"
     122             : #include "ParallelAlgorithms/Events/MonitorMemory.hpp"
     123             : #include "ParallelAlgorithms/EventsAndTriggers/Completion.hpp"
     124             : #include "ParallelAlgorithms/EventsAndTriggers/Event.hpp"
     125             : #include "ParallelAlgorithms/EventsAndTriggers/EventsAndTriggers.hpp"
     126             : #include "ParallelAlgorithms/EventsAndTriggers/LogicalTriggers.hpp"
     127             : #include "ParallelAlgorithms/EventsAndTriggers/Trigger.hpp"
     128             : #include "ParallelAlgorithms/Interpolation/Actions/CleanUpInterpolator.hpp"
     129             : #include "ParallelAlgorithms/Interpolation/Actions/ElementInitInterpPoints.hpp"
     130             : #include "ParallelAlgorithms/Interpolation/Actions/InitializeInterpolationTarget.hpp"
     131             : #include "ParallelAlgorithms/Interpolation/Actions/InterpolationTargetReceiveVars.hpp"
     132             : #include "ParallelAlgorithms/Interpolation/Actions/InterpolatorReceivePoints.hpp"
     133             : #include "ParallelAlgorithms/Interpolation/Actions/InterpolatorReceiveVolumeData.hpp"
     134             : #include "ParallelAlgorithms/Interpolation/Actions/InterpolatorRegisterElement.hpp"
     135             : #include "ParallelAlgorithms/Interpolation/Actions/TryToInterpolate.hpp"
     136             : #include "ParallelAlgorithms/Interpolation/Callbacks/ObserveSurfaceData.hpp"
     137             : #include "ParallelAlgorithms/Interpolation/Callbacks/ObserveTimeSeriesOnSurface.hpp"
     138             : #include "ParallelAlgorithms/Interpolation/Events/Interpolate.hpp"
     139             : #include "ParallelAlgorithms/Interpolation/Events/InterpolateWithoutInterpComponent.hpp"
     140             : #include "ParallelAlgorithms/Interpolation/InterpolationTarget.hpp"
     141             : #include "ParallelAlgorithms/Interpolation/Interpolator.hpp"
     142             : #include "ParallelAlgorithms/Interpolation/Protocols/InterpolationTargetTag.hpp"
     143             : #include "ParallelAlgorithms/Interpolation/Tags.hpp"
     144             : #include "ParallelAlgorithms/Interpolation/Targets/Sphere.hpp"
     145             : #include "PointwiseFunctions/GeneralRelativity/Christoffel.hpp"
     146             : #include "PointwiseFunctions/GeneralRelativity/DetAndInverseSpatialMetric.hpp"
     147             : #include "PointwiseFunctions/GeneralRelativity/GeneralizedHarmonic/ConstraintGammas.hpp"
     148             : #include "PointwiseFunctions/GeneralRelativity/GeneralizedHarmonic/ExtrinsicCurvature.hpp"
     149             : #include "PointwiseFunctions/GeneralRelativity/Psi4Real.hpp"
     150             : #include "PointwiseFunctions/GeneralRelativity/Ricci.hpp"
     151             : #include "PointwiseFunctions/GeneralRelativity/Surfaces/Tags.hpp"
     152             : #include "PointwiseFunctions/GeneralRelativity/Tags.hpp"
     153             : #include "PointwiseFunctions/GeneralRelativity/WeylElectric.hpp"
     154             : #include "PointwiseFunctions/GeneralRelativity/WeylTypeD1.hpp"
     155             : #include "PointwiseFunctions/InitialDataUtilities/InitialData.hpp"
     156             : #include "Time/Actions/AdvanceTime.hpp"
     157             : #include "Time/Actions/ChangeSlabSize.hpp"
     158             : #include "Time/Actions/RecordTimeStepperData.hpp"
     159             : #include "Time/Actions/SelfStartActions.hpp"
     160             : #include "Time/Actions/UpdateU.hpp"
     161             : #include "Time/StepChoosers/Cfl.hpp"
     162             : #include "Time/StepChoosers/Constant.hpp"
     163             : #include "Time/StepChoosers/Factory.hpp"
     164             : #include "Time/StepChoosers/Increase.hpp"
     165             : #include "Time/StepChoosers/PreventRapidIncrease.hpp"
     166             : #include "Time/StepChoosers/StepChooser.hpp"
     167             : #include "Time/StepChoosers/StepToTimes.hpp"
     168             : #include "Time/Tags/Time.hpp"
     169             : #include "Time/Tags/TimeStepId.hpp"
     170             : #include "Time/TimeSequence.hpp"
     171             : #include "Time/TimeSteppers/Factory.hpp"
     172             : #include "Time/TimeSteppers/LtsTimeStepper.hpp"
     173             : #include "Time/TimeSteppers/TimeStepper.hpp"
     174             : #include "Time/Triggers/TimeTriggers.hpp"
     175             : #include "Utilities/Algorithm.hpp"
     176             : #include "Utilities/ErrorHandling/Error.hpp"
     177             : #include "Utilities/Functional.hpp"
     178             : #include "Utilities/GetOutput.hpp"
     179             : #include "Utilities/NoSuchType.hpp"
     180             : #include "Utilities/ProtocolHelpers.hpp"
     181             : #include "Utilities/TMPL.hpp"
     182             : 
     183             : // Check if SpEC is linked and therefore we can load SpEC initial data
     184             : #ifdef HAS_SPEC_EXPORTER
     185             : #include "PointwiseFunctions/AnalyticData/GeneralRelativity/SpecInitialData.hpp"
     186             : using SpecInitialData = gr::AnalyticData::SpecInitialData;
     187             : #else
     188           0 : using SpecInitialData = NoSuchType;
     189             : #endif
     190             : 
     191             : /// \cond
     192             : namespace Frame {
     193             : // IWYU pragma: no_forward_declare MathFunction
     194             : struct Inertial;
     195             : }  // namespace Frame
     196             : namespace PUP {
     197             : class er;
     198             : }  // namespace PUP
     199             : namespace Parallel {
     200             : template <typename Metavariables>
     201             : class CProxy_GlobalCache;
     202             : }  // namespace Parallel
     203             : 
     204             : // We need separate time tags for all horizon finders because of complicated
     205             : // Interpolator internal details. So we just make a simple compute tag that
     206             : // takes the actual time out of the box since we still want the actual time to
     207             : // be the same, just a different tag.
     208             : namespace Tags {
     209             : template <size_t Index>
     210             : struct AhObservationTime {
     211             :   static std::string name() { return "AhObservationTime" + get_output(Index); }
     212             :   using type = double;
     213             : };
     214             : 
     215             : template <size_t Index>
     216             : struct AhObservationTimeCompute : AhObservationTime<Index>, db::ComputeTag {
     217             :   using argument_tags = tmpl::list<::Tags::Time>;
     218             :   using base = AhObservationTime<Index>;
     219             :   using return_type = double;
     220             : 
     221             :   static void function(const gsl::not_null<double*> ah_time,
     222             :                        const double time) {
     223             :     *ah_time = time;
     224             :   }
     225             : };
     226             : }  // namespace Tags
     227             : /// \endcond
     228             : 
     229             : // Note: this executable does not use GeneralizedHarmonicBase.hpp, because
     230             : // using it would require a number of changes in GeneralizedHarmonicBase.hpp
     231             : // that would apply only when evolving binary black holes. This would
     232             : // require adding a number of compile-time switches, an outcome we would prefer
     233             : // to avoid.
     234             : struct EvolutionMetavars {
     235             :   struct BondiSachs;
     236             : 
     237             :   static constexpr size_t volume_dim = 3;
     238           0 :   static constexpr bool use_damped_harmonic_rollon = false;
     239           0 :   using system = gh::System<volume_dim>;
     240           0 :   static constexpr dg::Formulation dg_formulation =
     241             :       dg::Formulation::StrongInertial;
     242           0 :   using temporal_id = Tags::TimeStepId;
     243           0 :   using TimeStepperBase = LtsTimeStepper;
     244             : 
     245             :   static constexpr bool local_time_stepping =
     246             :       TimeStepperBase::local_time_stepping;
     247             : 
     248           0 :   using initialize_initial_data_dependent_quantities_actions = tmpl::list<
     249             :       Actions::MutateApply<gh::gauges::SetPiAndPhiFromConstraints<volume_dim>>,
     250             :       Parallel::Actions::TerminatePhase>;
     251             : 
     252             :   // NOLINTNEXTLINE(google-runtime-references)
     253           0 :   void pup(PUP::er& /*p*/) {}
     254             :   struct domain : tt::ConformsTo<::domain::protocols::Metavariables> {
     255             :     static constexpr bool enable_time_dependent_maps = true;
     256             :   };
     257             : 
     258             :   template <::domain::ObjectLabel Horizon, typename Frame>
     259           0 :   struct Ah : tt::ConformsTo<intrp::protocols::InterpolationTargetTag> {
     260           0 :     static constexpr size_t index = static_cast<size_t>(Horizon);
     261           0 :     using temporal_id = ::Tags::AhObservationTime<index>;
     262           0 :     using vars_to_interpolate_to_target =
     263             :         ::ah::vars_to_interpolate_to_target<volume_dim, Frame>;
     264           0 :     using compute_vars_to_interpolate = ah::ComputeHorizonVolumeQuantities;
     265           0 :     using tags_to_observe = ::ah::tags_for_observing<Frame>;
     266           0 :     using surface_tags_to_observe = ::ah::surface_tags_for_observing;
     267           0 :     using compute_items_on_source =
     268             :         tmpl::list<::Tags::AhObservationTimeCompute<index>>;
     269           0 :     using compute_items_on_target =
     270             :         ::ah::compute_items_on_target<volume_dim, Frame>;
     271           0 :     using compute_target_points =
     272             :         intrp::TargetPoints::ApparentHorizon<Ah, Frame>;
     273           0 :     using post_interpolation_callbacks =
     274             :         tmpl::list<intrp::callbacks::FindApparentHorizon<Ah, Frame>>;
     275           0 :     using horizon_find_failure_callback =
     276             :         intrp::callbacks::IgnoreFailedApparentHorizon;
     277           0 :     using post_horizon_find_callbacks = tmpl::list<
     278             :         intrp::callbacks::ObserveSurfaceData<surface_tags_to_observe, Ah,
     279             :                                              Frame>,
     280             :         intrp::callbacks::ObserveTimeSeriesOnSurface<tags_to_observe, Ah>>;
     281           0 :     static std::string name() {
     282             :       return "ObservationAh" + ::domain::name(Horizon);
     283             :     }
     284             :   };
     285             : 
     286           0 :   using AhA = Ah<::domain::ObjectLabel::A, ::Frame::Distorted>;
     287           0 :   using AhB = Ah<::domain::ObjectLabel::B, ::Frame::Distorted>;
     288           0 :   using AhC = Ah<::domain::ObjectLabel::C, ::Frame::Inertial>;
     289             : 
     290             :   template <::domain::ObjectLabel Excision>
     291           0 :   struct ExcisionBoundary
     292             :       : tt::ConformsTo<intrp::protocols::InterpolationTargetTag> {
     293           0 :     using temporal_id = ::Tags::Time;
     294           0 :     using tags_to_observe =
     295             :         tmpl::list<gr::Tags::Lapse<DataVector>,
     296             :                    gr::Tags::Shift<DataVector, 3, Frame::Grid>>;
     297           0 :     using compute_vars_to_interpolate =
     298             :         ah::ComputeExcisionBoundaryVolumeQuantities;
     299           0 :     using vars_to_interpolate_to_target = tags_to_observe;
     300           0 :     using compute_items_on_source = tmpl::list<>;
     301           0 :     using compute_items_on_target = tmpl::list<>;
     302           0 :     using compute_target_points =
     303             :         intrp::TargetPoints::Sphere<ExcisionBoundary<Excision>, ::Frame::Grid>;
     304           0 :     using post_interpolation_callbacks =
     305             :         tmpl::list<intrp::callbacks::ObserveSurfaceData<
     306             :             tags_to_observe, ExcisionBoundary<Excision>, ::Frame::Grid>>;
     307             :     // run_callbacks
     308             :     template <typename metavariables>
     309           0 :     using interpolating_component = typename metavariables::gh_dg_element_array;
     310           0 :     static std::string name() {
     311             :       return "ObservationExcisionBoundary" + ::domain::name(Excision);
     312             :     }
     313             :   };
     314             : 
     315           0 :   using ExcisionBoundaryA = ExcisionBoundary<::domain::ObjectLabel::A>;
     316           0 :   using ExcisionBoundaryB = ExcisionBoundary<::domain::ObjectLabel::B>;
     317           0 :   using both_horizons = control_system::measurements::BothHorizons;
     318           0 :   using control_systems =
     319             :       tmpl::list<control_system::Systems::Rotation<3, both_horizons>,
     320             :                  control_system::Systems::Expansion<2, both_horizons>,
     321             :                  control_system::Systems::Shape<::domain::ObjectLabel::A, 2,
     322             :                                                 both_horizons>,
     323             :                  control_system::Systems::Shape<::domain::ObjectLabel::B, 2,
     324             :                                                 both_horizons>,
     325             :                  control_system::Systems::Size<::domain::ObjectLabel::A, 2>,
     326             :                  control_system::Systems::Size<::domain::ObjectLabel::B, 2>>;
     327             : 
     328           0 :   static constexpr bool use_control_systems =
     329             :       tmpl::size<control_systems>::value > 0;
     330             : 
     331           0 :   using interpolator_source_vars = ::ah::source_vars<volume_dim>;
     332           0 :   using source_vars_no_deriv =
     333             :       tmpl::list<gr::Tags::SpacetimeMetric<DataVector, volume_dim>,
     334             :                  gh::Tags::Pi<DataVector, volume_dim>,
     335             :                  gh::Tags::Phi<DataVector, volume_dim>>;
     336             : 
     337           0 :   using observe_fields = tmpl::append<
     338             :       tmpl::list<
     339             :           gr::Tags::SpacetimeMetric<DataVector, volume_dim>,
     340             :           gh::Tags::Pi<DataVector, volume_dim>,
     341             :           gh::Tags::Phi<DataVector, volume_dim>,
     342             :           gh::Tags::GaugeH<DataVector, volume_dim>,
     343             :           gh::Tags::SpacetimeDerivGaugeH<DataVector, volume_dim>,
     344             :           gr::Tags::Lapse<DataVector>, gr::Tags::Shift<DataVector, volume_dim>,
     345             :           gr::Tags::SpatialMetric<DataVector, volume_dim>,
     346             :           gr::Tags::DetSpatialMetric<DataVector>,
     347             :           gr::Tags::InverseSpatialMetric<DataVector, volume_dim>,
     348             :           gr::Tags::SqrtDetSpatialMetricCompute<DataVector, volume_dim,
     349             :                                                 ::Frame::Inertial>,
     350             :           gr::Tags::SpacetimeNormalOneFormCompute<DataVector, volume_dim,
     351             :                                                   ::Frame::Inertial>,
     352             :           gr::Tags::SpacetimeNormalVectorCompute<DataVector, volume_dim,
     353             :                                                  ::Frame::Inertial>,
     354             :           gr::Tags::InverseSpacetimeMetricCompute<DataVector, volume_dim,
     355             :                                                   ::Frame::Inertial>,
     356             :           gh::Tags::GaugeConstraintCompute<volume_dim, ::Frame::Inertial>,
     357             :           gh::Tags::TwoIndexConstraintCompute<volume_dim, ::Frame::Inertial>,
     358             :           gh::Tags::ThreeIndexConstraintCompute<volume_dim, ::Frame::Inertial>,
     359             :           gh::Tags::DerivSpatialMetricCompute<volume_dim, ::Frame::Inertial>,
     360             :           gr::Tags::SpatialChristoffelFirstKindCompute<DataVector, volume_dim,
     361             :                                                        ::Frame::Inertial>,
     362             :           gr::Tags::SpatialChristoffelSecondKindCompute<DataVector, volume_dim,
     363             :                                                         ::Frame::Inertial>,
     364             :           ::Tags::DerivTensorCompute<
     365             :               gr::Tags::SpatialChristoffelSecondKind<DataVector, volume_dim>,
     366             :               ::domain::Tags::InverseJacobian<volume_dim, Frame::ElementLogical,
     367             :                                               Frame::Inertial>,
     368             :               ::domain::Tags::Mesh<volume_dim>>,
     369             :           gr::Tags::SpatialRicciCompute<DataVector, volume_dim,
     370             :                                         ::Frame::Inertial>,
     371             :           gr::Tags::SpatialRicciScalarCompute<DataVector, volume_dim,
     372             :                                               ::Frame::Inertial>,
     373             :           // observe norms of tensors
     374             :           ::Tags::PointwiseL2NormCompute<
     375             :               gr::Tags::Shift<DataVector, volume_dim>>,
     376             :           ::Tags::PointwiseL2NormCompute<
     377             :               gr::Tags::SpatialMetric<DataVector, volume_dim>>,
     378             :           ::Tags::PointwiseL2NormCompute<
     379             :               gr::Tags::SpacetimeMetric<DataVector, volume_dim>>,
     380             :           ::Tags::PointwiseL2NormCompute<gh::Tags::Pi<DataVector, volume_dim>>,
     381             :           ::Tags::PointwiseL2NormCompute<gh::Tags::Phi<DataVector, volume_dim>>,
     382             :           ::Tags::PointwiseL2NormCompute<
     383             :               gh::Tags::GaugeH<DataVector, volume_dim>>,
     384             :           ::Tags::PointwiseL2NormCompute<
     385             :               gh::Tags::SpacetimeDerivGaugeH<DataVector, volume_dim>>,
     386             :           // following tags added to observe constraints
     387             :           ::Tags::PointwiseL2NormCompute<
     388             :               gh::Tags::GaugeConstraint<DataVector, volume_dim>>,
     389             :           ::Tags::PointwiseL2NormCompute<
     390             :               gh::Tags::TwoIndexConstraint<DataVector, volume_dim>>,
     391             :           ::Tags::PointwiseL2NormCompute<
     392             :               gh::Tags::ThreeIndexConstraint<DataVector, volume_dim>>,
     393             :           ::domain::Tags::Coordinates<volume_dim, Frame::Grid>,
     394             :           ::domain::Tags::Coordinates<volume_dim, Frame::Inertial>>,
     395             :       // The 4-index constraint is only implemented in 3d
     396             :       tmpl::conditional_t<
     397             :           volume_dim == 3,
     398             :           tmpl::list<
     399             :               gh::Tags::FourIndexConstraintCompute<3, ::Frame::Inertial>,
     400             :               gh::Tags::FConstraintCompute<3, ::Frame::Inertial>,
     401             :               ::Tags::PointwiseL2NormCompute<
     402             :                   gh::Tags::FConstraint<DataVector, 3>>,
     403             :               ::Tags::PointwiseL2NormCompute<
     404             :                   gh::Tags::FourIndexConstraint<DataVector, 3>>,
     405             :               gh::Tags::ConstraintEnergyCompute<3, ::Frame::Inertial>,
     406             :               gh::Tags::ExtrinsicCurvatureCompute<3, ::Frame::Inertial>,
     407             :               ::Tags::DerivTensorCompute<
     408             :                   gr::Tags::ExtrinsicCurvature<DataVector, 3>,
     409             :                   ::domain::Tags::InverseJacobian<
     410             :                       volume_dim, Frame::ElementLogical, Frame::Inertial>,
     411             :                   ::domain::Tags::Mesh<volume_dim>>,
     412             :               gr::Tags::WeylElectricCompute<DataVector, 3, Frame::Inertial>,
     413             :               gr::Tags::WeylElectricScalarCompute<DataVector, 3,
     414             :                                                   Frame::Inertial>,
     415             :               gr::Tags::WeylTypeD1Compute<DataVector, 3, Frame::Inertial>,
     416             :               gr::Tags::WeylTypeD1ScalarCompute<DataVector, 3, Frame::Inertial>,
     417             :               gr::Tags::Psi4RealCompute<Frame::Inertial>>,
     418             :           tmpl::list<>>>;
     419           0 :   using non_tensor_compute_tags = tmpl::list<
     420             :       ::Events::Tags::ObserverMeshCompute<volume_dim>,
     421             :       ::Events::Tags::ObserverCoordinatesCompute<volume_dim, Frame::Inertial>,
     422             :       ::Events::Tags::ObserverInverseJacobianCompute<
     423             :           volume_dim, Frame::ElementLogical, Frame::Inertial>,
     424             :       ::Events::Tags::ObserverJacobianCompute<volume_dim, Frame::ElementLogical,
     425             :                                               Frame::Inertial>,
     426             :       ::Events::Tags::ObserverDetInvJacobianCompute<Frame::ElementLogical,
     427             :                                                     Frame::Inertial>,
     428             :       ::Events::Tags::ObserverMeshVelocityCompute<volume_dim, Frame::Inertial>,
     429             :       gh::gauges::Tags::GaugeAndDerivativeCompute<volume_dim>>;
     430             : 
     431             :   struct factory_creation
     432             :       : tt::ConformsTo<Options::protocols::FactoryCreation> {
     433           0 :     using factory_classes = tmpl::map<
     434             :         tmpl::pair<
     435             :             amr::Criterion,
     436             :             tmpl::list<
     437             :                 amr::Criteria::DriveToTarget<volume_dim>,
     438             :                 amr::Criteria::Constraints<
     439             :                     volume_dim,
     440             :                     tmpl::list<gh::Tags::ThreeIndexConstraintCompute<
     441             :                         volume_dim, Frame::Inertial>>>,
     442             :                 amr::Criteria::TruncationError<
     443             :                     volume_dim, typename system::variables_tag::tags_list>>>,
     444             :         tmpl::pair<
     445             :             evolution::initial_data::InitialData,
     446             :             tmpl::flatten<tmpl::list<
     447             :                 gh::NumericInitialData,
     448             :                 tmpl::conditional_t<std::is_same_v<SpecInitialData, NoSuchType>,
     449             :                                     tmpl::list<>, SpecInitialData>>>>,
     450             :         tmpl::pair<DenseTrigger,
     451             :                    tmpl::flatten<tmpl::list<
     452             :                        control_system::control_system_triggers<control_systems>,
     453             :                        DenseTriggers::standard_dense_triggers>>>,
     454             :         tmpl::pair<
     455             :             DomainCreator<volume_dim>,
     456             :             tmpl::list<::domain::creators::BinaryCompactObject,
     457             :                        ::domain::creators::CylindricalBinaryCompactObject>>,
     458             :         tmpl::pair<
     459             :             Event,
     460             :             tmpl::flatten<tmpl::list<
     461             :                 intrp::Events::Interpolate<3, AhA, interpolator_source_vars>,
     462             :                 intrp::Events::Interpolate<3, AhB, interpolator_source_vars>,
     463             :                 intrp::Events::Interpolate<3, AhC, interpolator_source_vars>,
     464             :                 intrp::Events::InterpolateWithoutInterpComponent<
     465             :                     3, BondiSachs, source_vars_no_deriv>,
     466             :                 intrp::Events::InterpolateWithoutInterpComponent<
     467             :                     3, ExcisionBoundaryA, interpolator_source_vars>,
     468             :                 intrp::Events::InterpolateWithoutInterpComponent<
     469             :                     3, ExcisionBoundaryB, interpolator_source_vars>,
     470             :                 Events::MonitorMemory<3>, Events::Completion,
     471             :                 dg::Events::field_observations<volume_dim, observe_fields,
     472             :                                                non_tensor_compute_tags>,
     473             :                 control_system::metafunctions::control_system_events<
     474             :                     control_systems>,
     475             :                 Events::time_events<system>>>>,
     476             :         tmpl::pair<
     477             :             gh::BoundaryConditions::BoundaryCondition<volume_dim>,
     478             :             tmpl::list<
     479             :                 gh::BoundaryConditions::ConstraintPreservingBjorhus<volume_dim>,
     480             :                 gh::BoundaryConditions::DirichletMinkowski<volume_dim>,
     481             :                 gh::BoundaryConditions::DemandOutgoingCharSpeeds<volume_dim>>>,
     482             :         tmpl::pair<
     483             :             gh::gauges::GaugeCondition,
     484             :             tmpl::list<gh::gauges::DampedHarmonic, gh::gauges::Harmonic>>,
     485             :         tmpl::pair<LtsTimeStepper, TimeSteppers::lts_time_steppers>,
     486             :         tmpl::pair<PhaseChange, PhaseControl::factory_creatable_classes>,
     487             :         tmpl::pair<StepChooser<StepChooserUse::LtsStep>,
     488             :                    StepChoosers::standard_step_choosers<system>>,
     489             :         tmpl::pair<
     490             :             StepChooser<StepChooserUse::Slab>,
     491             :             StepChoosers::standard_slab_choosers<system, local_time_stepping>>,
     492             :         tmpl::pair<TimeSequence<double>,
     493             :                    TimeSequences::all_time_sequences<double>>,
     494             :         tmpl::pair<TimeSequence<std::uint64_t>,
     495             :                    TimeSequences::all_time_sequences<std::uint64_t>>,
     496             :         tmpl::pair<TimeStepper, TimeSteppers::time_steppers>,
     497             :         tmpl::pair<
     498             :             Trigger,
     499             :             tmpl::append<Triggers::logical_triggers, Triggers::time_triggers,
     500             :                          tmpl::list<Triggers::SeparationLessThan>>>>;
     501             :   };
     502             : 
     503             :   // A tmpl::list of tags to be added to the GlobalCache by the
     504             :   // metavariables
     505           0 :   using const_global_cache_tags =
     506             :       tmpl::list<gh::gauges::Tags::GaugeCondition,
     507             :                  gh::ConstraintDamping::Tags::DampingFunctionGamma0<
     508             :                      volume_dim, Frame::Grid>,
     509             :                  gh::ConstraintDamping::Tags::DampingFunctionGamma1<
     510             :                      volume_dim, Frame::Grid>,
     511             :                  gh::ConstraintDamping::Tags::DampingFunctionGamma2<
     512             :                      volume_dim, Frame::Grid>>;
     513             : 
     514           0 :   using dg_registration_list =
     515             :       tmpl::list<observers::Actions::RegisterEventsWithObservers,
     516             :                  intrp::Actions::RegisterElementWithInterpolator>;
     517             : 
     518           0 :   static constexpr auto default_phase_order =
     519             :       std::array{Parallel::Phase::Initialization,
     520             :                  Parallel::Phase::RegisterWithElementDataReader,
     521             :                  Parallel::Phase::ImportInitialData,
     522             :                  Parallel::Phase::InitializeInitialDataDependentQuantities,
     523             :                  Parallel::Phase::Register,
     524             :                  Parallel::Phase::InitializeTimeStepperHistory,
     525             :                  Parallel::Phase::CheckDomain,
     526             :                  Parallel::Phase::Evolve,
     527             :                  Parallel::Phase::Exit};
     528             : 
     529           0 :   using step_actions = tmpl::list<
     530             :       evolution::dg::Actions::ComputeTimeDerivative<
     531             :           volume_dim, system, AllStepChoosers, local_time_stepping>,
     532             :       tmpl::conditional_t<
     533             :           local_time_stepping,
     534             :           tmpl::list<evolution::Actions::RunEventsAndDenseTriggers<tmpl::list<
     535             :                          ::domain::CheckFunctionsOfTimeAreReadyPostprocessor,
     536             :                          evolution::dg::ApplyBoundaryCorrections<
     537             :                              local_time_stepping, system, volume_dim, true>>>,
     538             :                      evolution::dg::Actions::ApplyLtsBoundaryCorrections<
     539             :                          system, volume_dim, false>>,
     540             :           tmpl::list<
     541             :               evolution::dg::Actions::ApplyBoundaryCorrectionsToTimeDerivative<
     542             :                   system, volume_dim, false>,
     543             :               Actions::RecordTimeStepperData<system>,
     544             :               evolution::Actions::RunEventsAndDenseTriggers<tmpl::list<
     545             :                   ::domain::CheckFunctionsOfTimeAreReadyPostprocessor>>,
     546             :               control_system::Actions::LimitTimeStep<control_systems>,
     547             :               Actions::UpdateU<system>>>,
     548             :       dg::Actions::Filter<
     549             :           Filters::Exponential<0>,
     550             :           tmpl::list<gr::Tags::SpacetimeMetric<DataVector, volume_dim>,
     551             :                      gh::Tags::Pi<DataVector, volume_dim>,
     552             :                      gh::Tags::Phi<DataVector, volume_dim>>>>;
     553             : 
     554           0 :   using initialization_actions = tmpl::list<
     555             :       Initialization::Actions::InitializeItems<
     556             :           Initialization::TimeStepping<EvolutionMetavars, TimeStepperBase>,
     557             :           evolution::dg::Initialization::Domain<volume_dim,
     558             :                                                 use_control_systems>,
     559             :           ::amr::Initialization::Initialize<volume_dim>,
     560             :           Initialization::TimeStepperHistory<EvolutionMetavars>>,
     561             :       Initialization::Actions::NonconservativeSystem<system>,
     562             :       Initialization::Actions::AddComputeTags<tmpl::list<::Tags::DerivCompute<
     563             :           typename system::variables_tag, ::domain::Tags::Mesh<volume_dim>,
     564             :           ::domain::Tags::InverseJacobian<volume_dim, Frame::ElementLogical,
     565             :                                           Frame::Inertial>,
     566             :           typename system::gradient_variables>>>,
     567             :       gh::Actions::InitializeGhAnd3Plus1Variables<volume_dim>,
     568             :       Initialization::Actions::AddComputeTags<
     569             :           tmpl::push_back<StepChoosers::step_chooser_compute_tags<
     570             :               EvolutionMetavars, local_time_stepping>>>,
     571             :       ::evolution::dg::Initialization::Mortars<volume_dim, system>,
     572             :       intrp::Actions::ElementInitInterpPoints<
     573             :           intrp::Tags::InterpPointInfo<EvolutionMetavars>>,
     574             :       evolution::Actions::InitializeRunEventsAndDenseTriggers,
     575             :       control_system::Actions::InitializeMeasurements<control_systems>,
     576             :       Parallel::Actions::TerminatePhase>;
     577             : 
     578           0 :   using gh_dg_element_array = DgElementArray<
     579             :       EvolutionMetavars,
     580             :       tmpl::flatten<tmpl::list<
     581             :           Parallel::PhaseActions<Parallel::Phase::Initialization,
     582             :                                  initialization_actions>,
     583             :           Parallel::PhaseActions<
     584             :               Parallel::Phase::RegisterWithElementDataReader,
     585             :               tmpl::list<importers::Actions::RegisterWithElementDataReader,
     586             :                          Parallel::Actions::TerminatePhase>>,
     587             :           Parallel::PhaseActions<
     588             :               Parallel::Phase::ImportInitialData,
     589             :               tmpl::list<gh::Actions::SetInitialData,
     590             :                          gh::Actions::ReceiveNumericInitialData,
     591             :                          Parallel::Actions::TerminatePhase>>,
     592             :           Parallel::PhaseActions<
     593             :               Parallel::Phase::InitializeInitialDataDependentQuantities,
     594             :               initialize_initial_data_dependent_quantities_actions>,
     595             :           Parallel::PhaseActions<Parallel::Phase::Register,
     596             :                                  tmpl::list<dg_registration_list,
     597             :                                             Parallel::Actions::TerminatePhase>>,
     598             :           Parallel::PhaseActions<
     599             :               Parallel::Phase::InitializeTimeStepperHistory,
     600             :               SelfStart::self_start_procedure<step_actions, system>>,
     601             :           Parallel::PhaseActions<Parallel::Phase::CheckDomain,
     602             :                                  tmpl::list<::amr::Actions::SendAmrDiagnostics,
     603             :                                             Parallel::Actions::TerminatePhase>>,
     604             :           Parallel::PhaseActions<
     605             :               Parallel::Phase::Evolve,
     606             :               tmpl::list<::domain::Actions::CheckFunctionsOfTimeAreReady,
     607             :                          evolution::Actions::RunEventsAndTriggers,
     608             :                          Actions::ChangeSlabSize, step_actions,
     609             :                          Actions::AdvanceTime,
     610             :                          PhaseControl::Actions::ExecutePhaseChange>>>>>;
     611             : 
     612           0 :   struct BondiSachs : tt::ConformsTo<intrp::protocols::InterpolationTargetTag> {
     613           0 :     static std::string name() { return "BondiSachsInterpolation"; }
     614           0 :     using temporal_id = ::Tags::Time;
     615           0 :     using vars_to_interpolate_to_target = source_vars_no_deriv;
     616           0 :     using compute_target_points =
     617             :         intrp::TargetPoints::Sphere<BondiSachs, ::Frame::Inertial>;
     618           0 :     using post_interpolation_callbacks =
     619             :         tmpl::list<intrp::callbacks::DumpBondiSachsOnWorldtube<BondiSachs>>;
     620           0 :     using compute_items_on_target = tmpl::list<>;
     621             :     template <typename Metavariables>
     622           0 :     using interpolating_component = gh_dg_element_array;
     623             :   };
     624             : 
     625           0 :   using interpolation_target_tags = tmpl::push_back<
     626             :       control_system::metafunctions::interpolation_target_tags<control_systems>,
     627             :       AhA, AhB, AhC, BondiSachs, ExcisionBoundaryA, ExcisionBoundaryB>;
     628             : 
     629           0 :   using observed_reduction_data_tags = observers::collect_reduction_data_tags<
     630             :       tmpl::at<typename factory_creation::factory_classes, Event>>;
     631             : 
     632             :   struct registration
     633             :       : tt::ConformsTo<Parallel::protocols::RegistrationMetavariables> {
     634           0 :     using element_registrars =
     635             :         tmpl::map<tmpl::pair<gh_dg_element_array, dg_registration_list>>;
     636             :   };
     637             : 
     638           0 :   using control_components =
     639             :       control_system::control_components<EvolutionMetavars, control_systems>;
     640             : 
     641           0 :   static void run_deadlock_analysis_simple_actions(
     642             :       Parallel::GlobalCache<EvolutionMetavars>& cache,
     643             :       const std::vector<std::string>& deadlocked_components) {
     644             :     const auto& functions_of_time =
     645             :         Parallel::get<::domain::Tags::FunctionsOfTime>(cache);
     646             : 
     647             :     const std::string time_bounds =
     648             :         ::domain::FunctionsOfTime::ouput_time_bounds(functions_of_time);
     649             : 
     650             :     Parallel::printf("%s\n", time_bounds);
     651             : 
     652             :     if (alg::count(deadlocked_components,
     653             :                    pretty_type::name<gh_dg_element_array>()) == 1) {
     654             :       tmpl::for_each<control_components>([&cache](auto component_v) {
     655             :         using component = tmpl::type_from<decltype(component_v)>;
     656             :         Parallel::simple_action<
     657             :             control_system::Actions::PrintCurrentMeasurement>(
     658             :             Parallel::get_parallel_component<component>(cache));
     659             :       });
     660             : 
     661             :       Parallel::simple_action<deadlock::PrintElementInfo>(
     662             :           Parallel::get_parallel_component<gh_dg_element_array>(cache));
     663             :     }
     664             :   }
     665             : 
     666           0 :   struct amr : tt::ConformsTo<::amr::protocols::AmrMetavariables> {
     667           0 :     using element_array = gh_dg_element_array;
     668           0 :     using projectors = tmpl::list<
     669             :         Initialization::ProjectTimeStepping<volume_dim>,
     670             :         evolution::dg::Initialization::ProjectDomain<volume_dim>,
     671             :         Initialization::ProjectTimeStepperHistory<EvolutionMetavars>,
     672             :         ::amr::projectors::ProjectVariables<volume_dim,
     673             :                                             typename system::variables_tag>,
     674             :         evolution::dg::Initialization::ProjectMortars<EvolutionMetavars>,
     675             :         evolution::Actions::ProjectRunEventsAndDenseTriggers,
     676             :         ::amr::projectors::DefaultInitialize<
     677             :             Initialization::Tags::InitialTimeDelta,
     678             :             Initialization::Tags::InitialSlabSize<local_time_stepping>,
     679             :             ::domain::Tags::InitialExtents<volume_dim>,
     680             :             ::domain::Tags::InitialRefinementLevels<volume_dim>,
     681             :             evolution::dg::Tags::Quadrature,
     682             :             Tags::StepperError<typename system::variables_tag>,
     683             :             Tags::PreviousStepperError<typename system::variables_tag>,
     684             :             Tags::StepperErrorUpdated,
     685             :             SelfStart::Tags::InitialValue<typename system::variables_tag>,
     686             :             SelfStart::Tags::InitialValue<Tags::TimeStep>,
     687             :             SelfStart::Tags::InitialValue<Tags::Next<Tags::TimeStep>>>,
     688             :         ::amr::projectors::CopyFromCreatorOrLeaveAsIs<tmpl::push_back<
     689             :             typename control_system::Actions::InitializeMeasurements<
     690             :                 control_systems>::simple_tags,
     691             :             intrp::Tags::InterpPointInfo<EvolutionMetavars>>>>;
     692             :   };
     693             : 
     694           0 :   using component_list = tmpl::flatten<tmpl::list<
     695             :       ::amr::Component<EvolutionMetavars>,
     696             :       observers::Observer<EvolutionMetavars>,
     697             :       observers::ObserverWriter<EvolutionMetavars>,
     698             :       importers::ElementDataReader<EvolutionMetavars>,
     699             :       mem_monitor::MemoryMonitor<EvolutionMetavars>,
     700             :       intrp::Interpolator<EvolutionMetavars>,
     701             :       tmpl::transform<interpolation_target_tags,
     702             :                       tmpl::bind<intrp::InterpolationTarget,
     703             :                                  tmpl::pin<EvolutionMetavars>, tmpl::_1>>,
     704             :       control_system::control_components<EvolutionMetavars, control_systems>,
     705             :       gh_dg_element_array>>;
     706             : 
     707             :   static constexpr Options::String help{
     708             :       "Evolve a binary black hole using the Generalized Harmonic "
     709             :       "formulation\n"};
     710             : };

Generated by: LCOV version 1.14