XLPack 7.0
XLPack Numerical Library (C API) Reference Manual
Loading...
Searching...
No Matches

◆ readmsh3()

void readmsh3 ( char *  fname,
int *  n,
double  x[],
double  y[],
double  z[],
int  ln[],
int *  ne,
int  ldkc,
int  kc[],
int  le[],
int *  nb,
int  ldks,
int  ks[],
int  lb[],
int *  info 
)

Read FEM mesh information from FreeFEM++ msh (3D) file

Purpose
Read FEM mesh information from the file in FreeFEM++ msh (3D) format.
Parameters
[in]fnameInput file name.
[out]nNumber of nodes.
[out]x[]Array x[lx] (lx >= n)
x-coordinates of nodes.
[out]y[]Array y[ly] (ly >= n)
y-coordinates of nodes.
[out]z[]Arraz z[lz] (lz >= n)
z-coordinates of nodes.
[out]ln[]Array ln[lln] (lln >= *n)
Label numbers of nodes.
[out]neNumber of elements.
[in]ldkcLeading dimension of the array kc[]. (ldkc >= 5)
[out]kc[]Array kc[ldkc*lkc] (lkc >= *ne)
Connection matrix: kc[ldkc*(k-1)] is the type of element k, kc[ldkc*(k-1) + 1], ..., kc[ldkc*(k-1) + 4] point to the nodes of element k.
The type of element is as follows:
= 4: 4-node tetrahedron.
[out]le[]Array le[lle] (lle >= *ne)
Label numbers of the elements.
[out]nbNumber of elements defining boundaries.
[in]ldksLeading dimension of the array ks[]. (ldks >= 4)
[out]ks[]Array ks[ldks*lks] (lks >= *nb)
Connection matrix of natural boundary sides: ks[ldks*(k-1)] is the type of boundary element k, ks[ldks*(k-1) + 1], ..., ks[ldks*(k-1) + 3] point to the nodes of boundary element k.
The type of element is as follows:
= 2: 3-node triangle.
[out]lb[]Array lb[llb] (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.