1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
4 #pragma once
6 #include "AlgorithmSingleton.hpp"
8 #include "Evolution/Systems/Cce/BoundaryData.hpp"
9 #include "Evolution/Systems/Cce/Components/CharacteristicEvolution.hpp"
10 #include "Evolution/Systems/Cce/Components/WorldtubeBoundary.hpp"
11 #include "Evolution/Systems/Cce/InitializeCce.hpp"
12 #include "Evolution/Systems/Cce/IntegrandInputSteps.hpp"
13 #include "Evolution/Systems/Cce/OptionTags.hpp"
14 #include "Evolution/Systems/Cce/ReadBoundaryDataH5.hpp"
15 #include "Evolution/Systems/Cce/System.hpp"
16 #include "Evolution/Systems/Cce/Tags.hpp"
17 #include "IO/Observer/ObserverComponent.hpp"
18 #include "NumericalAlgorithms/Interpolation/BarycentricRationalSpanInterpolator.hpp"
19 #include "NumericalAlgorithms/Interpolation/CubicSpanInterpolator.hpp"
20 #include "NumericalAlgorithms/Interpolation/LinearSpanInterpolator.hpp"
21 #include "NumericalAlgorithms/Interpolation/SpanInterpolator.hpp"
22 #include "Options/Options.hpp"
23 #include "Parallel/InitializationFunctions.hpp"
25 #include "Time/Tags.hpp"
26 #include "Time/TimeSteppers/TimeStepper.hpp"
28 struct EvolutionMetavars {
29  using system = Cce::System;
31  using evolved_swsh_tag = Cce::Tags::BondiJ;
32  using evolved_swsh_dt_tag = Cce::Tags::BondiH;
33  using evolved_coordinates_variables_tag =
36  using cce_boundary_communication_tags =
40  using cce_gauge_boundary_tags = tmpl::flatten<tmpl::list<
41  tmpl::transform<
46  tmpl::bind<Cce::Tags::EvolutionGaugeBoundaryValue, tmpl::_1>>,
49  Spectral::Swsh::Tags::Derivative<Cce::Tags::GaugeOmega,
54  using scri_values_to_observe =
55  tmpl::list<Cce::Tags::News, Cce::Tags::ScriPlus<Cce::Tags::Strain>,
64  using cce_scri_tags =
65  tmpl::list<Cce::Tags::News, Cce::Tags::ScriPlus<Cce::Tags::Strain>,
66  Cce::Tags::ScriPlus<Cce::Tags::Psi0>,
67  Cce::Tags::ScriPlus<Cce::Tags::Psi1>,
68  Cce::Tags::ScriPlus<Cce::Tags::Psi2>,
69  Cce::Tags::ScriPlus<Cce::Tags::Psi3>,
71  Cce::Tags::ScriPlusFactor<Cce::Tags::Psi4>>;
72  using cce_integrand_tags = tmpl::flatten<tmpl::transform<
75  tmpl::_1>>>;
76  using cce_integration_independent_tags =
77  tmpl::push_back<Cce::pre_computation_tags, Cce::Tags::DuRDividedByR>;
78  using cce_temporary_equations_tags = tmpl::remove_duplicates<tmpl::flatten<
79  tmpl::transform<cce_integrand_tags,
80  tmpl::bind<Cce::integrand_temporary_tags, tmpl::_1>>>>;
81  using cce_pre_swsh_derivatives_tags = Cce::all_pre_swsh_derivative_tags;
82  using cce_transform_buffer_tags = Cce::all_transform_buffer_tags;
83  using cce_swsh_derivative_tags = Cce::all_swsh_derivative_tags;
84  using cce_angular_coordinate_tags =
85  tmpl::list<Cce::Tags::CauchyAngularCoords>;
87  using cce_boundary_component = Cce::H5WorldtubeBoundary<EvolutionMetavars>;
89  using cce_hypersurface_initialization =
92  using component_list =
93  tmpl::list<observers::ObserverWriter<EvolutionMetavars>,
94  cce_boundary_component,
97  using observed_reduction_data_tags = tmpl::list<>;
99  static constexpr OptionString help{
100  "Perform Cauchy Characteristic Extraction using .h5 input data.\n"
101  "Uses regularity-preserving formulation."};
103  enum class Phase { Initialization, Evolve, Exit };
105  static Phase determine_next_phase(
106  const Phase& current_phase,
107  const Parallel::CProxy_ConstGlobalCache<
108  EvolutionMetavars>& /*cache_proxy*/) noexcept {
109  if (current_phase == Phase::Initialization) {
110  return Phase::Evolve;
111  } else {
112  return Phase::Exit;
113  }
114  }
115 };
117 static const std::vector<void (*)()> charm_init_node_funcs{
118  &setup_error_handling,
121  &Parallel::register_derived_classes_with_charm<Cce::WorldtubeBufferUpdater>,
122  &Parallel::register_derived_classes_with_charm<TimeStepper>,
123  &Parallel::register_derived_classes_with_charm<intrp::SpanInterpolator>};
125 static const std::vector<void (*)()> charm_init_proc_funcs{
A prefix tag representing the product of two other tags. Note that if non-spin-weighted types are nee...
Definition: Tags.hpp:86
Functions for serializing factory-created classes.
Definition: VariablesTag.hpp:21
Bondi parameter .
Definition: Tags.hpp:77
The component for handling the CCE evolution and waveform output.
Definition: CharacteristicEvolution.hpp:91
Definition: ConservativeSystem.hpp:50
Bondi parameter .
Definition: Tags.hpp:29
The derivative with respect to Bondi .
Definition: Tags.hpp:126
Bondi parameter .
Definition: Tags.hpp:34
db::wrap_tags_in< BoundaryPrefix, tmpl::list< Tags::BondiBeta, Tags::BondiU, Tags::Dr< Tags::BondiU >, Tags::BondiQ, Tags::BondiW, Tags::BondiJ, Tags::Dr< Tags::BondiJ >, Tags::BondiH, Tags::Du< Tags::BondiJ >, Tags::BondiR, Tags::Du< Tags::BondiR >, Tags::DuRDividedByR > > characteristic_worldtube_boundary_tags
The collection of tags mutated by create_bondi_boundary_data
Definition: BoundaryData.hpp:545
The spin-weight 0 angular Jacobian factor.
Definition: Tags.hpp:150
The asymptotically inertial retarded time in terms of the evolution time variable.
Definition: Tags.hpp:177
typename detail::integrand_terms_to_compute_for_bondi_variable_impl< BondiVariable >::type integrand_terms_to_compute_for_bondi_variable
A struct for providing a tmpl::list of integrand tags that need to be computed before integration can...
Definition: Equations.hpp:93
Defines classes and functions for making classes creatable from input files.
A prefix tag representing an additional correction factor necessary to compute the quantity at ...
Definition: Tags.hpp:392
The Bondi radius is of the worldtube.
Definition: Tags.hpp:329
Prefix tag representing the spin-weighted derivative of a spin-weighted scalar.
Definition: SwshTags.hpp:140
A prefix tag representing the value at .
Definition: Tags.hpp:381
Prefix indicating a time derivative.
Definition: Prefixes.hpp:32
The value , where is Bondi radius of the worldtube.
Definition: Tags.hpp:290
const char *const OptionString
The string used in option structs.
Definition: Options.hpp:30
Definition: ReadBoundaryDataH5.hpp:258
The spin-weight 2 angular Jacobian factor.
Definition: Tags.hpp:145
Definition: System.hpp:116
Component that supplies CCE worldtube boundary data.
Definition: WorldtubeBoundary.hpp:39
Bondi parameter .
Definition: Tags.hpp:89
void register_derived_classes_with_charm() noexcept
Register derived classes of the Base class.
Definition: RegisterDerivedClassesWithCharm.hpp:31
Definition: EvolveBurgers.hpp:88
void enable_floating_point_exceptions()
After a call to this function, the code will terminate with a floating point exception on overflow...
Definition: FloatingPointExceptions.cpp:27
The surface quantity of Bondi evaluated at the null spacetime boundary .
Definition: Tags.hpp:96
Initialize on the first hypersurface from provided boundary values of , , and .
Definition: InitializeCce.hpp:36
tmpl::remove_duplicates< tmpl::flatten< tmpl::transform< all_swsh_derivative_tags, tmpl::bind< Spectral::Swsh::coefficient_buffer_tags_for_derivative_tag, tmpl::_1 > >> > all_transform_buffer_tags
A typelist for the full set of coefficient buffers needed to process all of the tags in all_swsh_deri...
Definition: IntegrandInputSteps.hpp:328
The conformal factor associated with an angular transformation.
Definition: Tags.hpp:155
tmpl::list< Tags::ComplexInertialRetardedTime > all_boundary_pre_swsh_derivative_tags_for_scri
Typelist of steps for PreSwshDerivatives mutations called on boundary (angular grid only) quantities ...
Definition: IntegrandInputSteps.hpp:278
tmpl::list< Tags::BondiBeta, Tags::BondiQ, Tags::BondiU, Tags::BondiW, Tags::BondiH > bondi_hypersurface_step_tags
Definition: IntegrandInputSteps.hpp:23
Struct for labeling the spin-weighted derivative in tags.
Definition: SwshTags.hpp:30
Functions to enable/disable termination on floating point exceptions.
A prefix tag representing the time integral of the value it prefixes.
Definition: Tags.hpp:371
::Tags::dt< BondiJ > BondiH
Bondi parameter .
Definition: Tags.hpp:62
The derivative with respect to Bondi retarded time .
Definition: Tags.hpp:136
tmpl::list< Spectral::Swsh::Tags::Derivative< Tags::ComplexInertialRetardedTime, Spectral::Swsh::Tags::EthEth > > all_boundary_swsh_derivative_tags_for_scri
Typelist of steps for SwshDerivatives mutations called on boundary (angular grid only) quantities nee...
Definition: IntegrandInputSteps.hpp:284
tmpl::remove_duplicates< tmpl::flatten< tmpl::list< tmpl::transform< bondi_hypersurface_step_tags, tmpl::bind< tmpl::list, single_swsh_derivative_tags_to_compute_for< tmpl::_1 >, second_swsh_derivative_tags_to_compute_for< tmpl::_1 > >>, all_swsh_derivative_tags_for_scri > >> all_swsh_derivative_tags
A typelist for the set of tags computed by spin-weighted differentiation using utilities from the Sws...
Definition: IntegrandInputSteps.hpp:309
A prefix tag representing the boundary data for a quantity on the extraction surface.
Definition: Tags.hpp:204
Definition: Tags.hpp:171
Bondi parameter .
Definition: Tags.hpp:107
tmpl::remove_duplicates< tmpl::flatten< tmpl::list< tmpl::transform< bondi_hypersurface_step_tags, tmpl::bind< tmpl::list, pre_swsh_derivative_tags_to_compute_for< tmpl::_1 >, detail::additional_pre_swsh_derivative_tags_for< tmpl::_1 > >>, all_pre_swsh_derivative_tags_for_scri > >> all_pre_swsh_derivative_tags
A typelist for the full set of tags needed as direct or indirect input to any ComputeBondiIntegrand t...
Definition: IntegrandInputSteps.hpp:371