15 this->set_vtk_type<T>();
16 output_field_name = name;
29 out_stream << data_[idx] ;
37 out_stream << d <<
" ";
46 unsigned long long int data_byte_size = data_.size() *
sizeof(T);
47 out_stream.write(reinterpret_cast<const char*>(&data_byte_size),
sizeof(
unsigned long long int));
50 out_stream.write(reinterpret_cast<const char*>(&d),
sizeof(T));
58 ASSERT(
false).error(
"Unsupported output of the mesh data to YAML format.");
65 min = std::numeric_limits<double>::max();
66 max = std::numeric_limits<double>::min();
67 for(
auto &d : data_) {
68 if ((
double)d < min) min = (double)d;
69 if ((
double)d > max) max = (
double)d;
void print_ascii(std::ostream &out_stream, unsigned int idx) override
Prints idx element of data vector into stream.
#define ASSERT(expr)
Allow use shorter versions of macro names if these names is not used with external library...
void print_ascii_all(std::ostream &out_stream) override
Prints the whole data vector into stream.
MeshData(std::string name, NumCompValueType n_elem=N_SCALAR)
Constructor. name is the possible name of the output vector.
void print_binary_all(ostream &out_stream) override
Prints the whole data vector into stream.
T & operator[](unsigned int i)
Access i-th element in the data vector.
#define ASSERT_LT(a, b)
Definition of comparative assert macro (Less Than)
void print_all_yaml(std::ostream &out_stream, unsigned int precision) override
Prints the whole data vector into stream. UNSUPPORTED.
void get_min_max_range(double &min, double &max) override