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/System.hpp"
18 #include "Evolution/Systems/Cce/Tags.hpp"
19 #include "Evolution/Systems/Cce/WorldtubeDataManager.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 #include "Utilities/Blas.hpp"
31 
32 struct EvolutionMetavars {
33  using system = Cce::System;
34 
35  using evolved_swsh_tag = Cce::Tags::BondiJ;
36  using evolved_swsh_dt_tag = Cce::Tags::BondiH;
37  using evolved_coordinates_variables_tag =
40  using cce_boundary_communication_tags =
43 
44  using cce_gauge_boundary_tags = tmpl::flatten<tmpl::list<
45  tmpl::transform<
50  tmpl::bind<Cce::Tags::EvolutionGaugeBoundaryValue, tmpl::_1>>,
57 
58  using scri_values_to_observe =
59  tmpl::list<Cce::Tags::News, Cce::Tags::ScriPlus<Cce::Tags::Strain>,
67 
68  using cce_scri_tags =
69  tmpl::list<Cce::Tags::News, Cce::Tags::ScriPlus<Cce::Tags::Strain>,
76  using cce_integrand_tags = tmpl::flatten<tmpl::transform<
79  tmpl::_1>>>;
80  using cce_integration_independent_tags =
81  tmpl::push_back<Cce::pre_computation_tags, Cce::Tags::DuRDividedByR>;
82  using cce_temporary_equations_tags = tmpl::remove_duplicates<tmpl::flatten<
83  tmpl::transform<cce_integrand_tags,
84  tmpl::bind<Cce::integrand_temporary_tags, tmpl::_1>>>>;
85  using cce_pre_swsh_derivatives_tags = Cce::all_pre_swsh_derivative_tags;
86  using cce_transform_buffer_tags = Cce::all_transform_buffer_tags;
87  using cce_swsh_derivative_tags = Cce::all_swsh_derivative_tags;
88  using cce_angular_coordinate_tags =
89  tmpl::list<Cce::Tags::CauchyAngularCoords>;
90 
91  using cce_boundary_component = Cce::H5WorldtubeBoundary<EvolutionMetavars>;
92 
93  using component_list =
94  tmpl::list<observers::ObserverWriter<EvolutionMetavars>,
95  cce_boundary_component,
97 
98  using observed_reduction_data_tags = tmpl::list<>;
99 
100  static constexpr Options::String help{
101  "Perform Cauchy Characteristic Extraction using .h5 input data.\n"
102  "Uses regularity-preserving formulation."};
103 
104  enum class Phase { Initialization, Evolve, Exit };
105 
106  static Phase determine_next_phase(
107  const Phase& current_phase,
108  const Parallel::CProxy_GlobalCache<
109  EvolutionMetavars>& /*cache_proxy*/) noexcept {
110  if (current_phase == Phase::Initialization) {
111  return Phase::Evolve;
112  } else {
113  return Phase::Exit;
114  }
115  }
116 };
117 
118 static const std::vector<void (*)()> charm_init_node_funcs{
119  &setup_error_handling, &disable_openblas_multithreading,
126  &Parallel::register_derived_classes_with_charm<Cce::WorldtubeDataManager>,
127  &Parallel::register_derived_classes_with_charm<TimeStepper>,
128  &Parallel::register_derived_classes_with_charm<intrp::SpanInterpolator>};
129 
130 static const std::vector<void (*)()> charm_init_proc_funcs{
FloatingPointExceptions.hpp
Cce::Tags::BondiH
::Tags::dt< BondiJ > BondiH
Bondi parameter .
Definition: Tags.hpp:63
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:108
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:30
Cce::Tags::BondiQ
Bondi parameter .
Definition: Tags.hpp:78
Cce::Tags::TimeIntegral
A prefix tag representing the time integral of the value it prefixes.
Definition: Tags.hpp:353
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
disable_openblas_multithreading
void disable_openblas_multithreading() noexcept
Disable OpenBLAS multithreading since it conflicts with Charm++ parallelism.
Definition: Blas.cpp:15
Cce::Tags::BondiUAtScri
The surface quantity of Bondi evaluated at the null spacetime boundary .
Definition: Tags.hpp:97
EvolutionMetavars
Definition: EvolveBurgers.hpp:92
Cce::Tags::BondiJ
Bondi parameter .
Definition: Tags.hpp:35
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:169
Cce::Tags::BondiR
The Bondi radius is of the worldtube.
Definition: Tags.hpp:306
Cce::Tags::BoundaryValue
A prefix tag representing the boundary data for a quantity on the extraction surface.
Definition: Tags.hpp:199
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:131
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::EthInertialRetardedTime
Represents , which is a useful quantity for asymptotic coordinate transformations.
Definition: Tags.hpp:175
Cce::Tags::BondiU
Bondi parameter .
Definition: Tags.hpp:90
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:29
Cce::Tags::GaugeD
The spin-weight 0 angular Jacobian factor.
Definition: Tags.hpp:142
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:553
Options::String
const char *const String
The string used in option structs.
Definition: Options.hpp:32
Cce::Tags::DuRDividedByR
The value , where is Bondi radius of the worldtube.
Definition: Tags.hpp:267
Parallel::register_derived_classes_with_charm
void register_derived_classes_with_charm() noexcept
Register derived classes of the Base class.
Definition: RegisterDerivedClassesWithCharm.hpp:31
Blas.hpp
Cce::WorldtubeBufferUpdater
Abstract base class for utilities that are able to perform the buffer updating procedure needed by th...
Definition: WorldtubeBufferUpdater.hpp:144
Cce::Tags::GaugeC
The spin-weight 2 angular Jacobian factor.
Definition: Tags.hpp:137
Cce::Tags::CauchyCartesianCoords
Definition: Tags.hpp:163
Cce::Tags::ScriPlus
A prefix tag representing the value at .
Definition: Tags.hpp:360
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:124
Cce::Tags::GaugeOmega
The conformal factor associated with an angular transformation.
Definition: Tags.hpp:147