有限元基本数据结构

该文描述了有限元方法中使用的基本数据,变量的符号说明,以及计算一些基本数据的流程,包括 esp (elements surrounding points),psp (points surrounding points),ese (elements surrounding elements), edges 等数据的计算过程。还分析了Edge-based数据结构与element-based的计算量。

变量说明

基本的离散数据

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
nelem,单元数目
npoin,节点数目
nedge,边数
npsup,围绕一点的点数
ndim,空间维度
nnode,单元中节点数目
inpoel(1:nnode, 1:nelem),连接数组,存储每个单元中节点编号index-position-element
coord(1:ndimn, 1:npoin) ,坐标数组,存储每个节点的坐标。数组inpoel,coord定义了几何的网格离散方式
nunkp,每个节点上的未知量数目
nunke,每个单元上的未知量数目
unknp(1:nunkp, 1:npoin),节点上的未知量
unkne(1:nunke, 1:nelem),单元上的未知量
nconi,每个边界点上的边界条件数目
nboup,边界上的节点数目
bcond(1:nconi, 1:nboup),每个边界点上的边界条件
bcond(1,iboup),存储边界上第i点的编号
bcond(2:nconi,iboup),存储边界上第i点的边界条件

派生数据

esup (elements surrounding points)

由inpoel派生出的,包含两个数组

1
2
esup1(1:mesup),存储围绕节点的单元编号
esup2(1:npoin+1),存储围绕节点的单元的位置

比如围绕节点 ipoin 的单元存储位置为esup1( esup2(ipoin)+1:esup2(ipoin+1) ),参考下图
esp

计算这两个数组过程
eps_code

psup (points surrounding points)

同样包含两个数组

1
2
psup1(1:mpsup),存储围绕节点的节点编号
psup2(1:npoin+1),存储围绕节点的节点的位置

比如围绕节点 ipoin 的节点存储位置为psup1( psup2(ipoin)+1:psup2(ipoin+1) ).

计算这两个数组需要用到 esup, 具体过程如下
psp_code

esuel (elements surrounding elements)

1
2
esuel(1:nfael, 1:nelem),存储围绕每个单元的单元编号
nfael,每个单元的边界面数目

计算过程如下

ese_code

其中某些辅助数组含义如下

ese

edges

边存储结构常用来减少线性单元的计算量和存储量,存储离散网格中每条边的端点,用一个数组存储

1
inpoed(1:2,1:nedge),存储离散网格中边的端点, 其中inpoed(1, iedge) < inpoed(2, iedge).

对于线性单元,物理上的边 $\vec{ij}$ 与数值上的边 $K_{ij}$是一一对应的,数值上的边表示矩阵中的非零元素。

可以直接利用 psp 进行计算得到
edge

形状函数及其导数

1
2
3
4
geome(1:ndimn*nnode, 1:nelem),存储每个单元中形状函数的导数
geome(ndimn*nnode+1,1:nelem),存储每个单元的体积
cedge(ncoef,nedge),每条边上的系数

有限元中线性单元中点,边,单元的数目

  • 三角形
1
2
3
nelem = 2*npoin
nedge = 3*npoin
npsup = 6*npoin
  • 四面体
    1
    2
    3
    nelem = 5.5*npoin
    nedge = 7*npoin
    npsup = 14*npoin

Edge-based数据结构

不同形式数据结构的计算量

  • Laplacian组装花销以及计算FLOPS花销
    laplacian

  • RHS组装花销以及计算FLOPS花销