14 template <
class Value>
33 "Do not support output of vectors with fixed size >3. Field: %s\n",
41 THROW(OutputTime::ExcOutputVariableVector() << OutputTime::EI_FieldName(this->
field_name));
56 template <
class Value>
69 template <
class Value>
73 ElemType *ptr_begin = this->data_ + n_elem_ * idx;
74 for(
ElemType *ptr = ptr_begin; ptr < ptr_begin + n_elem_; ptr++ )
75 out_stream << *ptr <<
" ";
85 template <
class Value>
88 for(
unsigned int idx = 0; idx < this->n_values; idx++) {
89 ElemType *ptr_begin = this->data_ + n_elem_ * idx;
90 for(
ElemType *ptr = ptr_begin; ptr < ptr_begin + n_elem_; ptr++ )
91 out_stream << *ptr <<
" ";
96 template <
class Value>
100 for(
unsigned int idx = 0; idx < this->n_values; idx++) {
101 if (idx != 0) out_stream <<
", ";
102 ElemType *ptr_begin = this->data_ + n_elem_ * idx;
103 typename Value::return_type value;
113 template <
class Value>
121 template <
class Value>
129 template <
class Value>
137 template <
class Value>
139 operate(idx, val_aux, [divisor](
ElemType& raw,
ElemType val) {raw /= divisor;});
Common abstract parent of all Field<...> classes.
std::string output_field_name
void print_all_yaml(ostream &out_stream, unsigned int precision) override
void print(ostream &out_stream, unsigned int idx) override
This class is used for storing data that are copied from field.
void zero(unsigned int idx)
OutputData(const FieldCommon &field, unsigned int size)
Constructor of templated OutputData.
FieldCommon & units(const UnitSI &units)
Set basic units of the field.
Value::element_type ElemType
void add(unsigned int idx, const Value &value)
#define OLD_ASSERT_LESS(a, b)
void normalize(unsigned int idx, unsigned int divisor)
virtual ~OutputData() override
Destructor of OutputData.
FieldCommon & name(const string &name)
#define THROW(whole_exception_expr)
Wrapper for throw. Saves the throwing point.
void store_value(unsigned int idx, const Value &value)
void print_all(ostream &out_stream) override
Print all data stored in output data.