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