SpECTRE  v2024.12.16
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Cce::MetricWorldtubeH5BufferUpdater< T > Class Template Reference

A WorldtubeBufferUpdater specialized to CCE input worldtube H5 files that have cartesian metric components stored in either modal or nodal form. More...

#include <WorldtubeBufferUpdater.hpp>

Public Member Functions

 MetricWorldtubeH5BufferUpdater (const std::string &cce_data_filename, std::optional< double > extraction_radius=std::nullopt, bool file_is_from_spec=true)
 The constructor takes the filename of the H5 file that will be used for boundary data. The extraction radius can either be passed in directly, or if it takes the value std::nullopt, then the extraction radius is retrieved as an integer in the filename. Also the user can specify if the H5 file was written by SpEC or not, because SpEC has some different conventions than we use here.
 
 WRAPPED_PUPable_decl_base_template (WorldtubeBufferUpdater< cce_metric_input_tags< T > >, MetricWorldtubeH5BufferUpdater)
 
 MetricWorldtubeH5BufferUpdater (CkMigrateMessage *)
 
double update_buffers_for_time (gsl::not_null< Variables< cce_metric_input_tags< T > > * > 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, bool time_varies_fastest=true) const override
 Update the buffers, time_span_start, and time_span_end with data (either Goldberg modal data or just nodal data depending on the template parameter to this class) and the start and end index in the member time_buffer_ covered by the newly updated buffers. More...
 
std::unique_ptr< WorldtubeBufferUpdater< cce_metric_input_tags< T > > > get_clone () const override
 
bool time_is_outside_range (double time) const override
 The time can only be supported in the buffer update if it is between the first and last time of the input file. More...
 
size_t get_l_max () const override
 retrieves the l_max of the input file More...
 
double get_extraction_radius () const override
 retrieves the extraction radius More...
 
DataVectorget_time_buffer () override
 The time buffer is supplied by non-const reference to allow views to easily point into the buffer. More...
 
bool has_version_history () const override
 
void pup (PUP::er &p) override
 Serialization for Charm++.
 
- Public Member Functions inherited from Cce::WorldtubeBufferUpdater< cce_metric_input_tags< T > >
 WRAPPED_PUPable_abstract (WorldtubeBufferUpdater)
 
virtual double update_buffers_for_time (gsl::not_null< Variables< cce_metric_input_tags< T > > * > 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, bool time_varies_fastest=true) const=0
 
virtual std::unique_ptr< WorldtubeBufferUpdaterget_clone () const=0
 
virtual bool time_is_outside_range (double time) const=0
 
virtual size_t get_l_max () const=0
 
virtual double get_extraction_radius () const=0
 
virtual bool has_version_history () const=0
 
virtual DataVectorget_time_buffer ()=0
 

Static Public Attributes

static constexpr bool is_modal = std::is_same_v<T, ComplexModalVector>
 

Additional Inherited Members

- Public Types inherited from Cce::WorldtubeBufferUpdater< cce_metric_input_tags< T > >
using creatable_classes = implementation defined
 

Detailed Description

template<typename T>
class Cce::MetricWorldtubeH5BufferUpdater< T >

A WorldtubeBufferUpdater specialized to CCE input worldtube H5 files that have cartesian metric components stored in either modal or nodal form.

Details

To read in modal data, template this class as MetricWorldtubeH5BufferUpdater<ComplexModalVector>. To read in nodal data, template the class as MetricWorldtubeH5BufferUpdater<DataVector>. This class also has the ability to read in data specifically written by SpEC.

Member Function Documentation

◆ get_clone()

◆ get_extraction_radius()

template<typename T >
double Cce::MetricWorldtubeH5BufferUpdater< T >::get_extraction_radius ( ) const
inlineoverridevirtual

retrieves the extraction radius

Implements Cce::WorldtubeBufferUpdater< cce_metric_input_tags< T > >.

◆ get_l_max()

template<typename T >
size_t Cce::MetricWorldtubeH5BufferUpdater< T >::get_l_max ( ) const
inlineoverridevirtual

retrieves the l_max of the input file

Implements Cce::WorldtubeBufferUpdater< cce_metric_input_tags< T > >.

◆ get_time_buffer()

template<typename T >
DataVector & Cce::MetricWorldtubeH5BufferUpdater< T >::get_time_buffer ( )
inlineoverridevirtual

The time buffer is supplied by non-const reference to allow views to easily point into the buffer.

Warning
Altering this buffer outside of the constructor of this class results in undefined behavior! This should be supplied by const reference once there is a convenient method of producing a const view of a vector type.

Implements Cce::WorldtubeBufferUpdater< cce_metric_input_tags< T > >.

◆ has_version_history()

template<typename T >
bool Cce::MetricWorldtubeH5BufferUpdater< T >::has_version_history ( ) const
inlineoverridevirtual

◆ time_is_outside_range()

template<typename T >
bool Cce::MetricWorldtubeH5BufferUpdater< T >::time_is_outside_range ( double  time) const
overridevirtual

The time can only be supported in the buffer update if it is between the first and last time of the input file.

Implements Cce::WorldtubeBufferUpdater< cce_metric_input_tags< T > >.

◆ update_buffers_for_time()

template<typename T >
double Cce::MetricWorldtubeH5BufferUpdater< T >::update_buffers_for_time ( gsl::not_null< Variables< cce_metric_input_tags< T > > * >  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,
bool  time_varies_fastest = true 
) const
overridevirtual

Update the buffers, time_span_start, and time_span_end with data (either Goldberg modal data or just nodal data depending on the template parameter to this class) and the start and end index in the member time_buffer_ covered by the newly updated buffers.

The function returns the next time at which a full update will occur. If called again at times earlier than the next full update time, it will leave the buffers unchanged and again return the next needed time.

Implements Cce::WorldtubeBufferUpdater< cce_metric_input_tags< T > >.


The documentation for this class was generated from the following file: