|
|
◆ mesh23()
| def mesh23 |
( |
nx |
, |
|
|
ny |
, |
|
|
x |
, |
|
|
y |
, |
|
|
knc |
, |
|
|
ks |
, |
|
|
lb |
, |
|
|
sclx |
= 1.0, |
|
|
scly |
= 1.0 |
|
) |
| |
Generates simple rectangular mesh for FEM (2D) (Triangular element)
- Purpose
- This routine generates the simple rectangular mesh for FEM. (2D) (triangular element)
- Returns
- (info, n, ne, nb)
info (int):
= 0: Normal return.
= i < 0: The (-i)-th argument is invalid or has an illegal value.
n (int):
Total number of nodes. (= (nx + 1)*(ny + 1))
ne (int):
Number of elements. (= 2*nx*ny)
nb (int):
Number of boundary sides. (= 2*(nx + ny))
- Parameters
-
| [in] | nx | Number of grids in the x-direction. (nx > 0) |
| [in] | ny | Number of grids in the y-direction. (ny > 0) |
| [out] | x | Numpy ndarray (1-dimensional, float, n)
x-coordinates of nodes. |
| [out] | y | Numpy ndarray (1-dimensional, float, n)
y-coordinates of nodes. |
| [out] | knc | Numpy ndarray (2-dimensional, int32, ldknc x ne) (ldknc = 4 (number of nodes in the element + 1) (3-node triangle))
Connection matrix: knc[k, 0] is the type of element k (= 2: 3-node triangle), knc[k, 1], ..., knc[k, 3] point to the nodes of element k. |
| [out] | ks | Numpy ndarray (2-dimensional, int32, ldks x nb) (ldks = 3 (number of nodes in the natural boundary element + 1) (2-node line element))
Connection matrix of natural boundary sides: ks[k, 0] is the type of boundary element k (= 1: 2-node line element), ks[k, 1] and ks[k, 2] point to the nodes of boundary element k. |
| [out] | lb | Numpy ndarray (1-dimensional, int32, nb)
Boundary side label.
= 1: front. (y = 0)
= 2: right. (x = 1)
= 3: back. (y = 1)
= 4: left. (x = 0) |
| [in] | sclx | (Optional)
Scale factor of x-coordinates. (default = 1) |
| [in] | scly | (Optional)
Scale factor of y-coordinates. (default = 1) |
|