12 #include "DataStructures/ComplexModalVector.hpp"
13 #include "DataStructures/DataBox/PrefixHelpers.hpp"
15 #include "DataStructures/DataBox/Tag.hpp"
16 #include "DataStructures/DataBox/TagName.hpp"
17 #include "DataStructures/DataVector.hpp"
19 #include "Evolution/Systems/Cce/Tags.hpp"
23 #include "NumericalAlgorithms/Spectral/SwshTags.hpp"
25 #include "Parallel/PupStlCpp17.hpp"
26 #include "PointwiseFunctions/GeneralRelativity/Tags.hpp"
30 #include "Utilities/TaggedTuple.hpp"
43 template <
typename Tag>
45 using type =
typename Tag::type;
51 template <
typename Tag>
63 template <
typename... T>
65 const T... indices) noexcept {
66 const auto add_index = [&base_name](
size_t index) noexcept {
67 ASSERT(index < 3,
"The character-arithmetic index must be less than 3.");
68 base_name +=
static_cast<char>(
'x' + index);
83 double time,
size_t pad,
size_t interpolator_length,
size_t lower_bound,
84 size_t upper_bound,
const DataVector& time_buffer) noexcept;
89 Tags::detail::SpatialMetric, Tags::detail::Dr<Tags::detail::SpatialMetric>,
92 Tags::detail::Lapse, Tags::detail::Dr<Tags::detail::Lapse>,
98 tmpl::list<Spectral::Swsh::Tags::SwshTransform<Tags::BondiBeta>,
144 template <
typename BufferTags>
147 using creatable_classes =
148 tmpl::list<MetricWorldtubeH5BufferUpdater, BondiWorldtubeH5BufferUpdater>;
152 virtual double update_buffers_for_time(
156 size_t computation_l_max,
size_t interpolator_length,
157 size_t buffer_depth)
const noexcept = 0;
162 virtual bool time_is_outside_range(
double time)
const noexcept = 0;
164 virtual size_t get_l_max()
const noexcept = 0;
166 virtual double get_extraction_radius()
const noexcept = 0;
168 virtual bool has_version_history()
const noexcept = 0;
170 virtual DataVector& get_time_buffer() noexcept = 0;
192 CkMigrateMessage* ) noexcept {}
204 size_t computation_l_max,
size_t interpolator_length,
205 size_t buffer_depth)
const noexcept
override;
208 const noexcept
override;
215 size_t get_l_max() const noexcept
override {
return l_max_; }
219 return extraction_radius_;
231 bool has_version_history() const noexcept
override {
232 return has_version_history_;
236 void pup(PUP::er& p) noexcept
override;
241 size_t time_span_start,
242 size_t time_span_end)
const noexcept;
244 bool has_version_history_ =
true;
251 tuples::tagged_tuple_from_typelist<
278 CkMigrateMessage* ) noexcept {}
287 size_t computation_l_max,
size_t interpolator_length,
288 size_t buffer_depth)
const noexcept
override;
291 const noexcept
override {
292 return std::make_unique<BondiWorldtubeH5BufferUpdater>(filename_);
298 return time < time_buffer_[0] or
299 time > time_buffer_[time_buffer_.size() - 1];
303 size_t get_l_max() const noexcept
override {
return l_max_; }
308 if (not
static_cast<bool>(extraction_radius_)) {
310 "Extraction radius has not been set, and was not successfully parsed "
311 "from the filename. The extraction radius has been used, so must be "
312 "set either by the input file or via the filename.");
314 return *extraction_radius_;
326 bool has_version_history() const noexcept
override {
331 void pup(PUP::er& p) noexcept
override;
336 size_t time_span_start,
size_t time_span_end,
337 bool is_real)
const noexcept;
345 tuples::tagged_tuple_from_typelist<
T read_data(const hid_t group_id, const std::string &dataset_name) noexcept
Read an array of rank 0-3 into an object.
Definition: Helpers.cpp:458
A WorldtubeBufferUpdater specialized to the CCE input worldtube H5 file produced by SpEC.
Definition: WorldtubeBufferUpdater.hpp:175
#define EXPAND_PACK_LEFT_TO_RIGHT(...)
Expand a parameter pack evaluating the terms from left to right.
Definition: TMPL.hpp:563
DataVector & get_time_buffer() noexcept override
The time buffer is supplied by non-const reference to allow views to easily point into the buffer.
Definition: WorldtubeBufferUpdater.hpp:324
Mark a struct as a prefix tag by inheriting from this.
Definition: Tag.hpp:103
Represents a multicolumn dat file inside an HDF5 file.
Definition: Dat.hpp:42
double get_extraction_radius() const noexcept override
retrieves the extraction radius. In most normal circumstances, this will not be needed for Bondi data...
Definition: WorldtubeBufferUpdater.hpp:307
bool time_is_outside_range(double time) const noexcept override
The time can only be supported in the buffer update if it is between the first and last time of the i...
Definition: WorldtubeBufferUpdater.cpp:213
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
#define ERROR(m)
prints an error message to the standard error stream and aborts the program.
Definition: Error.hpp:36
size_t get_l_max() const noexcept override
retrieves the l_max of the input file
Definition: WorldtubeBufferUpdater.hpp:215
DataVector & get_time_buffer() noexcept override
The time buffer is supplied by non-const reference to allow views to easily point into the buffer.
Definition: WorldtubeBufferUpdater.hpp:229
Stores a collection of function values.
Definition: DataVector.hpp:46
double update_buffers_for_time(gsl::not_null< Variables< cce_bondi_input_tags > * > buffers, gsl::not_null< size_t * > time_span_start, gsl::not_null< size_t * > time_span_end, double time, size_t computation_l_max, size_t interpolator_length, size_t buffer_depth) const noexcept override
update the buffers, time_span_start, and time_span_end with time-varies-fastest, Goldberg modal data ...
Definition: WorldtubeBufferUpdater.cpp:324
T signaling_NaN(T... args)
double get_extraction_radius() const noexcept override
retrieves the extraction radius
Definition: WorldtubeBufferUpdater.hpp:218
double update_buffers_for_time(gsl::not_null< Variables< cce_metric_input_tags > * > buffers, gsl::not_null< size_t * > time_span_start, gsl::not_null< size_t * > time_span_end, double time, size_t computation_l_max, size_t interpolator_length, size_t buffer_depth) const noexcept override
update the buffers, time_span_start, and time_span_end with time-varies-fastest, Goldberg modal data ...
Definition: WorldtubeBufferUpdater.cpp:134
tmpl::list< Tags::detail::SpatialMetric, Tags::detail::Dr< Tags::detail::SpatialMetric >, ::Tags::dt< Tags::detail::SpatialMetric >, Tags::detail::Shift, Tags::detail::Dr< Tags::detail::Shift >, ::Tags::dt< Tags::detail::Shift >, Tags::detail::Lapse, Tags::detail::Dr< Tags::detail::Lapse >, ::Tags::dt< Tags::detail::Lapse > > cce_metric_input_tags
the full set of tensors to be extracted from the worldtube h5 file
Definition: WorldtubeBufferUpdater.hpp:93
#define ASSERT(a, m)
Assert that an expression should be true.
Definition: Assert.hpp:49
The set of utilities for performing Cauchy characteristic evolution and Cauchy characteristic matchin...
Definition: CharacteristicExtractFwd.hpp:6
void pup(PUP::er &p) noexcept override
Serialization for Charm++.
Definition: WorldtubeBufferUpdater.cpp:218
size_t get_l_max() const noexcept override
retrieves the l_max of the input file
Definition: WorldtubeBufferUpdater.hpp:303
Abstract base class for utilities that are able to perform the buffer updating procedure needed by th...
Definition: WorldtubeBufferUpdater.hpp:145
void pup(PUP::er &p) noexcept override
Serialization for Charm++.
Definition: WorldtubeBufferUpdater.cpp:438
tmpl::list< Spectral::Swsh::Tags::SwshTransform< Tags::BondiBeta >, Spectral::Swsh::Tags::SwshTransform< Tags::BondiU >, Spectral::Swsh::Tags::SwshTransform< Tags::BondiQ >, Spectral::Swsh::Tags::SwshTransform< Tags::BondiW >, Spectral::Swsh::Tags::SwshTransform< Tags::BondiJ >, Spectral::Swsh::Tags::SwshTransform< Tags::Dr< Tags::BondiJ > >, Spectral::Swsh::Tags::SwshTransform< Tags::Du< Tags::BondiJ > >, Spectral::Swsh::Tags::SwshTransform< Tags::BondiR >, Spectral::Swsh::Tags::SwshTransform< Tags::Du< Tags::BondiR > >> cce_bondi_input_tags
the full set of tensors to be extracted from the reduced form of the worldtube h5 file
Definition: WorldtubeBufferUpdater.hpp:106
bool time_is_outside_range(const double time) const noexcept override
The time can only be supported in the buffer update if it is between the first and last time of the i...
Definition: WorldtubeBufferUpdater.hpp:297
Require a pointer to not be a nullptr
Definition: ReadSpecThirdOrderPiecewisePolynomial.hpp:13