4 #include <deal.II/numerics/data_out.h> 5 #include <deal.II/grid/tria.h> 9 namespace GridRefinement {
12 enum class StorageType{
44 StorageType storage_type) :
45 storage_type(storage_type){};
53 const dealii::DoFHandler<dim> &dof_handler,
86 virtual void write_msh_data_internal(
87 const dealii::DoFHandler<dim> &dof_handler,
88 std::ostream & out) = 0;
94 unsigned int num_entries(
95 const dealii::DoFHandler<dim> &dof_handler);
101 void set_string_tags(
103 std::string interpolation_scheme);
108 void set_string_tags(
123 void set_integer_tags(
124 unsigned int time_step,
125 unsigned int num_components,
126 unsigned int num_entries);
135 template <
int dim,
typename T>
146 StorageType storage_type,
147 const dealii::DoFHandler<dim> &dof_handler) :
151 this->set_integer_tags(0, num_components, this->num_entries(dof_handler));
162 StorageType storage_type,
164 const dealii::DoFHandler<dim> &dof_handler) :
168 this->set_integer_tags(0, num_components, this->num_entries(dof_handler));
169 this->set_string_tags(name);
178 void write_msh_data_internal(
179 const dealii::DoFHandler<dim> &dof_handler,
180 std::ostream & out)
override;
207 template <
int dim,
typename real>
216 const dealii::DoFHandler<dim> &dof_handler) :
217 dof_handler(dof_handler){};
228 template <
typename T>
231 StorageType storage_type)
233 data_vector.push_back(
249 template <
typename T>
252 StorageType storage_type,
255 data_vector.push_back(
284 #endif // __GMSH_OUT_H__ Output class for GMSH .msh v4.1 file format.
void add_data_vector(std::vector< T > data, StorageType storage_type)
Add data vector of specified storage type and values.
void add_data_vector(std::vector< T > data, StorageType storage_type, std::string name)
Add data vector of specified storage type and values with name.
Data structure class for data fields of .msh files.
MshOutDataInternal(std::vector< T > data, StorageType storage_type, std::string name, const dealii::DoFHandler< dim > &dof_handler)
Construct data field with name.
std::vector< double > real_tags
Real tags for the data field.
Internal data handler class for .msh file data fields.
Files for the baseline physics.
MshOutData(StorageType storage_type)
Delegated constructor.
const dealii::DoFHandler< dim > & dof_handler
Mesh description for acccess to node location and connecitviity information.
StorageType storage_type
Storage location of the .msh data field entries.
MshOut(const dealii::DoFHandler< dim > &dof_handler)
Construct mesh output handler.
const std::vector< T > data
Internal data storage vector.
std::vector< int > integer_tags
Integer tags for the data field.
MshOutDataInternal(std::vector< T > data, StorageType storage_type, const dealii::DoFHandler< dim > &dof_handler)
Construct data field.
static const unsigned int num_components
The number of components per data point.
std::vector< std::string > string_tags
String tags for the data field.
std::vector< std::shared_ptr< MshOutData< dim > > > data_vector
Vector of data field entries stored in MshOutDataInternal based on data type of entries.