Flow123d  DF_patch_fe_data_tables-32b3de9
Public Member Functions | List of all members
DummyElementDataCache Class Reference

#include <element_data_cache_base.hh>

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

Public Member Functions

 DummyElementDataCache (std::string field_name_in, unsigned int n_comp_in)
 
virtual ~DummyElementDataCache () override
 
void print_ascii (ostream &out_stream, unsigned int) override
 
void print_ascii_all (ostream &out_stream, unsigned int start=0) override
 
void print_binary_all (ostream &, bool, unsigned int) override
 
void print_yaml_subarray (ostream &, unsigned int, unsigned int, unsigned int) override
 
void get_min_max_range (double &, double &) override
 
void read_ascii_data (Tokenizer &, unsigned int, unsigned int) override
 
void read_binary_data (std::istream &, unsigned int, unsigned int) override
 
std::shared_ptr< ElementDataCacheBasegather (Distribution *, LongIdx *) override
 
std::shared_ptr< ElementDataCacheBaseelement_node_cache_fixed_size (std::vector< unsigned int > &) override
 
std::shared_ptr< ElementDataCacheBaseelement_node_cache_optimize_size (std::vector< unsigned int > &) override
 
std::shared_ptr< ElementDataCacheBasecompute_node_data (std::vector< unsigned int > &, unsigned int) override
 
- Public Member Functions inherited from ElementDataCacheBase
 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...
 
void set_field_units (std::string unit_string)
 
void set_n_values (unsigned int n_values)
 
std::string field_units () const
 
unsigned int n_values () const
 
bool is_dummy () const
 
unsigned int n_comp () const
 
unsigned int n_dofs_per_element () const
 
VTKValueType vtk_type () const
 Get type of stored data. More...
 
std::size_t dof_handler_hash () const
 
void set_dof_handler_hash (std::size_t hash)
 
std::string fe_type () const
 
unsigned int get_boundary_begin () const
 Returns start position of boundary data in cache. More...
 

Additional Inherited Members

- Public Types inherited from ElementDataCacheBase
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...
 
- Protected Member Functions inherited from ElementDataCacheBase
template<class T >
void set_vtk_type ()
 
- Protected Attributes inherited from ElementDataCacheBase
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_
 
unsigned int n_comp_
 
VTKValueType vtk_type_
 Type of stored data. More...
 
std::size_t dof_handler_hash_
 Hash of DOF handler (attribute of native VTK data) More...
 
std::string fe_type_
 
unsigned int n_dofs_per_element_
 
bool is_dummy_
 Is true for DummyElementDataCache. More...
 
unsigned int boundary_begin_
 Start position of boundary data in cache. More...
 

Detailed Description

Auxiliary implementation of ElementDataCacheBase that performs output of single zero data for the fields that are off for current time frame.

Definition at line 298 of file element_data_cache_base.hh.

Constructor & Destructor Documentation

◆ DummyElementDataCache()

DummyElementDataCache::DummyElementDataCache ( std::string  field_name_in,
unsigned int  n_comp_in 
)
inline

Definition at line 301 of file element_data_cache_base.hh.

◆ ~DummyElementDataCache()

virtual DummyElementDataCache::~DummyElementDataCache ( )
inlineoverridevirtual

Definition at line 309 of file element_data_cache_base.hh.

Member Function Documentation

◆ compute_node_data()

std::shared_ptr< ElementDataCacheBase > DummyElementDataCache::compute_node_data ( std::vector< unsigned int > &  conn_vec,
unsigned int  data_size 
)
inlineoverridevirtual

Create final node data cache.

Compute average value of each nodes.

Parameters
conn_vecVector of connectivities, holds node indices to values of this cache
data_sizenumber of nodes

Implements ElementDataCacheBase.

Definition at line 354 of file element_data_cache_base.hh.

◆ element_node_cache_fixed_size()

std::shared_ptr< ElementDataCacheBase > DummyElementDataCache::element_node_cache_fixed_size ( std::vector< unsigned int > &  offset_vec)
inlineoverridevirtual

Create node data cache of constant data size for each elements.

Method must be call on node data cache.

Every element is represented of 4 nodes maximal. Method returns cache with size = 4*n_elements*n_components. If dimension of element is less than 3, part of data is not used. This construction of node data cache allow call gather of node data for continuous and discontinuous output meshes.

Parameters
offset_vecvector of appropriate offsets (number of nodes) of each elements

Implements ElementDataCacheBase.

Definition at line 344 of file element_data_cache_base.hh.

◆ element_node_cache_optimize_size()

std::shared_ptr< ElementDataCacheBase > DummyElementDataCache::element_node_cache_optimize_size ( std::vector< unsigned int > &  offset_vec)
inlineoverridevirtual

Inverse method to previous.

Must be call on node cache with constant data size for each elements. Return data cache, that corresponds with offset vector.

Parameters
offset_vecvector of appropriate offsets (number of nodes) of each elements

Implements ElementDataCacheBase.

Definition at line 349 of file element_data_cache_base.hh.

◆ gather()

std::shared_ptr< ElementDataCacheBase > DummyElementDataCache::gather ( Distribution distr,
LongIdx local_to_global 
)
inlineoverridevirtual

Method for gathering parallel data to serial cache.

Gather data of individual processes to serial cache that is created only on zero process. Other processes return uninitialized shared pointer.

Parameters
distrCollective distribution
local_to_globalMaps local indices to global

Implements ElementDataCacheBase.

Definition at line 339 of file element_data_cache_base.hh.

◆ get_min_max_range()

void DummyElementDataCache::get_min_max_range ( double &  min,
double &  max 
)
inlineoverridevirtual

Find minimal and maximal range of stored data

Implements ElementDataCacheBase.

Definition at line 330 of file element_data_cache_base.hh.

◆ print_ascii()

void DummyElementDataCache::print_ascii ( ostream &  out_stream,
unsigned int  idx 
)
inlineoverridevirtual

Print one value at given index in ascii format

Implements ElementDataCacheBase.

Definition at line 312 of file element_data_cache_base.hh.

◆ print_ascii_all()

void DummyElementDataCache::print_ascii_all ( ostream &  out_stream,
unsigned int  start = 0 
)
inlineoverridevirtual

Print all data in ascii format at once stored in database

Implements ElementDataCacheBase.

Definition at line 317 of file element_data_cache_base.hh.

◆ print_binary_all()

void DummyElementDataCache::print_binary_all ( ostream &  out_stream,
bool  print_data_size,
unsigned int  start 
)
inlineoverridevirtual

Print all data in binary format at once stored in database

Implements ElementDataCacheBase.

Definition at line 322 of file element_data_cache_base.hh.

◆ print_yaml_subarray()

void DummyElementDataCache::print_yaml_subarray ( ostream &  out_stream,
unsigned int  precision,
unsigned int  begin,
unsigned int  end 
)
inlineoverridevirtual

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

Implements ElementDataCacheBase.

Definition at line 327 of file element_data_cache_base.hh.

◆ read_ascii_data()

void DummyElementDataCache::read_ascii_data ( Tokenizer &  tok,
unsigned int  n_components,
unsigned int  i_row 
)
inlineoverridevirtual

Read ascii data of given i_row from tokenizer

Implements ElementDataCacheBase.

Definition at line 333 of file element_data_cache_base.hh.

◆ read_binary_data()

void DummyElementDataCache::read_binary_data ( std::istream &  data_stream,
unsigned int  n_components,
unsigned int  i_row 
)
inlineoverridevirtual

Read binary data of given i_row from data stream

Implements ElementDataCacheBase.

Definition at line 336 of file element_data_cache_base.hh.


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