XLPack 7.0
XLPack Numerical Library (Excel VBA) Reference Manual
Loading...
Searching...
No Matches

◆ ReadMsh2()

Sub ReadMsh2 ( FName As  String,
N As  Long,
X() As  Double,
Y() As  Double,
Ln() 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++ msh (2D) file [Experimental version]

Purpose
Read FEM mesh information from the file in FreeFEM++ msh (2D) format.
Parameters
[in]FnameInput file name.
[out]NNumber 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]Ln()Array Ln(LLn - 1) (LLn >= N) Label numbers of nodes.
[out]NeNumber of elements.
[out]Kc()Array Kc(LKc1 - 1, LKc2 - 1) (LKc1 >= 4, LKc2 >= Ne)
Connection matrix: Kc(0, K-1) is the type of K-th element, Kc(1, K-1), ..., Kc(3, K-1) point to the nodes of K-th element.
The type of element value is as follows:
= 2: 3-node triangle.
[out]Le()Array Le(LLe - 1) (LLe >= Ne)
Label numbers of the elements.
[out]NbNumber of elements defining boundaries.
[out]Ks()Array Ks(LKs1 - 1, LKs2 - 1) (LKs1 >= 3, LKs2 >= Nb)
Connection matrix for the boundary elements: Ks(0, K-1) is the type of K-th element, Ks(1, K-1), ..., Ks(2, K-1) point to the nodes of K-th element.
The type of element value is as follows:
= 1: 2-node line.
[out]Lb()Array Lb(LLb - 1) (LLb >= Nb)
Label numbers of the boundary sides.
[out]InfoReturn 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.
= 16: Unexpected end of file.