Line data Source code
1 0 : // Distributed under the MIT License.
2 : // See LICENSE.txt for details.
3 :
4 : #pragma once
5 :
6 : #include "Evolution/Executables/Cce/CharacteristicExtractBase.hpp"
7 : #include "Evolution/Systems/Cce/AnalyticSolutions/BouncingBlackHole.hpp"
8 : #include "Evolution/Systems/Cce/AnalyticSolutions/GaugeWave.hpp"
9 : #include "Evolution/Systems/Cce/AnalyticSolutions/LinearizedBondiSachs.hpp"
10 : #include "Evolution/Systems/Cce/AnalyticSolutions/RobinsonTrautman.hpp"
11 : #include "Evolution/Systems/Cce/AnalyticSolutions/RotatingSchwarzschild.hpp"
12 : #include "Evolution/Systems/Cce/AnalyticSolutions/SphericalMetricData.hpp"
13 : #include "Evolution/Systems/Cce/AnalyticSolutions/TeukolskyWave.hpp"
14 : #include "Evolution/Systems/Cce/Components/KleinGordonCharacteristicEvolution.hpp"
15 : #include "Evolution/Systems/Cce/Events/ObserveFields.hpp"
16 : #include "Evolution/Systems/Cce/Events/ObserveTimeStep.hpp"
17 : #include "Evolution/Systems/Cce/Initialize/ConformalFactor.hpp"
18 : #include "IO/Observer/ObserverComponent.hpp"
19 : #include "Parallel/Algorithms/AlgorithmSingleton.hpp"
20 : #include "ParallelAlgorithms/Events/Factory.hpp"
21 : #include "ParallelAlgorithms/EventsAndTriggers/Event.hpp"
22 : #include "ParallelAlgorithms/EventsAndTriggers/EventsAndTriggers.hpp"
23 : #include "ParallelAlgorithms/EventsAndTriggers/LogicalTriggers.hpp"
24 : #include "ParallelAlgorithms/EventsAndTriggers/Trigger.hpp"
25 : #include "Time/StepChoosers/Constant.hpp"
26 : #include "Time/StepChoosers/ErrorControl.hpp"
27 : #include "Time/StepChoosers/LimitIncrease.hpp"
28 : #include "Time/StepChoosers/Maximum.hpp"
29 : #include "Time/TimeSteppers/Factory.hpp"
30 : #include "Time/Triggers/TimeTriggers.hpp"
31 :
32 : /// \cond
33 : namespace PUP {
34 : class er;
35 : } // namespace PUP
36 : /// \endcond
37 :
38 : template <template <typename> class BoundaryComponent>
39 : struct EvolutionMetavars : CharacteristicExtractDefaults<false> {
40 0 : using system = Cce::System<evolve_ccm>;
41 : static constexpr bool local_time_stepping = true;
42 0 : using cce_boundary_component = BoundaryComponent<EvolutionMetavars>;
43 0 : using cce_base = CharacteristicExtractDefaults<false>;
44 :
45 0 : using evolved_swsh_tags = tmpl::append<cce_base::evolved_swsh_tags,
46 : tmpl::list<Cce::Tags::KleinGordonPsi>>;
47 0 : using evolved_swsh_dt_tags =
48 : tmpl::append<cce_base::evolved_swsh_dt_tags,
49 : tmpl::list<Cce::Tags::KleinGordonPi>>;
50 :
51 0 : using klein_gordon_boundary_communication_tags =
52 : Cce::Tags::klein_gordon_worldtube_boundary_tags;
53 :
54 0 : using klein_gordon_gauge_boundary_tags = tmpl::list<
55 : Cce::Tags::EvolutionGaugeBoundaryValue<Cce::Tags::KleinGordonPsi>,
56 : Cce::Tags::EvolutionGaugeBoundaryValue<Cce::Tags::KleinGordonPi>>;
57 :
58 0 : using klein_gordon_scri_tags =
59 : tmpl::list<Cce::Tags::ScriPlus<Cce::Tags::KleinGordonPi>>;
60 :
61 0 : using cce_step_choosers =
62 : tmpl::list<StepChoosers::Constant, StepChoosers::LimitIncrease,
63 : StepChoosers::Maximum,
64 : StepChoosers::ErrorControl<StepChooserUse::LtsStep,
65 : Tags::Variables<evolved_swsh_tags>,
66 : swsh_vars_selector>,
67 : StepChoosers::ErrorControl<StepChooserUse::LtsStep,
68 : evolved_coordinates_variables_tag,
69 : coord_vars_selector>>;
70 :
71 0 : using klein_gordon_pre_swsh_derivative_tags =
72 : tmpl::list<Cce::Tags::Dy<Cce::Tags::Dy<Cce::Tags::KleinGordonPsi>>,
73 : Cce::Tags::Dy<Cce::Tags::KleinGordonPsi>>;
74 :
75 0 : using klein_gordon_swsh_derivative_tags = tmpl::list<
76 : Spectral::Swsh::Tags::Derivative<Cce::Tags::KleinGordonPsi,
77 : Spectral::Swsh::Tags::Eth>,
78 : Spectral::Swsh::Tags::Derivative<Cce::Tags::KleinGordonPsi,
79 : Spectral::Swsh::Tags::Ethbar>,
80 : Spectral::Swsh::Tags::Derivative<Cce::Tags::Dy<Cce::Tags::KleinGordonPsi>,
81 : Spectral::Swsh::Tags::Eth>,
82 : Spectral::Swsh::Tags::Derivative<Cce::Tags::Dy<Cce::Tags::KleinGordonPsi>,
83 : Spectral::Swsh::Tags::Ethbar>,
84 : Spectral::Swsh::Tags::Derivative<Cce::Tags::KleinGordonPsi,
85 : Spectral::Swsh::Tags::EthEth>,
86 : Spectral::Swsh::Tags::Derivative<Cce::Tags::KleinGordonPsi,
87 : Spectral::Swsh::Tags::EthEthbar>>;
88 0 : using klein_gordon_transform_buffer_tags = tmpl::list<
89 : Spectral::Swsh::Tags::SwshTransform<Cce::Tags::KleinGordonPsi>,
90 : Spectral::Swsh::Tags::SwshTransform<
91 : Cce::Tags::Dy<Cce::Tags::KleinGordonPsi>>,
92 : Spectral::Swsh::Tags::SwshTransform<Spectral::Swsh::Tags::Derivative<
93 : Cce::Tags::KleinGordonPsi, Spectral::Swsh::Tags::Eth>>,
94 : Spectral::Swsh::Tags::SwshTransform<Spectral::Swsh::Tags::Derivative<
95 : Cce::Tags::KleinGordonPsi, Spectral::Swsh::Tags::Ethbar>>,
96 : Spectral::Swsh::Tags::SwshTransform<Spectral::Swsh::Tags::Derivative<
97 : Cce::Tags::Dy<Cce::Tags::KleinGordonPsi>, Spectral::Swsh::Tags::Eth>>,
98 : Spectral::Swsh::Tags::SwshTransform<Spectral::Swsh::Tags::Derivative<
99 : Cce::Tags::Dy<Cce::Tags::KleinGordonPsi>,
100 : Spectral::Swsh::Tags::Ethbar>>,
101 : Spectral::Swsh::Tags::SwshTransform<Spectral::Swsh::Tags::Derivative<
102 : Cce::Tags::KleinGordonPsi, Spectral::Swsh::Tags::EthEth>>,
103 : Spectral::Swsh::Tags::SwshTransform<Spectral::Swsh::Tags::Derivative<
104 : Cce::Tags::KleinGordonPsi, Spectral::Swsh::Tags::EthEthbar>>>;
105 :
106 0 : using klein_gordon_source_tags = tmpl::flatten<
107 : tmpl::transform<Cce::bondi_hypersurface_step_tags,
108 : tmpl::bind<Cce::Tags::KleinGordonSource, tmpl::_1>>>;
109 :
110 0 : using klein_gordon_cce_integrand_tags =
111 : tmpl::list<Cce::Tags::PoleOfIntegrand<Cce::Tags::KleinGordonPi>,
112 : Cce::Tags::RegularIntegrand<Cce::Tags::KleinGordonPi>>;
113 :
114 0 : using scri_values_to_observe =
115 : tmpl::append<cce_base::scri_values_to_observe,
116 : tmpl::list<Cce::Tags::ScriPlus<Cce::Tags::KleinGordonPsi>>>;
117 :
118 0 : using cce_scri_tags =
119 : tmpl::append<cce_base::cce_scri_tags,
120 : tmpl::list<Cce::Tags::ScriPlus<Cce::Tags::KleinGordonPsi>>>;
121 :
122 0 : using component_list =
123 : tmpl::list<observers::ObserverWriter<EvolutionMetavars>,
124 : cce_boundary_component,
125 : Cce::KleinGordonCharacteristicEvolution<EvolutionMetavars>>;
126 :
127 : struct factory_creation
128 : : tt::ConformsTo<Options::protocols::FactoryCreation> {
129 0 : using factory_classes = tmpl::map<
130 : tmpl::pair<LtsTimeStepper, TimeSteppers::lts_time_steppers>,
131 : tmpl::pair<StepChooser<StepChooserUse::LtsStep>, cce_step_choosers>,
132 : tmpl::pair<StepChooser<StepChooserUse::Slab>, cce_slab_choosers>,
133 : tmpl::pair<TimeSequence<double>,
134 : TimeSequences::all_time_sequences<double>>,
135 : tmpl::pair<TimeSequence<std::uint64_t>,
136 : TimeSequences::all_time_sequences<std::uint64_t>>,
137 : tmpl::pair<Event, tmpl::list<Cce::Events::ObserveFields,
138 : Cce::Events::ObserveTimeStep>>,
139 : tmpl::pair<Trigger, tmpl::append<Triggers::logical_triggers,
140 : Triggers::time_triggers>>>;
141 : };
142 :
143 0 : using observed_reduction_data_tags = tmpl::list<>;
144 :
145 : static constexpr Options::String help{
146 : "Perform Cauchy Characteristic Extraction for the Klein-Gordon system "
147 : "coupled with General Relativity, using .h5 input data."};
148 :
149 : static constexpr std::array<Parallel::Phase, 4> default_phase_order{
150 : {Parallel::Phase::Initialization,
151 : Parallel::Phase::InitializeTimeStepperHistory, Parallel::Phase::Evolve,
152 : Parallel::Phase::Exit}};
153 :
154 : // NOLINTNEXTLINE(google-runtime-references)
155 0 : void pup(PUP::er& /*p*/) {}
156 : };
|