10 #include "DataStructures/DataBox/Tag.hpp"
11 #include "Evolution/Systems/Cce/Initialize/InitializeJ.hpp"
12 #include "Evolution/Systems/Cce/InterfaceManagers/GhInterfaceManager.hpp"
13 #include "Evolution/Systems/Cce/InterfaceManagers/GhInterpolationStrategies.hpp"
14 #include "Evolution/Systems/Cce/InterfaceManagers/GhLockstep.hpp"
15 #include "Evolution/Systems/Cce/WorldtubeDataManager.hpp"
16 #include "NumericalAlgorithms/Interpolation/SpanInterpolator.hpp"
17 #include "Options/Auto.hpp"
22 namespace OptionTags {
27 "Options for the Cce evolution system"};
32 static constexpr
Options::String help = {
"Options for the filtering in Cce"};
39 "Maximum l value for spin-weighted spherical harmonics"};
45 static constexpr
Options::String help{
"l mode cutoff for angular filtering"};
52 "alpha parameter in exponential radial filter"};
59 "Half-power of the exponential radial filter argument"};
65 static constexpr
Options::String help{
"Maximum l value for swsh output"};
72 "Number of radial grid points in the spherical domain"};
78 static constexpr
Options::String help{
"Extraction radius of the CCE system."};
83 static std::string name() noexcept {
return "ExtractionRadius"; }
87 "Extraction radius of the CCE system for a standalone run. This may be "
88 "set to \"Auto\" to infer the radius from the filename (often used for "
89 "SpEC worldtube data). This option is unused if `H5IsBondiData` is "
90 "`true`, and should be \"Auto\" for such runs."};
96 static constexpr
Options::String help{
"End time for the Cce Evolution."};
97 static type suggested_value() noexcept {
return {}; }
104 "Cce Start time (default to earliest possible time)."};
105 static type suggested_value() noexcept {
return {}; }
112 "Target time step size for Cce Evolution"};
119 "H5 file to read the wordltube data from."};
126 "Number of times steps from the h5 to cache each read."};
127 static size_t suggested_value() noexcept {
return 200; }
134 "The interpolator for imported h5 worldtube data."};
141 "true for boundary data in Bondi form, false for metric data. Metric "
142 "data is more readily available from Cauchy simulations, so historically "
143 "has been the typical format provided by SpEC simulations. Bondi data is "
144 "much more efficient for storage size and performance, but both must be "
145 "supported for compatibility with current CCE data sources."};
152 "Set to true if corrections for SpEC data impurities should be applied "
153 "automatically based on the `VersionHist.ver` data set in the H5. "
154 "Typically, this should be set to true if the metric data is created "
155 "from SpEC, and false otherwise."};
162 "Class to manage worldtube data from a GH system."};
167 static std::string name() noexcept {
return "ScriInterpOrder"; }
170 "Order of time interpolation at scri+."};
171 static size_t suggested_value() noexcept {
return 5; }
178 "Number of scri output points per timestep."};
179 static size_t suggested_value() noexcept {
return 1; }
186 "The initialization for the first hypersurface for J"};
192 namespace InitializationTags {
195 using option_tags = tmpl::list<OptionTags::ScriInterpolationOrder>;
197 static constexpr
bool pass_metavariables =
false;
198 static size_t create_from_options(
199 const size_t scri_plus_interpolation_order) noexcept {
200 return scri_plus_interpolation_order;
206 using option_tags = tmpl::list<OptionTags::TargetStepSize>;
208 static constexpr
bool pass_metavariables =
false;
209 static double create_from_options(
const double target_step_size) noexcept {
210 return target_step_size;
216 using option_tags = tmpl::list<OptionTags::ExtractionRadius>;
218 static constexpr
bool pass_metavariables =
false;
219 static double create_from_options(
const double extraction_radius) noexcept {
220 return extraction_radius;
226 using option_tags = tmpl::list<OptionTags::ScriOutputDensity>;
228 static constexpr
bool pass_metavariables =
false;
229 static size_t create_from_options(
const size_t scri_output_density) noexcept {
230 return scri_output_density;
245 static constexpr
bool pass_metavariables =
false;
246 static type create_from_options(
248 const size_t number_of_lookahead_times,
250 const bool h5_is_bondi_data,
const bool fix_spec_normalization,
252 if (h5_is_bondi_data) {
253 if (
static_cast<bool>(extraction_radius)) {
255 "Warning: Option ExtractionRadius is set to a specific value and "
256 "H5IsBondiData is set to `true` -- the ExtractionRadius will not "
257 "be used, because all radius information is specified in the input "
258 "file for the Bondi worldtube data format. It is recommended to "
259 "set `ExtractionRadius` to `\"Auto\"` to make the input file "
262 return std::make_unique<BondiWorldtubeDataManager>(
263 std::make_unique<BondiWorldtubeH5BufferUpdater>(filename,
265 l_max, number_of_lookahead_times, interpolator->get_clone());
267 return std::make_unique<MetricWorldtubeDataManager>(
268 std::make_unique<MetricWorldtubeH5BufferUpdater>(filename,
270 l_max, number_of_lookahead_times, interpolator->get_clone(),
271 fix_spec_normalization);
278 using option_tags = tmpl::list<OptionTags::LMax>;
280 static constexpr
bool pass_metavariables =
false;
281 static size_t create_from_options(
const size_t l_max) noexcept {
289 using option_tags = tmpl::list<OptionTags::NumberOfRadialPoints>;
291 static constexpr
bool pass_metavariables =
false;
292 static size_t create_from_options(
293 const size_t number_of_radial_points) noexcept {
294 return number_of_radial_points;
300 using option_tags = tmpl::list<OptionTags::ObservationLMax>;
302 static constexpr
bool pass_metavariables =
false;
303 static size_t create_from_options(
const size_t observation_l_max) noexcept {
304 return observation_l_max;
310 using option_tags = tmpl::list<OptionTags::FilterLMax>;
312 static constexpr
bool pass_metavariables =
false;
313 static size_t create_from_options(
const size_t filter_l_max) noexcept {
320 using option_tags = tmpl::list<OptionTags::RadialFilterAlpha>;
322 static constexpr
bool pass_metavariables =
false;
323 static double create_from_options(
const double radial_filter_alpha) noexcept {
324 return radial_filter_alpha;
330 using option_tags = tmpl::list<OptionTags::RadialFilterHalfPower>;
332 static constexpr
bool pass_metavariables =
false;
333 static size_t create_from_options(
334 const size_t radial_filter_half_power) noexcept {
335 return radial_filter_half_power;
352 static constexpr
bool pass_metavariables =
false;
355 const bool is_bondi_data) noexcept {
361 const auto& time_buffer = h5_boundary_updater.get_time_buffer();
362 return time_buffer[0];
365 const auto& time_buffer = h5_boundary_updater.get_time_buffer();
366 return time_buffer[0];
375 using option_tags = tmpl::list<OptionTags::StartTime>;
377 static constexpr
bool pass_metavariables =
false;
378 static double create_from_options(
const double start_time) noexcept {
396 static constexpr
bool pass_metavariables =
false;
399 const bool is_bondi_data) {
405 const auto& time_buffer = h5_boundary_updater.get_time_buffer();
406 return time_buffer[time_buffer.size() - 1];
409 const auto& time_buffer = h5_boundary_updater.get_time_buffer();
410 return time_buffer[time_buffer.size() - 1];
419 using option_tags = tmpl::list<>;
421 static constexpr
bool pass_metavariables =
false;
422 static double create_from_options() noexcept {
431 using option_tags = tmpl::list<OptionTags::EndTime>;
433 static constexpr
bool pass_metavariables =
false;
434 static double create_from_options(
const double end_time) noexcept {
441 using option_tags = tmpl::list<OptionTags::GhInterfaceManager>;
443 static constexpr
bool pass_metavariables =
false;
447 interface_manager) noexcept {
448 return interface_manager->get_clone();
466 using option_tags = tmpl::list<OptionTags::GhInterfaceManager>;
468 static constexpr
bool pass_metavariables =
false;
472 interface_manager) noexcept {
473 return interface_manager->get_interpolation_strategy();
479 using option_tags = tmpl::list<OptionTags::InitializeJ>;
481 static constexpr
bool pass_metavariables =
false;
484 initialize_j) noexcept {
485 return initialize_j->get_clone();
A WorldtubeBufferUpdater specialized to the CCE input worldtube H5 file produced by SpEC.
Definition: WorldtubeBufferUpdater.hpp:175
void printf(const std::string &format, Args &&... args)
Print an atomic message to stdout with C printf usage.
Definition: Printf.hpp:103
Mark a struct as a simple tag by inheriting from this.
Definition: Tag.hpp:36
A WorldtubeBufferUpdater specialized to the CCE input worldtube H5 file produced by the reduced SpEC ...
Definition: WorldtubeBufferUpdater.hpp:261
A class indicating that a parsed value can be automatically computed instead of specified.
Definition: Auto.hpp:32
The set of utilities for performing Cauchy characteristic evolution and Cauchy characteristic matchin...
Definition: BoundaryComputeAndSendToEvolution.hpp:28
const char *const String
The string used in option structs.
Definition: Options.hpp:32
InterpolationStrategy
Enumeration of possibilities for the collection of worldtube data that will be collected by the inter...
Definition: GhInterpolationStrategies.hpp:31