# MATLAB Programming for Finite Element Methods
## Arrangement of the ongoing Toolbox
We shall establish an iFEM-like package or a simplified version with certain extensions, named mFEM toolbox.
- fem: It includes all kinds of source code.
- example: All examples corresponding to fem and variational are placed in the example folder.
- tool: You can find functions involving visulization, boundary setting, mesh generation, and numerical integration and so on.
- pdedata: It provides information of equations associated with examples in example folder.
- meshdata: It stories mesh data used in all kinds of examples.
- matlabupdate: Some functions in the updated version of matlab are reconstructed with the same input and output. For example, contains.m ---> mycontains.m.
## Display and marking of polygonal meshes
We present some basic functions to show the polygonal meshes, including
marking of the nodes, elements and (boundary) edges.
## Auxiliary mesh data and setboundary.m
For the convenience of computation, we introduce some auxiliary mesh data. The idea stems from the treatment of triangulation in iFEM, which is generalized to polygonal meshes with certain modifications.
## 1-D problems
FEM1D.m and main_FEM1D.m introduce FEM programming of one dimensional problems. The assembly of stiffness matrix and load vector is explained in detail.
## 2-D Poisson equation
The source codes of solving the 2-D Poisson equation are presented, see Poisson.m, PoissonP2.m and PoissonP3.m.
## Linear elasticity equations
For linear elasticity problems, we give a unified programming framework. Specifically,
- The entrices of stiffness matrix are analyzed in the vectorized finite element space;
- The assembly is accomplished in the scalar FE space of each component.
We consider three forms of variational problems.
- The first and the second are commonly used in linear elastic problems in the form of strain and/or stress tensors.
- The third is just a variant of the second one with Laplacian replacing the strain tensors.
- For each formulation, sparse assembling indices and detailed explanation are given.
For the first two formulations, “Neumann” boundary conditions and Dirichlet boundary conditions are applied.
For the third fomulation, only Dirichlet conditions are used in view of the practical problems.
## Plate bending problems
- The plate bending problem is to describe the small transverse deformation of thin plates. A special case of the equilibrium equation is the biharmonic equation, which is a typical fourth-order partial differential equation. The nonconforming element is usually applied to reduce the degrees of freedom. Among the nonconforming finite elements in two dimensional case, the Morley element is perhaps the most interesting one. It has the least number of degrees of freedom on each element for fourth order boundary value problems as its shape function space consists of only quadratic polynomials.
It should be noted that the normal derivative values at the midpoint of interior edge sharing by two triangles have different signs. Apparently, this feature will be inherited by the corresponding local nodal basis functions given by the global ones restricted to the adjacent elements. The problem can be easily resolved by using signed edges.
A more general method is added by introducing signed stiffness matrix and signed load vector. Such prodecure can be extended to other problems with d.o.f.s varing in directions and can be furter applied to polygonal meshes.
- Besides Morley element, Zienkiewicz element and Adini element are two other commonly used nonconforming elements.
The former is incomplete cubic triangular element and the latter is incomplete bicubic rectangular element.
In addition to directional problems, all three non-conforming elements (and conforming elements) can be programmed in the unified framework given in the document.
## Mixed FEM
The mixed FEM is applied to solve the biharmonic equation, a special case of plate bending problems.
## Adaptive finite element method and Newest-node bisection
The adpative finite element method (AFEM) is introduced for the Poisson equation with homogeneous Dirichlet
conditions. Each step was explained in detail, viz. the loops of the form:
SOLVE -> ESTIMATE -> MARK -> REFINE
The newest-node bisection for the local mesh refinement was clearly stated thanks to the smart idea in iFEM.
The MATLAB codes are in Folder afem.
## Multigrid V-cycle method for linear elements
- We present a multigrid method by adding two grids one by one, so that the pseudo-code of V-cycle method can be obtained directly.
- The MG method can be also analyzed by using subspace correction method proposed by Xu Jinchao (for example, in iFEM).
However, it may be more straightforward by adding two grids.
- The programming of one-dimensional problems is described in detail, and the multigrid program is universal to all linear element problems.
- For 2D and 3D linear elements, only slight changes of 1D problems are needed since they can be regarded as 1D problems.
See the document for details (two-dimensional problem).
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
我们将建立一个类似iFEM的包或具有某些扩展的简化版本,称为mFEM工具箱。 fem:它包括各种源代码。 示例:所有与有限元和变分对应的示例都放在示例文件夹中。 工具:您可以找到涉及可视化、边界设置、网格生成和数值积分等功能。 pdedata:它提供了与示例文件夹中的示例相关联的方程的信息。 meshdata:它讲述了各种示例中使用的网格数据。 matlabupdate:更新版本的matlab中的一些函数是用相同的输入和输出重构的。例如,包含.m--->分枝杆菌.m。 多边形网格的显示和标记 我们提出了一些显示多边形网格的基本函数,包括节点、元素和(边界)边的标记。 辅助网格数据和setboundary.m 为了便于计算,我们引入了一些辅助网格数据。这个想法源于iFEM中对三角测量的处理,该处理被推广到经过某些修改的多边形网格。 FEM1D.m和main_FEM1D.m介绍了一维问题的有限元程序设计。详细说明了刚度矩阵和载荷矢量的组合。 给出了求解二维泊松方程的源代码,见Poisson.m、PoissonP2.m和PoissonP3.m。 对于线性弹性问题,我们给出了一个统一的规划框架
资源推荐
资源详情
资源评论
收起资源包目录
【基于Matlab】有限元方法的MATLAB编程 (197个子文件)
dellipsoid.cpp 3KB
dellipse.cpp 2KB
dsegment.cpp 1KB
LICENSE 34KB
amg.m 15KB
quadpts.m 8KB
PoissonP3.m 7KB
PlateBendingMorley_indicator.m 7KB
getH1error.m 6KB
PlateBendingZienkiewicz.m 6KB
getL2error3.m 6KB
getH1error3.m 5KB
quadpts1.m 5KB
PlateBendingMorley.m 5KB
PlateBendingMorley1.m 5KB
PoissonP2.m 4KB
quadpts3.m 4KB
elasticity.m 4KB
coarsenAMGa.m 4KB
PlateBendingAdini.m 4KB
distmesh2d.m 4KB
coarsenAMGrs.m 4KB
distmesh3d.m 4KB
elasticityNavier.m 4KB
uniformrefine3.m 3KB
elasticityVector.m 3KB
coarsenAMGc.m 3KB
getL2error.m 3KB
elasticityNavierVcycle.m 3KB
distmesh2dTemp.m 3KB
Poisson_indicator.m 3KB
edgeswapCL.m 3KB
elasticityNavierCR.m 3KB
setboundary.m 3KB
getL2error_Morley.m 3KB
getH1error1.m 3KB
Poisson.m 3KB
my_delaunay.m 3KB
PoissonCR.m 3KB
biharmonicMixedFEM.m 3KB
setboundary3.m 3KB
GaussQuad.m 2KB
distmesh.m 2KB
uniformtransferoperatorP3.m 2KB
cubemesh.m 2KB
mgVcycle.m 2KB
FEM1D.m 2KB
showmesh.m 2KB
interpolationAMGt.m 2KB
findedge.m 2KB
PoissonVcycle.m 2KB
elasticitydataLocking.m 2KB
Stokesdata.m 2KB
auxstructure.m 2KB
uniformtransferoperatorP2.m 2KB
mgoptions.m 2KB
main_elasticityNavierVcycle_coarsening.m 2KB
main_elasticityNavier.m 2KB
getL2error_Zienkiewicz.m 2KB
interpolationAMGs.m 2KB
main_elasticity.m 2KB
getL2error1.m 2KB
main_elasticityNavierCR.m 2KB
FEM1DVcycle.m 2KB
interpolationAMGa.m 2KB
gradbasis3.m 2KB
edgeswap.m 2KB
main_biharmonicMixedFEM.m 2KB
getL2error_Adini.m 2KB
meshuntitled.m 2KB
uniformrefine.m 2KB
interpolationAMGn.m 2KB
showrateh.m 2KB
biharmonicdata_Lshape.m 1KB
Poisson_indicator_old.m 1KB
interpolationAMGsa.m 1KB
main_FEM1DVcycle_coarsening.m 1KB
main_FEM1DVcycle_refining.m 1KB
uniformtransferoperator.m 1KB
main_FEM1D.m 1KB
simplexvolume.m 1KB
disptable.m 1KB
distmesh_benchmark2d.m 1KB
pdedata1D.m 1KB
dof3edge.m 1KB
main_PoissonP3Vcycle_coarsening.m 1KB
main_PoissonP2Vcycle_coarsening.m 1KB
main_PoissonP2.m 1KB
main_Poisson.m 1KB
bisect.m 1KB
Mesh2DVcycle.m 1KB
main_PoissonCR.m 1KB
biharmonicdata.m 1KB
main_PoissonVcycle_coarsening.m 1KB
main_PoissonP3.m 1KB
main_PoissonVcycle_refining.m 1KB
circumcenter.m 1KB
Poissondata1.m 1KB
dof3face.m 1KB
Poissondata_afem.m 1KB
共 197 条
- 1
- 2
资源评论
- Snow8709222023-08-02感谢作者, #完美解决问题
心兰相随引导者
- 粉丝: 775
- 资源: 5486
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功