LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
Loading...
Searching...
No Matches
Classes | Public Types | Public Attributes | Static Public Attributes | List of all members
lf::io::GMshFileV2 Struct Reference

A representation of a .msh file (V2) in a c++ data structure. More...

#include <lf/io/gmsh_file_v2.h>

Classes

struct  Element
 Represents a mesh volume/surface/line/point. More...
 
struct  PeriodicEntity
 Describes how 2 elementary entities are identified with each to represent periodic boundaries. More...
 
struct  PhysicalEntity
 Represents a physical entity as defined in gmsh. In GMSH a Physical entity is created through one of the commands Physical Point, Physical Line, Physical Surface or Physical Volume and represents a collection of points, lines, surfaces or volumes. More...
 

Public Types

enum class  ElementType : int {
  EDGE2 = 1 , TRIA3 = 2 , QUAD4 = 3 , TET4 = 4 ,
  HEX8 = 5 , PRISM6 = 6 , PYRAMID5 = 7 , EDGE3 = 8 ,
  TRIA6 = 9 , QUAD9 = 10 , TET10 = 11 , HEX27 = 12 ,
  PRISM18 , PYRAMID14 , POINT = 15 , QUAD8 = 16 ,
  HEX20 = 17 , PRISM15 = 18 , PYRAMID13 = 19 , TRIA9 = 20 ,
  TRIA10 = 21 , TRIA12 = 22 , TRIA15 = 23 , TRIA15_5 = 24 ,
  TRIA21 = 25 , EDGE4 = 26 , EDGE5 = 27 , EDGE6 = 28 ,
  TET20 = 29 , TET35 = 30 , TET56 = 31 , HEX64 = 92 ,
  HEX125 = 93
}
 All possible element types (see GMSH documentation) More...
 
using size_type = mesh::Mesh::size_type
 

Public Attributes

std::string VersionNumber
 The version of GMSH of the msh file, equals usually 2.2.
 
bool IsBinary = false
 Is it a binary file?
 
int DoubleSize = 64
 how many bytes is a double?
 
std::vector< PhysicalEntityPhysicalEntities
 A list of all Physical entities that have a name.
 
std::vector< std::pair< size_type, Eigen::Vector3d > > Nodes
 The nodes that make up this mesh.
 
std::vector< ElementElements
 A list of all Elements (Points,Lines,Surfaces or Volumes) present in the *.msh file.
 
std::vector< PeriodicEntityPeriodic
 

Static Public Attributes

static const std::vector< ElementTypeAllElementTypes
 Contains a list of all element types that are possible.
 

Detailed Description

A representation of a .msh file (V2) in a c++ data structure.

Definition at line 18 of file gmsh_file_v2.h.

Member Typedef Documentation

◆ size_type

Definition at line 19 of file gmsh_file_v2.h.

Member Enumeration Documentation

◆ ElementType

enum class lf::io::GMshFileV2::ElementType : int
strong

All possible element types (see GMSH documentation)

Enumerator
EDGE2 

2-node line

TRIA3 

3-node triangle

QUAD4 

4-node quadrangle

TET4 

4-node tetrahedron

HEX8 

8-node hexahedron

PRISM6 

6-node prism

PYRAMID5 

5-node pyramid

EDGE3 

3-node second order line (2 nodes associated with the vertices and 1 with the edge)

TRIA6 

6-node second order triangle (3 nodes associated with the vertices and 3 with the edges).

QUAD9 

9-node second order quadrangle (4 nodes associated with the vertices, 4 with the edges and 1 with the face).

TET10 

10-node second order tetrahedron (4 nodes associated with the vertices and 6 with the edges).

HEX27 

27-node second order hexahedron (8 nodes associated with the vertices, 12 with the edges, 6 with the faces and 1 with the volume).

PRISM18 

18-node second order prism (6 nodes associated with the vertices, 9 with the edges and 3 with the quadrangular faces).

PYRAMID14 

14-node second order pyramid (5 nodes associated with the vertices, 8 with the edges and 1 with the quadrangular face).

POINT 

1-node point

QUAD8 

8-node second order quadrangle (4 nodes associated with the vertices and 4 with the edges).

HEX20 

20-node second order hexahedron (8 nodes associated with the vertices and 12 with the edges).

PRISM15 

15-node second order prism (6 nodes associated with the vertices and 9 with the edges).

PYRAMID13 

13-node second order pyramid (5 nodes associated with the vertices and 8 with the edges).

TRIA9 

9-node third order incomplete triangle (3 nodes associated with the vertices, 6 with the edges)

TRIA10 

10-node third order triangle (3 nodes associated with the vertices, 6 with the edges, 1 with the face)

TRIA12 

12-node fourth order incomplete triangle (3 nodes associated with the vertices, 9 with the edges)

TRIA15 

15-node fourth order triangle (3 nodes associated with the vertices, 9 with the edges, 3 with the face)

TRIA15_5 

15-node fifth order incomplete triangle (3 nodes associated with the vertices, 12 with the edges)

TRIA21 

21-node fifth order complete triangle (3 nodes associated with the vertices, 12 with the edges, 6 with the face)

EDGE4 

4-node third order edge (2 nodes associated with the vertices, 2 internal to the edge)

EDGE5 

5-node fourth order edge (2 nodes associated with the vertices, 3 internal to the edge)

EDGE6 

6-node fifth order edge (2 nodes associated with the vertices, 4 internal to the edge)

TET20 

20-node third order tetrahedron (4 nodes associated with the vertices, 12 with the edges, 4 with the faces)

TET35 

35-node fourth order tetrahedron (4 nodes associated with the vertices, 18 with the edges, 12 with the faces, 1 in the volume)

TET56 

56-node fifth order tetrahedron (4 nodes associated with the vertices, 24 with the edges, 24 with the faces, 4 in the volume)

HEX64 

64-node third order hexahedron (8 nodes associated with the vertices, 24 with the edges, 24 with the faces, 8 in the volume)

HEX125 

125-node fourth order hexahedron (8 nodes associated with the vertices, 36 with the edges, 54 with the faces, 27 in the volume)

Definition at line 75 of file gmsh_file_v2.h.

Member Data Documentation

◆ AllElementTypes

const std::vector< GMshFileV2::ElementType > lf::io::GMshFileV2::AllElementTypes
static
Initial value:
{

Contains a list of all element types that are possible.

Definition at line 144 of file gmsh_file_v2.h.

◆ DoubleSize

int lf::io::GMshFileV2::DoubleSize = 64

how many bytes is a double?

Definition at line 25 of file gmsh_file_v2.h.

Referenced by lf::io::operator<<(), and lf::io::readGmshFileV2().

◆ Elements

std::vector<Element> lf::io::GMshFileV2::Elements

A list of all Elements (Points,Lines,Surfaces or Volumes) present in the *.msh file.

Note
GMSH writes out all surface elements if the mesh is 2D and all volume elements if the mesh is 3d. Points, Lines (and Surfaces for 3D mesh) are not written to the file in general. They only appear if they are part of some physical entity.

Definition at line 196 of file gmsh_file_v2.h.

Referenced by lf::io::GmshReader::InitGmshFile(), and lf::io::operator<<().

◆ IsBinary

bool lf::io::GMshFileV2::IsBinary = false

Is it a binary file?

Definition at line 23 of file gmsh_file_v2.h.

Referenced by lf::io::operator<<(), and lf::io::readGmshFileV2().

◆ Nodes

std::vector<std::pair<size_type, Eigen::Vector3d> > lf::io::GMshFileV2::Nodes

The nodes that make up this mesh.

  • node[i].first contains the node number assigned by GMSH. They are not necessarily dense or ordered in sequence.
  • node[i].second contains the 3D coordinates of this point, for 2D mesh the z-component is always zero.

Definition at line 72 of file gmsh_file_v2.h.

Referenced by lf::io::GmshReader::InitGmshFile(), and lf::io::operator<<().

◆ Periodic

std::vector<PeriodicEntity> lf::io::GMshFileV2::Periodic

A List of Periodic definitions identifying elementary entities on the boundary with each other.

Definition at line 228 of file gmsh_file_v2.h.

Referenced by lf::io::GmshReader::InitGmshFile(), and lf::io::operator<<().

◆ PhysicalEntities

std::vector<PhysicalEntity> lf::io::GMshFileV2::PhysicalEntities

A list of all Physical entities that have a name.

Note
If the user creates a physical entity in GMSH without a name then it is not listed in this collection.

Definition at line 62 of file gmsh_file_v2.h.

Referenced by lf::io::GmshReader::InitGmshFile(), and lf::io::operator<<().

◆ VersionNumber

std::string lf::io::GMshFileV2::VersionNumber

The version of GMSH of the msh file, equals usually 2.2.

Definition at line 21 of file gmsh_file_v2.h.

Referenced by lf::io::operator<<(), and lf::io::readGmshFileV2().


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