|
|
◆ ReadMesh()
| Sub ReadMesh |
( |
FName As |
String, |
|
|
Ndim As |
Long, |
|
|
N As |
Long, |
|
|
X() As |
Double, |
|
|
Y() As |
Double, |
|
|
Z() As |
Double, |
|
|
Lp() As |
Long, |
|
|
Ne As |
Long, |
|
|
Kc() As |
Long, |
|
|
Le() As |
Long, |
|
|
Nb As |
Long, |
|
|
Ks() As long |
, |
|
|
Lb() As |
Long, |
|
|
Info As |
Long |
|
) |
| |
Read FEM mesh information from FreeFEM++ mesh file [Experimental version]
- Purpose
- Read FEM mesh information from the file in FreeFEM++ mesh (MEDIT) format.
Only the information with the following keywords will be read. Others will be regarded as format errors.
MeshVersionFormatted (= 2), Dimension (= 2 or 3), Vertices, Edges, Triangles, Quadrilaterals, Tetrahedra, Hexaedra.
- Parameters
-
| [in] | Fname | Input file name. |
| [out] | Ndim | Dimension (2 or 3). |
| [out] | N | Number of points. |
| [out] | X() | Array X(LX - 1) (LX >= N)
X coordinates of points. |
| [out] | Y() | Array Y(LY - 1) (LY >= N)
Y coordinates of points. |
| [out] | Z() | Array Z(LZ - 1) (LZ >= N)
Z coordinates of points. |
| [out] | Lp() | Array Lp(LLp - 1) (LLp >= N) Label of each node. |
| [out] | Ne | Number of elements. |
| [out] | Kc() | Array Kc(LKc1 - 1, LKc2 - 1) (LKc1 >= Ns + 1, LKc2 >= Ne (Ns is the number of nodes in the element))
Connection matrix: Kc(0, K-1) is the type of K-th element, Kc(1, K-1), ..., Kc(4, K-1) point to the nodes of K-th element.
The type of element value is as follows:
= 2: 3-node triangle.
= 3: 4-node quadrangle.
= 4: 4-node tetrahedron.
= 5: 8-node hexahedron. |
| [out] | Le() | Array Le(LLe - 1) (LLe >= Ne)
Label numbers of the elements. |
| [out] | Nb | Number of elements defining boundaries. |
| [out] | Ks() | Array Ks(LKs1 - 1, LKs2 - 1) (LKs1 >= Nsb + 1, LKs2 >= Nb (Nsb is the number of nodes in the boundary element))
Connection matrix for the boundary elements: Ks(0, K-1) is the type of K-th element, Ks(1, K-1), ..., Ks(3, K-1) point to the nodes of K-th element.
The type of element value is as follows:
= 1: 2-node line.
= 2: 3-node triangle.
= 3: 4-node quadrangle. |
| [out] | Lb() | Array Lb(LLb - 1) (LLb >= Nb)
Label numbers of the boundary sides. |
| [out] | Info | Return code.
= 0: Normal return.
= i < 0: The (-i)-th argument is invalid or has an illegal value.
= 11: File open error.
= 13: Data format error.
= 14: Data value error.
= 15: Section sequence error.
= 16: Unexpected end of file. |
|