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, StepChoosers::LimitIncrease,
60 : StepChoosers::ErrorControl<StepChooserUse::LtsStep,
61 : Tags::Variables<evolved_swsh_tags>,
62 : swsh_vars_selector>,
63 : StepChoosers::ErrorControl<StepChooserUse::LtsStep,
64 : evolved_coordinates_variables_tag,
65 : coord_vars_selector>>;
66 :
67 0 : using klein_gordon_pre_swsh_derivative_tags =
68 : tmpl::list<Cce::Tags::Dy<Cce::Tags::Dy<Cce::Tags::KleinGordonPsi>>,
69 : Cce::Tags::Dy<Cce::Tags::KleinGordonPsi>>;
70 :
71 0 : using klein_gordon_swsh_derivative_tags = tmpl::list<
72 : Spectral::Swsh::Tags::Derivative<Cce::Tags::KleinGordonPsi,
73 : Spectral::Swsh::Tags::Eth>,
74 : Spectral::Swsh::Tags::Derivative<Cce::Tags::KleinGordonPsi,
75 : Spectral::Swsh::Tags::Ethbar>,
76 : Spectral::Swsh::Tags::Derivative<Cce::Tags::Dy<Cce::Tags::KleinGordonPsi>,
77 : Spectral::Swsh::Tags::Eth>,
78 : Spectral::Swsh::Tags::Derivative<Cce::Tags::Dy<Cce::Tags::KleinGordonPsi>,
79 : Spectral::Swsh::Tags::Ethbar>,
80 : Spectral::Swsh::Tags::Derivative<Cce::Tags::KleinGordonPsi,
81 : Spectral::Swsh::Tags::EthEth>,
82 : Spectral::Swsh::Tags::Derivative<Cce::Tags::KleinGordonPsi,
83 : Spectral::Swsh::Tags::EthEthbar>>;
84 0 : using klein_gordon_transform_buffer_tags = tmpl::list<
85 : Spectral::Swsh::Tags::SwshTransform<Cce::Tags::KleinGordonPsi>,
86 : Spectral::Swsh::Tags::SwshTransform<
87 : Cce::Tags::Dy<Cce::Tags::KleinGordonPsi>>,
88 : Spectral::Swsh::Tags::SwshTransform<Spectral::Swsh::Tags::Derivative<
89 : Cce::Tags::KleinGordonPsi, Spectral::Swsh::Tags::Eth>>,
90 : Spectral::Swsh::Tags::SwshTransform<Spectral::Swsh::Tags::Derivative<
91 : Cce::Tags::KleinGordonPsi, Spectral::Swsh::Tags::Ethbar>>,
92 : Spectral::Swsh::Tags::SwshTransform<Spectral::Swsh::Tags::Derivative<
93 : Cce::Tags::Dy<Cce::Tags::KleinGordonPsi>, Spectral::Swsh::Tags::Eth>>,
94 : Spectral::Swsh::Tags::SwshTransform<Spectral::Swsh::Tags::Derivative<
95 : Cce::Tags::Dy<Cce::Tags::KleinGordonPsi>,
96 : Spectral::Swsh::Tags::Ethbar>>,
97 : Spectral::Swsh::Tags::SwshTransform<Spectral::Swsh::Tags::Derivative<
98 : Cce::Tags::KleinGordonPsi, Spectral::Swsh::Tags::EthEth>>,
99 : Spectral::Swsh::Tags::SwshTransform<Spectral::Swsh::Tags::Derivative<
100 : Cce::Tags::KleinGordonPsi, Spectral::Swsh::Tags::EthEthbar>>>;
101 :
102 0 : using klein_gordon_source_tags = tmpl::flatten<
103 : tmpl::transform<Cce::bondi_hypersurface_step_tags,
104 : tmpl::bind<Cce::Tags::KleinGordonSource, tmpl::_1>>>;
105 :
106 0 : using klein_gordon_cce_integrand_tags =
107 : tmpl::list<Cce::Tags::PoleOfIntegrand<Cce::Tags::KleinGordonPi>,
108 : Cce::Tags::RegularIntegrand<Cce::Tags::KleinGordonPi>>;
109 :
110 0 : using scri_values_to_observe =
111 : tmpl::append<cce_base::scri_values_to_observe,
112 : tmpl::list<Cce::Tags::ScriPlus<Cce::Tags::KleinGordonPsi>>>;
113 :
114 0 : using cce_scri_tags =
115 : tmpl::append<cce_base::cce_scri_tags,
116 : tmpl::list<Cce::Tags::ScriPlus<Cce::Tags::KleinGordonPsi>>>;
117 :
118 0 : using component_list =
119 : tmpl::list<observers::ObserverWriter<EvolutionMetavars>,
120 : cce_boundary_component,
121 : Cce::KleinGordonCharacteristicEvolution<EvolutionMetavars>>;
122 :
123 : struct factory_creation
124 : : tt::ConformsTo<Options::protocols::FactoryCreation> {
125 0 : using factory_classes = tmpl::map<
126 : tmpl::pair<LtsTimeStepper, TimeSteppers::lts_time_steppers>,
127 : tmpl::pair<StepChooser<StepChooserUse::LtsStep>, cce_step_choosers>,
128 : tmpl::pair<StepChooser<StepChooserUse::Slab>,
129 : StepChoosers::standard_slab_choosers<
130 : system, local_time_stepping, false>>,
131 : tmpl::pair<TimeSequence<double>,
132 : TimeSequences::all_time_sequences<double>>,
133 : tmpl::pair<TimeSequence<std::uint64_t>,
134 : TimeSequences::all_time_sequences<std::uint64_t>>,
135 : tmpl::pair<Event, tmpl::list<Cce::Events::ObserveFields,
136 : Cce::Events::ObserveTimeStep>>,
137 : tmpl::pair<Trigger, tmpl::append<Triggers::logical_triggers,
138 : Triggers::time_triggers>>>;
139 : };
140 :
141 0 : using observed_reduction_data_tags = tmpl::list<>;
142 :
143 : static constexpr Options::String help{
144 : "Perform Cauchy Characteristic Extraction for the Klein-Gordon system "
145 : "coupled with General Relativity, using .h5 input data."};
146 :
147 : static constexpr std::array<Parallel::Phase, 4> default_phase_order{
148 : {Parallel::Phase::Initialization,
149 : Parallel::Phase::InitializeTimeStepperHistory, Parallel::Phase::Evolve,
150 : Parallel::Phase::Exit}};
151 :
152 : // NOLINTNEXTLINE(google-runtime-references)
153 0 : void pup(PUP::er& /*p*/) {}
154 : };
|