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

◆ mesh34()

void mesh34 ( int  nx,
int  ny,
int  nz,
int *  n,
double  sclx,
double  scly,
double  sclz,
double  x[],
double  y[],
double  z[],
int *  ne,
int  ldknc,
int  knc[],
int  ldks,
int  ks[],
int  lb[],
int *  nb,
int *  info 
)

Generates simple rectangular mesh for FEM (3D) (4-node tetrahedral element)

Purpose
This routine generates the simple rectangular mesh for FEM. (3D) (4-node tetrahedral element)
Parameters
[in]nxNumber of grids in the X-direction. (nx > 0)
[in]nyNumber of grids in the Y-direction. (ny > 0)
[in]nzNumber of grids in the Z-direction. (nz > 0)
[out]nTotal number of nodes. (= (nx + 1)*(ny + 1)*(nz + 1))
[in]sclxScale factor of x-coordinates.
[in]sclyScale factor of y-coordinates.
[in]sclzScale factor of z-coordinates.
[out]x[]Array x[lx] (lx >= n)
X-coordinates of nodes.
[out]y[]Array y[ly] (ly >= n)
Y-coordinates of nodes.
[out]z[]Array z[lz] (lz >= n)
Z-coordinates of nodes.
[out]neNumber of elements. (= 5*nx*ny*nz)
[in]ldkncLeading dimension of the two dimensional array knc[]. (ldknc >= 5 (number of nodes in the element + 1 (4-node tetrahedron)))
[out]knc[]Array knc[ldknc*lknc] (lknc >= ne)
Connection matrix: knc[ldknc*k] is the type of element k (= 4: 4-node tetrahedron), knc[1 + ldknc*k], ..., knc[4 + ldknc*k] point to the nodes of element k.
[in]ldksLeading dimension of the two dimensional array ks[]. (ldks >= 4 (number of nodes in the natural boundary element + 1 (3-node triangle)))
[out]ks[]Array ks[ldks*lks] (lks >= nb)
Connection matrix of natural boundary sides: ks[ldks*k] is the type of boundary element k (= 2: 3-node triangle), ks[1 + ldks*k], ..., ks[3 + ldks*k] point to the nodes of boundary element k.
[out]lb[]Array lb[llb] (llb >= nb)
Boundary side label.
= 1: front. (y = 0)
= 2: right. (x = 1)
= 3: back. (y = 1)
= 4: left. (x = 0)
= 5: bottom. (z = 0)
= 6: top. (z = 1)
[out]nbNumber of boundary sides. (= 4*(nx*ny + ny*nz + nz*nx))
[out]infoReturn code.
= 0: Normal return.
= i < 0: The (-i)-th argument is invalid or has an illegal value.