We present efficient MATLAB implementations of the lowest-order primal hybrid finite element method (FEM) for linear second-order elliptic and parabolic problems with mixed boundary conditions in two spatial dimensions. We employ the Crank-Nicolson finite difference scheme for the complete discrete setup of the parabolic problem. All the codes presented are fully vectorized using matrix-wise array operations. Numerical experiments are conducted to show the performance of the software.
翻译:本文介绍了最低阶原始混合有限元法在二维空间中求解具有混合边界条件的线性二阶椭圆和抛物线问题的高效MATLAB实现。对于抛物线问题的完整离散化设置,我们采用Crank-Nicolson有限差分格式。所有给出的代码均通过矩阵级数组操作实现完全向量化。通过数值实验验证了软件的性能。