参考自http://geuz.org/gmsh/doc/texinfo/gmsh.html#MSH-binary-file-format
$MeshFormat version-number file-type data-size $EndMeshFormat $PhysicalNames number-of-names physical-dimension physical-number "physical-name" … $EndPhysicalNames $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 $Periodic number-of-periodic-entities dimension slave-entity-tag master-entity-tag number-of-nodes slave-node-number master-node-number … $EndPeriodic $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 … … $EndElementNodeData $InterpolationScheme "name" number-of-element-topologies elm-topology number-of-interpolation-matrices num-rows num-columns value … … $EndInterpolationScheme
elm-typedefines the geometrical type of the n-th element:
12-node line.
23-node triangle.
34-node quadrangle.
44-node tetrahedron.
58-node hexahedron.
66-node prism.
75-node pyramid.
83-node second order line (2 nodes associated with the vertices and 1 with the edge).
96-node second order triangle (3 nodes associated with the vertices and 3 with the edges).
109-node second order quadrangle (4 nodes associated with the vertices, 4 with the edges and 1 with the face).
1110-node second order tetrahedron (4 nodes associated with the vertices and 6 with the edges).
1227-node second order hexahedron (8 nodes associated with the vertices, 12 with the edges, 6 with the faces and 1 with the volume).
1318-node second order prism (6 nodes associated with the vertices, 9 with the edges and 3 with the quadrangular faces).
1414-node second order pyramid (5 nodes associated with the vertices, 8 with the edges and 1 with the quadrangular face).
151-node point.
168-node second order quadrangle (4 nodes associated with the vertices and 4 with the edges).
1720-node second order hexahedron (8 nodes associated with the vertices and 12 with the edges).
1815-node second order prism (6 nodes associated with the vertices and 9 with the edges).
1913-node second order pyramid (5 nodes associated with the vertices and 8 with the edges).
209-node third order incomplete triangle (3 nodes associated with the vertices, 6 with the edges)
2110-node third order triangle (3 nodes associated with the vertices, 6 with the edges, 1 with the face)
2212-node fourth order incomplete triangle (3 nodes associated with the vertices, 9 with the edges)
2315-node fourth order triangle (3 nodes associated with the vertices, 9 with the edges, 3 with the face)
2415-node fifth order incomplete triangle (3 nodes associated with the vertices, 12 with the edges)
2521-node fifth order complete triangle (3 nodes associated with the vertices, 12 with the edges, 6 with the face)
264-node third order edge (2 nodes associated with the vertices, 2 internal to the edge)
275-node fourth order edge (2 nodes associated with the vertices, 3 internal to the edge)
286-node fifth order edge (2 nodes associated with the vertices, 4 internal to the edge)
2920-node third order tetrahedron (4 nodes associated with the vertices, 12 with the edges, 4 with the faces)
3035-node fourth order tetrahedron (4 nodes associated with the vertices, 18 with the edges, 12 with the faces, 1 in the volume)
3156-node fifth order tetrahedron (4 nodes associated with the vertices, 24 with the edges, 24 with the faces, 4 in the volume)
9264-node third order hexahedron (8 nodes associated with the vertices, 24 with the edges, 24 with the faces, 8 in the volume)
93125-node fourth order hexahedron (8 nodes associated with the vertices, 36 with the edges, 54 with the faces, 27 in the volume)
example:
$MeshFormat 2.2 0 8 $EndMeshFormat $Nodes 6 six mesh nodes: 1 0.0 0.0 0.0 node #1: coordinates (0.0, 0.0, 0.0) 2 1.0 0.0 0.0 node #2: coordinates (1.0, 0.0, 0.0) 3 1.0 1.0 0.0 etc. 4 0.0 1.0 0.0 5 2.0 0.0 0.0 6 2.0 1.0 0.0 $EndNodes $Elements 2 two elements: 1 3 2 99 2 1 2 3 4 quad #1: type 3, physical 99, elementary 2, nodes 1 2 3 4 2 3 2 99 2 2 5 6 3 quad #2: type 3, physical 99, elementary 2, nodes 2 5 6 3 $EndElements $NodeData 1 one string tag: "A scalar view" the name of the view ("A scalar view") 1 one real tag: 0.0 the time value (0.0) 3 three integer tags: 0 the time step (0; time steps always start at 0) 1 1-component (scalar) field 6 six associated nodal values 1 0.0 value associated with node #1 (0.0) 2 0.1 value associated with node #2 (0.1) 3 0.2 etc. 4 0.0 5 0.2 6 0.4 $EndNodeData
当element为这种形式:
207 5 2 1 1 820 1201 856 316 1161 1204 1203 833
意为,第207个element,5:六面体,2 1 1 暂时我没有管,后面为六面体的八个顶点
顶点顺序:
Hexahedron: Hexahedron20: Hexahedron27:
v
3----------2 3----13----2 3----13----2
|\ ^ |\ |\ |\ |\ |\
| \ | | \ | 15 | 14 |15 24 | 14
| \ | | \ 9 \ 11 \ 9 \ 20 11 \
| 7------+---6 | 7----19+---6 | 7----19+---6
| | +-- |-- | -> u | | | | |22 | 26 | 23|
0---+---\--1 | 0---+-8----1 | 0---+-8----1 |
\ | \ \ | \ 17 \ 18 \ 17 25 \ 18
\ | \ \ | 10 | 12| 10 | 21 12|
\| w \| \| \| \| \|
4----------5 4----16----5 4----16----5
再如:
3485 14 2 1 1 410 405 409 402 588 436 448 1355 439 1230 444 906 993 449
意为,第3485个element,14:四棱锥,2 1 1 暂时我没有管,后面5个为四棱锥的八个顶点,在后面8个为四棱锥的八条边,最后一个为底面
Pyramid: Pyramid13: Pyramid14:
4 4 4
,/|\ ,/|\ ,/| ,/ .‘|\ ,/ .‘|\ ,/ .‘| ,/ | | \ ,/ | | \ ,/ | | ,/ .‘ | `. ,/ .‘ | `. ,/ .‘ | `.
,/ | ‘. \ ,7 | 12 \ ,7 | 12 ,/ .‘ w | \ ,/ .‘ | \ ,/ .‘ | ,/ | ^ | \ ,/ 9 | 11 ,/ 9 | 11
0----------.‘--|-3 `. 0--------6-.‘----3 `. 0--------6-.‘----3 `.
`\ | | `\ \ `\ | `\ \ `\ | `\ `\ .‘ +----`\ - \ -> v `5 .‘ 10 \ `5 .‘ 13 10 `\ | `\ `\ \ `\ | `\ \ `\ | `\ \
`\.‘ `\ `\` `\.‘ `\` `\.‘ `\`
1----------------2 1--------8-------2 1--------8-------2
` u
版权声明:本文为博主原创文章,未经博主允许不得转载。
原文地址:http://blog.csdn.net/hjq376247328/article/details/47040133