manpagez: man pages & more
info gmsh
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

9.1 MSH ASCII file format

The MSH ASCII file format contains one mandatory section giving information about the file ($MeshFormat), followed by several optional sections defining the nodes ($Nodes), elements ($Elements), region names ($PhysicalName) and post-processing datasets ($NodeData, $ElementData, $ElementNodeData). Sections can be repeated in the same file, and post-processing sections can be put into separate files (e.g. one file per time step).

The format is defined as follows:

 
$MeshFormat
version-number file-type data-size
$EndMeshFormat
$Nodes
number-of-nodes
node-number x-coord y-coord z-coord
…
$EndNodes
$Elements
number-of-elements
elm-number elm-type number-of-tags < tag > … node-number-list
…
$EndElements
$PhysicalNames
number-of-names
phyical-number "physical-name"
…
$EndPhysicalNames
$NodeData
number-of-string-tags
< "string-tag" >
…
number-of-real-tags
< real-tag >
…
number-of-integer-tags
< integer-tag >
…
node-number value …
…
$EndNodeData
$ElementData
number-of-string-tags
< "string-tag" >
…
number-of-real-tags
< real-tag >
…
number-of-integer-tags
< integer-tag >
…
elm-number value …
…
$EndElementData
$ElementNodeData
number-of-string-tags
< "string-tag" >
…
number-of-real-tags
< real-tag >
…
number-of-integer-tags
< integer-tag >
…
elm-number number-of-nodes-per-element value …
…
$ElementEndNodeData

where

version-number

is a real number equal to 2.0

file-type

is an integer equal to 0 in the ASCII file format.

data-size

is an integer equal to the size of the floating point numbers used in the file (currently only data-size = sizeof(double) is supported).

number-of-nodes

is the number of nodes in the mesh.

node-number

is the number (index) of the n-th node in the mesh; node-number must be a postive (non-zero) integer. Note that the node-numbers do not necessarily have to form a dense nor an ordered sequence.

x-coord y-coord z-coord

are the floating point values giving the X, Y and Z coordinates of the n-th node.

number-of-elements

is the number of elements in the mesh.

elm-number

is the number (index) of the n-th element in the mesh; elm-number must be a postive (non-zero) integer. Note that the elm-numbers do not necessarily have to form a dense nor an ordered sequence.

elm-type

defines the geometrical type of the n-th element:

1

2-node line.

2

3-node triangle.

3

4-node quadrangle.

4

4-node tetrahedron.

5

8-node hexahedron.

6

6-node prism.

7

5-node pyramid.

8

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

9

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

10

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

11

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

12

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

13

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

14

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

15

1-node point.

16

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

17

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

18

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

19

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

See below for the ordering of the nodes.

number-of-tags

gives the number of integer tags that follow for the n-th element. By default, the first tag is the number of the physical entity to which the element belongs; the second is the number of the elementary geometrical entity to which the element belongs; the third is the number of a mesh partition to which the element belongs. All tags must be postive integers, or zero. A zero tag is equivalent to no tag.

node-number-list

is the list of the node numbers of the n-th element. The ordering of the nodes is given in Node ordering; for second order elements, the first order nodes are given first, followed by the nodes associated with the edges, followed by the nodes associated with the quadrangular faces (if any), followed by the nodes associated with the volume (if any). The ordering of these additional nodes follows the ordering of the edges and quadrangular faces given in Node ordering.

number-of-string-tags

gives the number of string tags that follow. By default the first string-tag is interpreted as the name of the post-processing view, and the second as the name of the interpolation scheme.

number-of-real-tags

gives the number of real number tags that follow.

number-of-integer-tags

gives the number of integer tags that follow. By default the first integer-tag is interpreted as a time step number, the second as the number of field components of the data in the view, the third as the number of entities (nodes or elements) in the view, and the fourth as the partition index for the view data.

number-of-nodes-per-elements

gives the number of node values for an element in an element-based view.

value

is a real number giving the value associated with a node or an element. For NodeData (respectively ElementData) views, there are ncomp values per node (resp. per element), where ncomp is the number of field components. For ElementNodeData views, there are ncomp times number-of-nodes-per-elements values per element.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© manpagez.com 2000-2024
Individual documents may contain additional copyright information.