|
|
◆ readgmsh22()
| void readgmsh22 |
( |
char * |
fname, |
|
|
int * |
n, |
|
|
double |
x[], |
|
|
double |
y[], |
|
|
double |
z[], |
|
|
int * |
ne, |
|
|
int |
ldkc, |
|
|
int |
kc[], |
|
|
int |
ldlb, |
|
|
int |
lb[], |
|
|
int * |
info |
|
) |
| |
Read FEM mesh information from Gmsh file
- Purpose
- Read FEM mesh information from the file in Gmsh format (Version 2.2).
- Only $MeshFormat, $Nodes and $Elements sections are to be read. Other sections will be skipped.
- In the $Elements section, the element information defining boundaries (e.g. line for 2D, triangle for 3D) are included as well as those defining FEM space (e.g. triangle for 2D, tetrahenron for 3D).
- In $Nodes and $Elements sections, node numbers and element numbers must be continuous numbers, i.e. 1 to n and 1 to ne, respectively, and must not be duplicated. However, they need not be ordered.
- Parameters
-
| [in] | fname | Input file name. |
| [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] | 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:
= 1: 2-node line.
= 2: 3-node triangle.
= 3: 4-node quadrangle.
= 4: 4-node tetrahedron.
= 5: 8-node hexahedron.
= 6: 6-node prism.
= 7: 5-node pyramid.
= 8: 3-node second order line.
= 10: 9-node second order quadrangle.
= 11: 10-node second order tetrahedron.
= 12: 27-node second order hexahedron.
= 13: 18-node second order prism.
= 14: 14-node second order pyramid.
= 15: 1-node point.
= 16: 8-node second order quadrangle.
= 17: 20-node second order hexahedron.
= 18: 15-node second order prism.
= 19: 13-node second order pyramid.
= 20: 9-node third order incomplete triangle.
= 21: 10-node third order triangle.
= 22: 12-node fourth order incomplete triangle.
= 23: 15-node fourth order triangle.
= 24: 15-node fifth order incomplete triangle.
= 25: 21-node fifth order complete triangle.
= 26: 4-node third order edge.
= 28: 6-node fifth order edge.
= 29: 20-node third order tetrahedron.
= 30: 35-node fourth order tetrahedron.
= 31: 56-node fifth order tetrahedron.
= 92: 64-node third order hexahedron.
= 93: 125-node fourth order hexahedron. |
| [in] | ldlb | Leading dimension of the array lb[]. (ldlb >= nlb + 1 (nlb is the number of labels for the element)) |
| [out] | lb[] | Array lb[ldlb*llb] (llb >= *ne)
Label numbers of the elements: lb[ldlb*(k-1)] is the number of labels for element k, lb[ldlb*(k-1) + 1], ..., lb[ldlb*(k-1) + nlb] are the labels for the element k.
|
| [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. |
|