Flow123d
release_2.1.0-84-g6a13a75
|
This class is used for storing data that are copied from field. More...
#include <output_data.hh>
Public Types | |
typedef Value::element_type | ElemType |
Public Types inherited from OutputDataBase | |
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 | |
OutputData (const FieldCommon &field, unsigned int size) | |
Constructor of templated OutputData. More... | |
virtual | ~OutputData () override |
Destructor of OutputData. More... | |
void | print_ascii (ostream &out_stream, unsigned int idx) override |
void | print_ascii_all (ostream &out_stream) override |
Print all data stored in output data ro ascii format. More... | |
void | print_binary_all (ostream &out_stream, bool print_data_size=true) override |
Print all data stored in output data to appended binary format. More... | |
void | print_all_yaml (ostream &out_stream, unsigned int precision) override |
void | store_value (unsigned int idx, const Value &value) |
void | add (unsigned int idx, const Value &value) |
void | zero (unsigned int idx) |
void | normalize (unsigned int idx, unsigned int divisor) |
void | get_min_max_range (double &min, double &max) override |
Public Member Functions inherited from OutputDataBase | |
virtual | ~OutputDataBase () |
Private Member Functions | |
template<class Func > | |
void | operate (unsigned int idx, const Value &val, const Func &func) |
Private Attributes | |
ElemType * | data_ |
Value::return_type | aux |
Value | val_aux |
unsigned int | n_rows |
unsigned int | n_cols |
Additional Inherited Members | |
Public Attributes inherited from OutputDataBase | |
std::string | output_field_name |
std::string | field_name |
UnitSI | field_units |
unsigned int | n_values |
NumCompValueType | n_elem_ |
VTKValueType | vtk_type_ |
Type of stored data. More... | |
Protected Member Functions inherited from OutputDataBase | |
template<class T > | |
void | set_vtk_type () |
This class is used for storing data that are copied from field.
Definition at line 24 of file output_data.hh.
typedef Value::element_type OutputData< Value >::ElemType |
Definition at line 26 of file output_data.hh.
OutputData< Value >::OutputData | ( | const FieldCommon & | field, |
unsigned int | size | ||
) |
Constructor of templated OutputData.
Definition at line 15 of file output_data.cc.
|
overridevirtual |
Destructor of OutputData.
Definition at line 58 of file output_data.cc.
void OutputData< Value >::add | ( | unsigned int | idx, |
const Value & | value | ||
) |
Add value to given index
Definition at line 157 of file output_data.cc.
|
overridevirtual |
Find minimal and maximal range of stored data
Implements OutputDataBase.
Definition at line 131 of file output_data.cc.
void OutputData< Value >::normalize | ( | unsigned int | idx, |
unsigned int | divisor | ||
) |
Normalize values at given index
Definition at line 173 of file output_data.cc.
|
inlineprivate |
Perform given function at given index
Definition at line 95 of file output_data.hh.
|
overridevirtual |
Print stored values in the YAML format (using JSON like arrays). Used for output of observe values.
Implements OutputDataBase.
Definition at line 117 of file output_data.cc.
|
overridevirtual |
Output data element on given index idx
. Method for writing data to output stream.
Implements OutputDataBase.
Definition at line 71 of file output_data.cc.
|
overridevirtual |
Print all data stored in output data ro ascii format.
Print all data stored in output data.
TODO: indicate if the tensor data are output in column-first or raw-first order and possibly implement transposition. Set such property for individual file formats. Class OutputData stores always in raw-first order.
Implements OutputDataBase.
Definition at line 87 of file output_data.cc.
|
overridevirtual |
Print all data stored in output data to appended binary format.
Prints the whole data vector into stream.
Implements OutputDataBase.
Definition at line 99 of file output_data.cc.
void OutputData< Value >::store_value | ( | unsigned int | idx, |
const Value & | value | ||
) |
Store data element of given data value under given index.
Definition at line 149 of file output_data.cc.
void OutputData< Value >::zero | ( | unsigned int | idx | ) |
Reset values at given index
Definition at line 165 of file output_data.cc.
|
private |
Auxiliary value
Definition at line 120 of file output_data.hh.
|
private |
Computed data values for output stored as continuous buffer of their data elements. One data value has n_elem
data elements (of type double, int or unsigned int).
Definition at line 107 of file output_data.hh.
|
private |
Definition at line 133 of file output_data.hh.
|
private |
Number of rows and cols in stored data element, valid values are (1,1) for scalar; (3,1) for vectors; (3,3) for tensors
Definition at line 133 of file output_data.hh.
|
private |
Auxiliary field value envelope over aux
Definition at line 126 of file output_data.hh.