18 #ifndef ELEMENT_DATA_CACHE_BASE_HH_
19 #define ELEMENT_DATA_CACHE_BASE_HH_
52 :
time_(-
std::numeric_limits<double>::infinity()),
67 bool is_actual(
double time, std::string field_name) {
74 virtual void read_ascii_data(Tokenizer &tok,
unsigned int n_components,
unsigned int i_row)=0;
79 virtual void read_binary_data(std::istream &data_stream,
unsigned int n_components,
unsigned int i_row)=0;
84 virtual void print_ascii(ostream &out_stream,
unsigned int idx) = 0;
94 virtual void print_binary_all(ostream &out_stream,
bool print_data_size =
true,
unsigned int start = 0) = 0;
100 virtual void print_yaml_subarray(ostream &out_stream,
unsigned int precision,
unsigned int begin,
unsigned int end) = 0;
314 for(
unsigned int i=0; i<
n_comp_;i++) out_stream << 0 <<
" ";
319 for(
unsigned int i=start; i<
n_comp_;i++) out_stream << 0 <<
" ";
#define ASSERT_PERMANENT(expr)
Allow use shorter versions of macro names if these names is not used with external library.
std::shared_ptr< ElementDataCacheBase > element_node_cache_optimize_size(std::vector< unsigned int > &) override
std::shared_ptr< ElementDataCacheBase > gather(Distribution *, LongIdx *) override
void read_ascii_data(Tokenizer &, unsigned int, unsigned int) override
void get_min_max_range(double &, double &) override
virtual ~DummyElementDataCache() override
void print_ascii_all(ostream &out_stream, unsigned int start=0) override
void print_ascii(ostream &out_stream, unsigned int) override
std::shared_ptr< ElementDataCacheBase > compute_node_data(std::vector< unsigned int > &, unsigned int) override
void print_binary_all(ostream &, bool, unsigned int) override
void read_binary_data(std::istream &, unsigned int, unsigned int) override
DummyElementDataCache(std::string field_name_in, unsigned int n_comp_in)
std::shared_ptr< ElementDataCacheBase > element_node_cache_fixed_size(std::vector< unsigned int > &) override
void print_yaml_subarray(ostream &, unsigned int, unsigned int, unsigned int) override
unsigned int get_boundary_begin() const
Returns start position of boundary data in cache.
virtual void read_ascii_data(Tokenizer &tok, unsigned int n_components, unsigned int i_row)=0
virtual void print_yaml_subarray(ostream &out_stream, unsigned int precision, unsigned int begin, unsigned int end)=0
virtual void print_ascii(ostream &out_stream, unsigned int idx)=0
std::string fe_type() const
ElementDataCacheBase()
Constructor.
virtual std::shared_ptr< ElementDataCacheBase > element_node_cache_fixed_size(std::vector< unsigned int > &offset_vec)=0
VTKValueType vtk_type_
Type of stored data.
virtual std::shared_ptr< ElementDataCacheBase > gather(Distribution *distr, LongIdx *local_to_global)=0
virtual std::shared_ptr< ElementDataCacheBase > compute_node_data(std::vector< unsigned int > &conn_vec, unsigned int data_size)=0
unsigned int n_comp() const
virtual void print_ascii_all(ostream &out_stream, unsigned int start=0)=0
void set_field_units(std::string unit_string)
virtual void read_binary_data(std::istream &data_stream, unsigned int n_components, unsigned int i_row)=0
void set_dof_handler_hash(std::size_t hash)
virtual std::shared_ptr< ElementDataCacheBase > element_node_cache_optimize_size(std::vector< unsigned int > &offset_vec)=0
unsigned int n_dofs_per_element() const
double time_
time step stored in cache
void set_n_values(unsigned int n_values)
virtual ~ElementDataCacheBase()
Destructor.
unsigned int n_dofs_per_element_
unsigned int boundary_begin_
Start position of boundary data in cache.
virtual void print_binary_all(ostream &out_stream, bool print_data_size=true, unsigned int start=0)=0
std::size_t dof_handler_hash() const
bool is_dummy_
Is true for DummyElementDataCache.
VTKValueType
Types of VTK value.
std::string field_input_name_
name of field stored in cache
bool is_actual(double time, std::string field_name)
Check if cache stored actual data.
std::string field_input_name()
Getter for quantity name of cache.
virtual void get_min_max_range(double &min, double &max)=0
unsigned int n_values() const
std::string field_units() const
double get_time()
Getter for time of cache.
std::size_t dof_handler_hash_
Hash of DOF handler (attribute of native VTK data)
VTKValueType vtk_type() const
Get type of stored data.
int LongIdx
Define type that represents indices of large arrays (elements, nodes, dofs etc.)
static constexpr bool value