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

◆ mesh23()

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

Generates simple rectangular mesh for FEM (2D) (Triangular element)

Purpose
This routine generates the simple rectangular mesh for FEM. (2D) (triangular element)
Parameters
[in]nxNumber of grids in the x-direction. (nx > 0)
[in]nyNumber of grids in the y-direction. (ny > 0)
[out]nTotal number of nodes. (= (nx + 1)*(ny + 1))
[in]sclxScale factor of x-coordinates.
[in]sclyScale factor of y-coordinates.
[out]x[]Array x[lx] (lx >= n)
x-coordinates of nodes.
[out]y[]Array y[ly] (ly >= n)
y-coordinates of nodes.
[out]neNumber of elements. (= 2*nx*ny)
[in]ldkncLeading dimension of the two dimensional array knc[]. (ldknc >= 4 (number of nodes in the element + 1 (3-node triangle)))
[out]knc[]Array knc[ldknc*lknc] (lknc >= ne)
Connection matrix: knc[ldknc*k] is the type of element k (= 2: 3-node triangle), knc[1 + ldknc*k], ..., knc[3 + ldknc*k] point to the nodes of element k.
[in]ldksLeading dimension of the two dimensional array ks[]. (ldks >= 3 (number of nodes in the natural boundary element + 1 (2-node line element)))
[out]ks[]Array ks[ldks*lks] (lks >= nb)
Connection matrix of natural boundary sides: ks[ldks*k] is the type of boundary element k (= 1: 2-node line element), ks[1 + ldks*k] and ks[2 + 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)
[out]nbNumber of boundary sides. (= 2*(nx + ny))
[out]infoReturn code.
= 0: Normal return.
= i < 0: The (-i)-th argument is invalid or has an illegal value.