14 template <
class Value>
18 this->set_vtk_type<ElemType>();
34 "Do not support output of vectors with fixed size >3. Field: %s\n",
35 this->field_name.c_str());
42 THROW(OutputTime::ExcOutputVariableVector() << OutputTime::EI_FieldName(this->field_name));
57 template <
class Value>
70 template <
class Value>
76 out_stream << *ptr <<
" ";
86 template <
class Value>
89 for(
unsigned int idx = 0; idx < this->
n_values; idx++) {
92 out_stream << *ptr <<
" ";
98 template <
class Value>
103 out_stream.write(reinterpret_cast<const char*>(&data_byte_size),
sizeof(
unsigned long long int));
105 for(
unsigned int idx = 0; idx < this->
n_values; idx++) {
108 out_stream.write(reinterpret_cast<const char*>(ptr),
sizeof(
ElemType));
114 template <
class Value>
118 for(
unsigned int idx = 0; idx < this->
n_values; idx++) {
119 if (idx != 0) out_stream <<
", ";
121 typename Value::return_type
value;
128 template <
class Value>
131 min = std::numeric_limits<double>::max();
132 max = std::numeric_limits<double>::min();
133 for(
unsigned int idx = 0; idx < this->
n_values; idx++) {
136 if ((
double)(*ptr) < min) min = (double)(*ptr);
137 if ((
double)(*ptr) > max) max = (
double)(*ptr);
146 template <
class Value>
154 template <
class Value>
162 template <
class Value>
170 template <
class Value>
Common abstract parent of all Field<...> classes.
void operate(unsigned int idx, const Value &val, const Func &func)
void print_binary_all(ostream &out_stream) override
Print all data stored in output data to appended binary format.
std::string output_field_name
void print_all_yaml(ostream &out_stream, unsigned int precision) override
void print_ascii(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.
static constexpr bool value
Value::element_type ElemType
void get_min_max_range(double &min, double &max) override
void add(unsigned int idx, const Value &value)
void normalize(unsigned int idx, unsigned int divisor)
virtual ~OutputData() override
Destructor of OutputData.
void print_ascii_all(ostream &out_stream) override
Print all data stored in output data ro ascii format.
#define ASSERT_LT(a, b)
Definition of comparative assert macro (Less Than)
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)