|
|
◆ readmesh()
| void readmesh |
( |
char * |
fname, |
|
|
int * |
ndim, |
|
|
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++ mesh file
- 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 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] | ne | Number of elements. |
| [in] | ldkc | Leading dimension of the array kc[]. (ldkc >= ns + 1 (ns is the number of nodes in the element)) |
| [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) + ns] point to the nodes of element k.
The type of element is as follows:
= 2: 3-node triangle.
= 3: 4-node quadrangle.
= 4: 4-node tetrahedron.
= 5: 8-node hexahedron. |
| [out] | le[] | Array le[lle] (lle >= *ne)
Label numbers of the elements. |
| [out] | nb | Number of elements defining boundaries. |
| [in] | ldks | Leading dimension of the array ks[]. (ldks >= nsb (nsb is the number of nodes in the boundary element)) |
| [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) + nsb] point to the nodes of boundary element k.
The type of element is as follows:
= 1: 2-node line.
= 2: 3-node triangle.
= 3: 4-node quadrangle. |
| [out] | lb[] | Array lb[llb] (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. |
|