Flow123d  last_with_con_2.0.0-4-g42e6930
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
OutputData< Value > Class Template Reference

This class is used for storing data that are copied from field. More...

#include <output_data.hh>

Inheritance diagram for OutputData< Value >:
Inheritance graph
[legend]
Collaboration diagram for OutputData< Value >:
Collaboration graph
[legend]

Public Types

typedef Value::element_type ElemType
 
- Public Types inherited from OutputDataBase
enum  NumCompValueType { N_SCALAR = 1, N_VECTOR = 3, N_TENSOR = 9 }
 

Public Member Functions

 OutputData (const FieldCommon &field, unsigned int size)
 Constructor of templated OutputData. More...
 
virtual ~OutputData () override
 Destructor of OutputData. More...
 
void print (ostream &out_stream, unsigned int idx) override
 
void print_all (ostream &out_stream) override
 Print all data stored in output data. 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)
 
- 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

ElemTypedata_
 
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_
 

Detailed Description

template<class Value>
class OutputData< Value >

This class is used for storing data that are copied from field.

Definition at line 23 of file output_data.hh.

Member Typedef Documentation

template<class Value>
typedef Value::element_type OutputData< Value >::ElemType

Definition at line 25 of file output_data.hh.

Constructor & Destructor Documentation

template<class Value >
OutputData< Value >::OutputData ( const FieldCommon field,
unsigned int  size 
)

Constructor of templated OutputData.

Definition at line 15 of file output_data.cc.

template<class Value >
OutputData< Value >::~OutputData ( )
overridevirtual

Destructor of OutputData.

Definition at line 57 of file output_data.cc.

Member Function Documentation

template<class Value >
void OutputData< Value >::add ( unsigned int  idx,
const Value &  value 
)

Add value to given index

Definition at line 122 of file output_data.cc.

Here is the caller graph for this function:

template<class Value >
void OutputData< Value >::normalize ( unsigned int  idx,
unsigned int  divisor 
)

Normalize values at given index

Definition at line 138 of file output_data.cc.

Here is the caller graph for this function:

template<class Value>
template<class Func >
void OutputData< Value >::operate ( unsigned int  idx,
const Value &  val,
const Func &  func 
)
inlineprivate

Perform given function at given index

Definition at line 84 of file output_data.hh.

Here is the caller graph for this function:

template<class Value >
void OutputData< Value >::print ( ostream &  out_stream,
unsigned int  idx 
)
overridevirtual

Output data element on given index idx. Method for writing data to output stream.

Note
This method is used only by MSH file format.

Implements OutputDataBase.

Definition at line 70 of file output_data.cc.

template<class Value >
void OutputData< Value >::print_all ( ostream &  out_stream)
overridevirtual

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 86 of file output_data.cc.

template<class Value >
void OutputData< Value >::print_all_yaml ( ostream &  out_stream,
unsigned int  precision 
)
overridevirtual

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

Implements OutputDataBase.

Definition at line 97 of file output_data.cc.

template<class Value >
void OutputData< Value >::store_value ( unsigned int  idx,
const Value &  value 
)

Store data element of given data value under given index.

Definition at line 114 of file output_data.cc.

Here is the caller graph for this function:

template<class Value >
void OutputData< Value >::zero ( unsigned int  idx)

Reset values at given index

Definition at line 130 of file output_data.cc.

Here is the caller graph for this function:

Member Data Documentation

template<class Value>
Value::return_type OutputData< Value >::aux
private

Auxiliary value

Definition at line 109 of file output_data.hh.

template<class Value>
ElemType* OutputData< Value >::data_
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 96 of file output_data.hh.

template<class Value>
unsigned int OutputData< Value >::n_cols
private

Definition at line 122 of file output_data.hh.

template<class Value>
unsigned int OutputData< Value >::n_rows
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 122 of file output_data.hh.

template<class Value>
Value OutputData< Value >::val_aux
private

Auxiliary field value envelope over aux

Definition at line 115 of file output_data.hh.


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