[P]arallel [Hi]gh-order [Li]brary for [P]DEs  Latest
Parallel High-Order Library for PDEs through hp-adaptive Discontinuous Galerkin methods
PHiLiP::GridRefinement::MshOutData< dim > Class Template Referenceabstract

Data structure class for data fields of .msh files. More...

#include <msh_out.h>

Inheritance diagram for PHiLiP::GridRefinement::MshOutData< dim >:
Collaboration diagram for PHiLiP::GridRefinement::MshOutData< dim >:

Public Member Functions

virtual ~MshOutData ()=default
 Destructor.
 
 MshOutData (StorageType storage_type)
 Delegated constructor. More...
 
void write_msh_data (const dealii::DoFHandler< dim > &dof_handler, std::ostream &out)
 Perform writing of .msh file data section. More...
 

Protected Member Functions

virtual void write_msh_data_internal (const dealii::DoFHandler< dim > &dof_handler, std::ostream &out)=0
 Perform write of internal data field body at storage location. More...
 
unsigned int num_entries (const dealii::DoFHandler< dim > &dof_handler)
 Gets the number of data entries associated with the mesh. More...
 
void set_string_tags (std::string name, std::string interpolation_scheme)
 Sets the string tags for the data field. More...
 
void set_string_tags (std::string name)
 Sets the string name tag for the data field. More...
 
void set_real_tags (double time)
 Sets real tag to the data field. More...
 
void set_integer_tags (unsigned int time_step, unsigned int num_components, unsigned int num_entries)
 Sets the required integer tags for the data field. More...
 

Protected Attributes

StorageType storage_type
 Storage location of the .msh data field entries.
 
std::vector< std::string > string_tags
 String tags for the data field. More...
 
std::vector< double > real_tags
 Real tags for the data field. More...
 
std::vector< int > integer_tags
 Integer tags for the data field. More...
 

Detailed Description

template<int dim>
class PHiLiP::GridRefinement::MshOutData< dim >

Data structure class for data fields of .msh files.

Contains functionality to store and output mesh associated data for .msh v4.1 file formats suitable for use with GMSH. Also used to export metric data to external LpCVT mesh generation program. Tags and other functionality included to distinguish between multiple field types. Internally handles the different types data availible.

Definition at line 34 of file msh_out.h.

Constructor & Destructor Documentation

◆ MshOutData()

template<int dim>
PHiLiP::GridRefinement::MshOutData< dim >::MshOutData ( StorageType  storage_type)
inlineexplicit

Delegated constructor.

Sets only the internal storage type for header creation

Definition at line 43 of file msh_out.h.

Member Function Documentation

◆ num_entries()

template<int dim>
unsigned int PHiLiP::GridRefinement::MshOutData< dim >::num_entries ( const dealii::DoFHandler< dim > &  dof_handler)
protected

Gets the number of data entries associated with the mesh.

Can be the number of mesh nodes or elements depending on the storage location of the data entries.

Definition at line 207 of file msh_out.cpp.

◆ set_integer_tags()

template<int dim>
void PHiLiP::GridRefinement::MshOutData< dim >::set_integer_tags ( unsigned int  time_step,
unsigned int  num_components,
unsigned int  num_entries 
)
protected

Sets the required integer tags for the data field.

Required values include the current solution time step, num_components per entry

Definition at line 250 of file msh_out.cpp.

◆ set_real_tags()

template<int dim>
void PHiLiP::GridRefinement::MshOutData< dim >::set_real_tags ( double  time)
protected

Sets real tag to the data field.

Represents single double value for the field such as solution time in unsteady results.

Definition at line 242 of file msh_out.cpp.

◆ set_string_tags() [1/2]

template<int dim>
void PHiLiP::GridRefinement::MshOutData< dim >::set_string_tags ( std::string  name,
std::string  interpolation_scheme 
)
protected

Sets the string tags for the data field.

Default GMSH treatment for the data field name and optionally set interpolation scheme specification.

Definition at line 224 of file msh_out.cpp.

◆ set_string_tags() [2/2]

template<int dim>
void PHiLiP::GridRefinement::MshOutData< dim >::set_string_tags ( std::string  name)
protected

Sets the string name tag for the data field.

Default internal treatement for data field name

Definition at line 234 of file msh_out.cpp.

◆ write_msh_data()

template<int dim>
void PHiLiP::GridRefinement::MshOutData< dim >::write_msh_data ( const dealii::DoFHandler< dim > &  dof_handler,
std::ostream &  out 
)

Perform writing of .msh file data section.

Writes header and associated information tags then calls the internal function specific to the data storage type and value type to output data.

Definition at line 144 of file msh_out.cpp.

◆ write_msh_data_internal()

template<int dim>
virtual void PHiLiP::GridRefinement::MshOutData< dim >::write_msh_data_internal ( const dealii::DoFHandler< dim > &  dof_handler,
std::ostream &  out 
)
protectedpure virtual

Perform write of internal data field body at storage location.

Function to be overwritten by the internal data structure type. Format must be consistent with the num_entries and num_components setup through the integer_tags field.

Implemented in PHiLiP::GridRefinement::MshOutDataInternal< dim, T >.

Member Data Documentation

◆ integer_tags

template<int dim>
std::vector<int> PHiLiP::GridRefinement::MshOutData< dim >::integer_tags
protected

Integer tags for the data field.

Should include the numbered time step, number of local data components (at each data point) and the number of total entries (number of nodes or elements) where the data is written. Setup using the set_integer_tags function.

Definition at line 79 of file msh_out.h.

◆ real_tags

template<int dim>
std::vector<double> PHiLiP::GridRefinement::MshOutData< dim >::real_tags
protected

Real tags for the data field.

No specific entries are required but may be used to pass additional information about the data field such as the time at current time step if multiple fields are passed together. Setup using the set_real_tags function.

Definition at line 72 of file msh_out.h.

◆ string_tags

template<int dim>
std::vector<std::string> PHiLiP::GridRefinement::MshOutData< dim >::string_tags
protected

String tags for the data field.

Should contain the name of the data field. Optionally the interpolation scheme for data visualization can also be specified through this field. Other custom entries may also be added through the set_string_tags function.

Definition at line 65 of file msh_out.h.


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