18 #ifndef ELEMENT_DATA_CACHE_HH_ 19 #define ELEMENT_DATA_CACHE_HH_ 65 ElementDataCache(std::string field_name,
unsigned int n_rows,
unsigned int n_cols,
unsigned int size);
78 static CacheData
create_data_cache(
unsigned int size_of_cache,
unsigned int row_vec_size);
81 void read_ascii_data(Tokenizer &tok,
unsigned int n_components,
unsigned int i_row)
override;
84 void read_binary_data(std::istream &data_stream,
unsigned int n_components,
unsigned int i_row)
override;
92 void print_ascii(ostream &out_stream,
unsigned int idx)
override;
106 void print_binary_all(ostream &out_stream,
bool print_data_size =
true)
override;
108 void print_all_yaml(ostream &out_stream,
unsigned int precision)
override;
118 void add(
unsigned int idx,
const T *
value);
123 void zero(
unsigned int idx);
128 void normalize(
unsigned int idx,
unsigned int divisor);
146 DECLARE_EXCEPTION(ExcOutputVariableVector, <<
"Can not output field " << EI_FieldName::qval
147 <<
" returning variable size vectors. Try convert to MultiField.\n");
void read_binary_data(std::istream &data_stream, unsigned int n_components, unsigned int i_row) override
Implements ElementDataCacheBase::read_binary_data.
std::shared_ptr< std::vector< T > > ComponentDataPtr
void print_ascii(ostream &out_stream, unsigned int idx) override
TYPEDEF_ERR_INFO(EI_FieldName, std::string)
std::vector< ComponentDataPtr > CacheData
void store_value(unsigned int idx, const T *value)
T & operator[](unsigned int i)
Access i-th element in the data vector of 0th component.
void read_ascii_data(Tokenizer &tok, unsigned int n_components, unsigned int i_row) override
Implements ElementDataCacheBase::read_ascii_data.
static constexpr bool value
ElementDataCache()
Default constructor.
void get_min_max_range(double &min, double &max) override
void add(unsigned int idx, const T *value)
Global macros to enhance readability and debugging, general constants.
virtual ~ElementDataCache() override
Destructor of ElementDataCache.
static CacheData create_data_cache(unsigned int size_of_cache, unsigned int row_vec_size)
void zero(unsigned int idx)
DECLARE_EXCEPTION(ExcOutputVariableVector,<< "Can not output field "<< EI_FieldName::qval<< " returning variable size vectors. Try convert to MultiField.\n")
void print_all_yaml(ostream &out_stream, unsigned int precision) override
void normalize(unsigned int idx, unsigned int divisor)
void print_binary_all(ostream &out_stream, bool print_data_size=true) override
Print all data stored in output data to appended binary format.
ComponentDataPtr get_component_data(unsigned int component_idx)
Return vector of element data for get component.
void print_ascii_all(ostream &out_stream) override
Print all data stored in output data ro ascii format.