Flow123d  release_2.2.0-914-gf1a3a4f
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ElementDataCacheBase Class Referenceabstract

#include <element_data_cache_base.hh>

Inheritance diagram for ElementDataCacheBase:
Inheritance graph
[legend]
Collaboration diagram for ElementDataCacheBase:
Collaboration graph
[legend]

Public Types

enum  NumCompValueType { N_SCALAR = 1, N_VECTOR = 3, N_TENSOR = 9 }
 
enum  VTKValueType {
  VTK_INT8, VTK_UINT8, VTK_INT16, VTK_UINT16,
  VTK_INT32, VTK_UINT32, VTK_FLOAT32, VTK_FLOAT64
}
 Types of VTK value. More...
 

Public Member Functions

 ElementDataCacheBase ()
 Constructor. More...
 
virtual ~ElementDataCacheBase ()
 Destructor. More...
 
double get_time ()
 Getter for time of cache. More...
 
std::string field_input_name ()
 Getter for quantity name of cache. More...
 
bool is_actual (double time, std::string field_name)
 Check if cache stored actual data. More...
 
virtual void read_ascii_data (Tokenizer &tok, unsigned int n_components, unsigned int i_row)=0
 
virtual void read_binary_data (std::istream &data_stream, unsigned int n_components, unsigned int i_row)=0
 
virtual void print_ascii (ostream &out_stream, unsigned int idx)=0
 
virtual void print_ascii_all (ostream &out_stream)=0
 
virtual void print_binary_all (ostream &out_stream, bool print_data_size=true)=0
 
virtual void print_all_yaml (ostream &out_stream, unsigned int precision)=0
 
virtual void get_min_max_range (double &min, double &max)=0
 
void set_field_units (std::string unit_string)
 
void set_n_values (unsigned int n_values)
 
std::string field_units ()
 
unsigned int n_values ()
 
NumCompValueType n_elem ()
 
VTKValueType vtk_type ()
 Get type of stored data. More...
 
std::size_t dof_handler_hash () const
 
void set_dof_handler_hash (std::size_t hash)
 

Protected Member Functions

template<class T >
void set_vtk_type ()
 

Protected Attributes

double time_
 time step stored in cache More...
 
std::string field_input_name_
 name of field stored in cache More...
 
std::string field_name_
 
std::string field_units_
 
unsigned int n_values_
 
NumCompValueType n_elem_
 
VTKValueType vtk_type_
 Type of stored data. More...
 
std::size_t dof_handler_hash_
 Hash of DOF handler (attribute of native VTK data) More...
 

Detailed Description

Definition at line 29 of file element_data_cache_base.hh.

Member Enumeration Documentation

Number of components of element data stored in the database.

Enumerator
N_SCALAR 
N_VECTOR 
N_TENSOR 

Definition at line 35 of file element_data_cache_base.hh.

Types of VTK value.

Enumerator
VTK_INT8 
VTK_UINT8 
VTK_INT16 
VTK_UINT16 
VTK_INT32 
VTK_UINT32 
VTK_FLOAT32 
VTK_FLOAT64 

Definition at line 42 of file element_data_cache_base.hh.

Constructor & Destructor Documentation

ElementDataCacheBase::ElementDataCacheBase ( )
inline

Constructor.

Definition at line 47 of file element_data_cache_base.hh.

virtual ElementDataCacheBase::~ElementDataCacheBase ( )
inlinevirtual

Destructor.

Definition at line 52 of file element_data_cache_base.hh.

Member Function Documentation

std::size_t ElementDataCacheBase::dof_handler_hash ( ) const
inline

Get dof_handler_hash_ value.

Definition at line 146 of file element_data_cache_base.hh.

std::string ElementDataCacheBase::field_input_name ( )
inline

Getter for quantity name of cache.

Definition at line 59 of file element_data_cache_base.hh.

std::string ElementDataCacheBase::field_units ( )
inline

Get string representation of SI units.

Definition at line 120 of file element_data_cache_base.hh.

virtual void ElementDataCacheBase::get_min_max_range ( double &  min,
double &  max 
)
pure virtual

Find minimal and maximal range of stored data

Implemented in ElementDataCache< T >, and DummyOutputData.

Here is the caller graph for this function:

double ElementDataCacheBase::get_time ( )
inline

Getter for time of cache.

Definition at line 55 of file element_data_cache_base.hh.

bool ElementDataCacheBase::is_actual ( double  time,
std::string  field_name 
)
inline

Check if cache stored actual data.

Definition at line 63 of file element_data_cache_base.hh.

NumCompValueType ElementDataCacheBase::n_elem ( )
inline

Get number of data elements per data value.

Definition at line 134 of file element_data_cache_base.hh.

Here is the caller graph for this function:

unsigned int ElementDataCacheBase::n_values ( )
inline

Get number of data values.

Definition at line 127 of file element_data_cache_base.hh.

Here is the caller graph for this function:

virtual void ElementDataCacheBase::print_all_yaml ( ostream &  out_stream,
unsigned int  precision 
)
pure virtual

Print stored values in the YAML format (using JSON like arrays). Used for output of observe values.

Implemented in ElementDataCache< T >, and DummyOutputData.

Here is the caller graph for this function:

virtual void ElementDataCacheBase::print_ascii ( ostream &  out_stream,
unsigned int  idx 
)
pure virtual

Print one value at given index in ascii format

Implemented in ElementDataCache< T >, and DummyOutputData.

Here is the caller graph for this function:

virtual void ElementDataCacheBase::print_ascii_all ( ostream &  out_stream)
pure virtual

Print all data in ascii format at once stored in database

Implemented in ElementDataCache< T >, and DummyOutputData.

Here is the caller graph for this function:

virtual void ElementDataCacheBase::print_binary_all ( ostream &  out_stream,
bool  print_data_size = true 
)
pure virtual

Print all data in binary format at once stored in database

Implemented in ElementDataCache< T >, and DummyOutputData.

Here is the caller graph for this function:

virtual void ElementDataCacheBase::read_ascii_data ( Tokenizer &  tok,
unsigned int  n_components,
unsigned int  i_row 
)
pure virtual

Read ascii data of given i_row from tokenizer

Implemented in ElementDataCache< T >, and DummyOutputData.

Here is the caller graph for this function:

virtual void ElementDataCacheBase::read_binary_data ( std::istream &  data_stream,
unsigned int  n_components,
unsigned int  i_row 
)
pure virtual

Read binary data of given i_row from data stream

Implemented in ElementDataCache< T >, and DummyOutputData.

Here is the caller graph for this function:

void ElementDataCacheBase::set_dof_handler_hash ( std::size_t  hash)
inline

Set dof_handler_hash_ value.

Definition at line 153 of file element_data_cache_base.hh.

Here is the caller graph for this function:

void ElementDataCacheBase::set_field_units ( std::string  unit_string)
inline

Set string representation of SI units.

Definition at line 106 of file element_data_cache_base.hh.

void ElementDataCacheBase::set_n_values ( unsigned int  n_values)
inline

Set string representation of SI units.

Definition at line 113 of file element_data_cache_base.hh.

template<class T >
void ElementDataCacheBase::set_vtk_type ( )
inlineprotected

Definition at line 159 of file element_data_cache_base.hh.

VTKValueType ElementDataCacheBase::vtk_type ( )
inline

Get type of stored data.

Definition at line 139 of file element_data_cache_base.hh.

Member Data Documentation

std::size_t ElementDataCacheBase::dof_handler_hash_
protected

Hash of DOF handler (attribute of native VTK data)

Definition at line 197 of file element_data_cache_base.hh.

std::string ElementDataCacheBase::field_input_name_
protected

name of field stored in cache

Definition at line 175 of file element_data_cache_base.hh.

std::string ElementDataCacheBase::field_name_
protected

Definition at line 176 of file element_data_cache_base.hh.

std::string ElementDataCacheBase::field_units_
protected

Data copied from Field.

Definition at line 181 of file element_data_cache_base.hh.

NumCompValueType ElementDataCacheBase::n_elem_
protected

Number of data elements per data value.

Definition at line 191 of file element_data_cache_base.hh.

unsigned int ElementDataCacheBase::n_values_
protected

Number of data values.

Definition at line 186 of file element_data_cache_base.hh.

double ElementDataCacheBase::time_
protected

time step stored in cache

Definition at line 172 of file element_data_cache_base.hh.

VTKValueType ElementDataCacheBase::vtk_type_
protected

Type of stored data.

Definition at line 194 of file element_data_cache_base.hh.


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