Hermes2D  3.0
Hermes::Hermes2D::MeshData Class Reference

Class to stored 2d mesh parameters. The MeshData class organizes all the necessary data structures required to store information in the input mesh file. All variables are stored internally as a mapping between strings and a list of strings. Symbolic expressions are not supported for variables. The variables are stored in a vector of strings. This is true for single-valued variables, lists and list of lists. The contents of the variables are thus accessed differently depending on their contents. More...

#include <mesh_data.h>

Public Member Functions

void parse_mesh (void)
 This function parses a given input mesh file line by line and extracts the necessary information into the MeshData class variables.
 
 MeshData (const std::string &mesh_file)
 MeshData Constructor.
 
 MeshData (const MeshData &m)
 MeshData Copy Constructor.
 
MeshDataoperator= (const MeshData &m)
 MeshData Assignment Operator.
 
 ~MeshData ()
 MeshData Destructor.
 

Public Attributes

std::map< std::string,
std::vector< std::string > > 
vars_
 Map for storing variables in input mesh file.
 
int n_vert
 Number of vertices.
 
int n_el
 Number of elements.
 
int n_bdy
 Number of boundary edges.
 
int n_curv
 Number of curved edges (including NURBS curves)
 
int n_ref
 Number of elements with specified refinements.
 
std::vector< double > x_vertex
 x-coordinate of the vertices
 
std::vector< double > y_vertex
 y-coordinate of the vertices
 
std::vector< int > en1
 Nodes with local node number 1.
 
std::vector< int > en2
 Nodes with local node number 2.
 
std::vector< int > en3
 Nodes with local node number 3.
 
std::vector< int > en4
 Nodes with local node number 4. Only for quadrilateral elements. For triangular elements it is set to -1.
 
std::vector< std::string > e_mtl
 Element markers – single word strings.
 
std::vector< int > bdy_first
 First node of a boundary edge.
 
std::vector< int > bdy_second
 Second node of a boundary edge.
 
std::vector< std::string > bdy_type
 Boundary name.
 
std::vector< int > curv_first
 First node of a curved edge.
 
std::vector< int > curv_second
 Second node of a curved edge.
 
std::vector< double > curv_third
 Third entry of a curve specification. Angle for a circular arc and degree for a NURBS curve.
 
std::vector< std::string > curv_inner_pts
 Name of the list of the control points and weights of a NURBS curve. Set to "none" for a circular arc.
 
std::vector< std::string > curv_knots
 Name of the list of knot vectors of a NURBS curve. Set to "none" for a circular arc.
 
std::vector< bool > curv_nurbs
 Nurbs Indicator. True if curve is modeled with NURBS. False if it is a circular arc.
 
std::vector< int > ref_elt
 List of elements to be refined.
 
std::vector< int > ref_type
 List of element refinement type.
 

Detailed Description

Class to stored 2d mesh parameters. The MeshData class organizes all the necessary data structures required to store information in the input mesh file. All variables are stored internally as a mapping between strings and a list of strings. Symbolic expressions are not supported for variables. The variables are stored in a vector of strings. This is true for single-valued variables, lists and list of lists. The contents of the variables are thus accessed differently depending on their contents.

Definition at line 40 of file mesh_data.h.


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