Mesh
Current Version
4
Subtype of
Serializable
Fields
Entity/Object
Variable
Description
integer
Version.
integer
d
Space dimension (if equal to 0 no more fields).
integer
np
Number of mesh vertices.
integer
Lowest mesh vertex index.
double[d][np]
p
Mesh points.
integer
nt
Number of element types (equals the number of repeats of the following fields).
string
Element type.
integer
nep
Number of vertices per element.
integer
ne
Number of elements.
integer[ne][nep]
elem
Matrix of point indices for each element.
integer
ndom
Number of geometric entity values.
integer[ndom]
dom
Vector of geometric entity labels for each element.
Description
The geometric entity numbering for points, edges, and boundaries must start from 0 and the geometric entity numbering for domains must start from 1 when defining a mesh through a COMSOL Multiphysics mesh file.
For information about the local mesh numbering for the mesh element type in COMSOL Multiphysics, see
Mesh Element Numbering Conventions
.
Example
The following displays a mesh with triangular elements on a unit square. Neither point nor edge elements are present.
# Major & minor version
0 1
1 # number of tags
# Tags
5 mesh1
1 # number of types
# Types
3 obj
# --------- Object 0 ----------
0 0 1
4 Mesh # class
4 # version
2 # sdim
4 # number of mesh vertices
0 # lowest mesh vertex index
# Mesh vertex coordinates
0 1
0 0
1 1
1 0
1 # number of element types
# Type #0
3 tri # type name
3 # number of vertices per element
2 # number of elements
# Elements
0 1 2
3 2 1
2 # number of geometric entity indices
# Geometric entity indices
1
1