18 #ifndef ELEMENT_DATA_CACHE_BASE_HH_ 19 #define ELEMENT_DATA_CACHE_BASE_HH_ 48 :
time_(-
std::numeric_limits<double>::infinity()),
63 bool is_actual(
double time, std::string field_name) {
70 virtual void read_ascii_data(Tokenizer &tok,
unsigned int n_components,
unsigned int i_row)=0;
75 virtual void read_binary_data(std::istream &data_stream,
unsigned int n_components,
unsigned int i_row)=0;
80 virtual void print_ascii(ostream &out_stream,
unsigned int idx) = 0;
90 virtual void print_binary_all(ostream &out_stream,
bool print_data_size =
true) = 0;
96 virtual void print_all_yaml(ostream &out_stream,
unsigned int precision) = 0;
153 ASSERT(
false).error(
"Unsupported VTK type");
double time_
time step stored in cache
VTKValueType vtk_type()
Get type of stored data.
virtual void print_ascii(ostream &out_stream, unsigned int idx)=0
std::string field_input_name()
Getter for quantity name of cache.
virtual void print_binary_all(ostream &out_stream, bool print_data_size=true)=0
virtual ~ElementDataCacheBase()
Destructor.
void set_n_values(unsigned int n_values)
double get_time()
Getter for time of cache.
#define ASSERT(expr)
Allow use shorter versions of macro names if these names is not used with external library...
static constexpr bool value
void set_field_units(std::string unit_string)
bool is_actual(double time, std::string field_name)
Check if cache stored actual data.
VTKValueType
Types of VTK value.
virtual void read_ascii_data(Tokenizer &tok, unsigned int n_components, unsigned int i_row)=0
NumCompValueType n_elem()
std::string field_units()
std::string field_input_name_
name of field stored in cache
virtual void get_min_max_range(double &min, double &max)=0
VTKValueType vtk_type_
Type of stored data.
ElementDataCacheBase()
Constructor.
virtual void print_ascii_all(ostream &out_stream)=0
virtual void read_binary_data(std::istream &data_stream, unsigned int n_components, unsigned int i_row)=0
virtual void print_all_yaml(ostream &out_stream, unsigned int precision)=0