CharacteristicExtract.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
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/Initialize/InitializeJ.hpp"
12 #include "Evolution/Systems/Cce/Initialize/InverseCubic.hpp"
13 #include "Evolution/Systems/Cce/Initialize/NoIncomingRadiation.hpp"
14 #include "Evolution/Systems/Cce/Initialize/ZeroNonSmooth.hpp"
15 #include "Evolution/Systems/Cce/IntegrandInputSteps.hpp"
16 #include "Evolution/Systems/Cce/OptionTags.hpp"
17 #include "Evolution/Systems/Cce/ReadBoundaryDataH5.hpp"
18 #include "Evolution/Systems/Cce/System.hpp"
19 #include "Evolution/Systems/Cce/Tags.hpp"
20 #include "IO/Observer/ObserverComponent.hpp"
21 #include "NumericalAlgorithms/Interpolation/BarycentricRationalSpanInterpolator.hpp"
22 #include "NumericalAlgorithms/Interpolation/CubicSpanInterpolator.hpp"
23 #include "NumericalAlgorithms/Interpolation/LinearSpanInterpolator.hpp"
24 #include "NumericalAlgorithms/Interpolation/SpanInterpolator.hpp"
25 #include "Options/Options.hpp"
26 #include "Parallel/InitializationFunctions.hpp"
28 #include "Time/Tags.hpp"
29 #include "Time/TimeSteppers/TimeStepper.hpp"
30 
31 struct EvolutionMetavars {
32  using system = Cce::System;
33 
34  using evolved_swsh_tag = Cce::Tags::BondiJ;
35  using evolved_swsh_dt_tag = Cce::Tags::BondiH;
36  using evolved_coordinates_variables_tag =
39  using cce_boundary_communication_tags =
42 
43  using cce_gauge_boundary_tags = tmpl::flatten<tmpl::list<
44  tmpl::transform<
49  tmpl::bind<Cce::Tags::EvolutionGaugeBoundaryValue, tmpl::_1>>,
56 
57  using scri_values_to_observe =
58  tmpl::list<Cce::Tags::News, Cce::Tags::ScriPlus<Cce::Tags::Strain>,
66 
67  using cce_scri_tags =
68  tmpl::list<Cce::Tags::News, Cce::Tags::ScriPlus<Cce::Tags::Strain>,
75  using cce_integrand_tags = tmpl::flatten<tmpl::transform<
78  tmpl::_1>>>;
79  using cce_integration_independent_tags =
80  tmpl::push_back<Cce::pre_computation_tags, Cce::Tags::DuRDividedByR>;
81  using cce_temporary_equations_tags = tmpl::remove_duplicates<tmpl::flatten<
82  tmpl::transform<cce_integrand_tags,
83  tmpl::bind<Cce::integrand_temporary_tags, tmpl::_1>>>>;
84  using cce_pre_swsh_derivatives_tags = Cce::all_pre_swsh_derivative_tags;
85  using cce_transform_buffer_tags = Cce::all_transform_buffer_tags;
86  using cce_swsh_derivative_tags = Cce::all_swsh_derivative_tags;
87  using cce_angular_coordinate_tags =
88  tmpl::list<Cce::Tags::CauchyAngularCoords>;
89 
90  using cce_boundary_component = Cce::H5WorldtubeBoundary<EvolutionMetavars>;
91 
92  using component_list =
93  tmpl::list<observers::ObserverWriter<EvolutionMetavars>,
94  cce_boundary_component,
96 
97  using observed_reduction_data_tags = tmpl::list<>;
98 
99  static constexpr OptionString help{
100  "Perform Cauchy Characteristic Extraction using .h5 input data.\n"
101  "Uses regularity-preserving formulation."};
102 
103  enum class Phase { Initialization, Evolve, Exit };
104 
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 };
116 
117 static const std::vector<void (*)()> charm_init_node_funcs{
118  &setup_error_handling,
123  &Parallel::register_derived_classes_with_charm<Cce::WorldtubeBufferUpdater>,
124  &Parallel::register_derived_classes_with_charm<TimeStepper>,
125  &Parallel::register_derived_classes_with_charm<intrp::SpanInterpolator>};
126 
127 static const std::vector<void (*)()> charm_init_proc_funcs{
FloatingPointExceptions.hpp
Cce::Tags::BondiH
::Tags::dt< BondiJ > BondiH
Bondi parameter .
Definition: Tags.hpp:62
RegisterDerivedClassesWithCharm.hpp
Cce::all_swsh_derivative_tags
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
Cce::Tags::BondiW
Bondi parameter .
Definition: Tags.hpp:107
Cce::System
Definition: System.hpp:116
Options.hpp
Spectral::Swsh::Tags::Eth
Struct for labeling the spin-weighted derivative in tags.
Definition: SwshTags.hpp:30
std::vector
Cce::all_transform_buffer_tags
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
Tags::Variables
Definition: VariablesTag.hpp:21
Cce::Tags::BondiBeta
Bondi parameter .
Definition: Tags.hpp:29
Cce::Tags::BondiQ
Bondi parameter .
Definition: Tags.hpp:77
Cce::Tags::TimeIntegral
A prefix tag representing the time integral of the value it prefixes.
Definition: Tags.hpp:371
Cce::bondi_hypersurface_step_tags
tmpl::list< Tags::BondiBeta, Tags::BondiQ, Tags::BondiU, Tags::BondiW, Tags::BondiH > bondi_hypersurface_step_tags
Definition: IntegrandInputSteps.hpp:23
Spectral::Swsh::Tags::Derivative
Prefix tag representing the spin-weighted derivative of a spin-weighted scalar.
Definition: SwshTags.hpp:152
Cce::ReducedWorldtubeBufferUpdater
Definition: ReadBoundaryDataH5.hpp:258
Cce::Tags::BondiUAtScri
The surface quantity of Bondi evaluated at the null spacetime boundary .
Definition: Tags.hpp:96
EvolutionMetavars
Definition: EvolveBurgers.hpp:91
Cce::Tags::BondiJ
Bondi parameter .
Definition: Tags.hpp:34
Cce::all_boundary_swsh_derivative_tags_for_scri
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
enable_floating_point_exceptions
void enable_floating_point_exceptions()
Definition: FloatingPointExceptions.cpp:27
Cce::Tags::InertialRetardedTime
The asymptotically inertial retarded time in terms of the evolution time variable.
Definition: Tags.hpp:177
Cce::Tags::BondiR
The Bondi radius is of the worldtube.
Definition: Tags.hpp:329
Cce::Tags::BoundaryValue
A prefix tag representing the boundary data for a quantity on the extraction surface.
Definition: Tags.hpp:204
Cce::H5WorldtubeBoundary
Component that supplies CCE worldtube boundary data.
Definition: WorldtubeBoundary.hpp:39
Cce::Tags::Du
The derivative with respect to Bondi retarded time .
Definition: Tags.hpp:136
Cce::all_boundary_pre_swsh_derivative_tags_for_scri
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
Cce::Tags::BondiU
Bondi parameter .
Definition: Tags.hpp:89
Cce::InitializeJ::InitializeJ
Abstract base class for an initial hypersurface data generator for Cce.
Definition: InitializeJ.hpp:104
Cce::integrand_terms_to_compute_for_bondi_variable
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
Tags::dt
Prefix indicating a time derivative.
Definition: Prefixes.hpp:32
Cce::Tags::ScriPlusFactor
A prefix tag representing an additional correction factor necessary to compute the quantity at .
Definition: Tags.hpp:392
Cce::Tags::GaugeD
The spin-weight 0 angular Jacobian factor.
Definition: Tags.hpp:150
Cce::CharacteristicEvolution
The component for handling the CCE evolution and waveform output.
Definition: CharacteristicEvolution.hpp:91
Cce::Tags::characteristic_worldtube_boundary_tags
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
Cce::Tags::DuRDividedByR
The value , where is Bondi radius of the worldtube.
Definition: Tags.hpp:290
Parallel::register_derived_classes_with_charm
void register_derived_classes_with_charm() noexcept
Register derived classes of the Base class.
Definition: RegisterDerivedClassesWithCharm.hpp:31
OptionString
const char *const OptionString
The string used in option structs.
Definition: Options.hpp:30
Cce::Tags::GaugeC
The spin-weight 2 angular Jacobian factor.
Definition: Tags.hpp:145
Tags::Multiplies
A prefix tag representing the product of two other tags. Note that if non-spin-weighted types are nee...
Definition: Tags.hpp:86
Cce::Tags::CauchyCartesianCoords
Definition: Tags.hpp:171
Cce::Tags::ScriPlus
A prefix tag representing the value at .
Definition: Tags.hpp:381
Cce::all_pre_swsh_derivative_tags
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
Cce::Tags::Dr
The derivative with respect to Bondi .
Definition: Tags.hpp:126
Cce::Tags::GaugeOmega
The conformal factor associated with an angular transformation.
Definition: Tags.hpp:155