An efficient way to assemble finite element matrices in vector languages

被引:22
作者
Cuvelier, Francois [1 ]
Japhet, Caroline [1 ,2 ]
Scarella, Gilles [1 ]
机构
[1] Univ Paris 13, Sorbonne Paris Cite, LAGA, CNRS UMR 7539, 99 Ave J-B Clement, F-93430 Villetaneuse, France
[2] INRIA Paris Rocquencourt, BP 105, F-78153 Le Chesnay, France
关键词
Finite elements; Matrix assembly; Vectorization; Vector languages; Matlab; Octave; !text type='Python']Python[!/text;
D O I
10.1007/s10543-015-0587-4
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Efficient Matlab codes in 2D and 3D have been proposed recently to assemble finite element matrices. In this paper we present simple, compact and efficient vectorized algorithms, which are variants of these codes, in arbitrary dimension, without the use of any lower level language. They can be easily implemented in many vector languages (e.g. Matlab, Octave, Python, R, Julia, Scilab, C++ with STL,...). The principle of these techniques is general, we present it for the assembly of several finite element matrices in arbitrary dimension, in the finite element case. We also provide an extension of the algorithms to the case of a system of PDE's. Then we give an extension to piecewise polynomials of higher order. We compare numerically the performance of these algorithms in Matlab, Octave and Python, with that in FreeFEM++ and in a compiled language such as C. Examples show that, unlike what is commonly believed, the performance is not radically worse than that of C : in the best/worst cases, selected vector languages are respectively 2.3/3.5 and 2.9/4.1 times slower than C in the scalar and vector cases. We also present numerical results which illustrate the computational costs of these algorithms compared to standard algorithms and to other recent ones.
引用
收藏
页码:833 / 864
页数:32
相关论文
共 26 条
  • [1] Matlab implementation of the finite element method in elasticity
    Alberty, J
    Carstensen, C
    Funken, SA
    Klose, R
    [J]. COMPUTING, 2002, 69 (03) : 239 - 263
  • [2] Fast MATLAB assembly of FEM matrices in 2D and 3D: Edge elements
    Anjam, I.
    Valdman, J.
    [J]. APPLIED MATHEMATICS AND COMPUTATION, 2015, 267 : 252 - 263
  • [3] [Anonymous], 2012, FINITE ELEMENT METHO, DOI DOI 10.1002/9781118569764
  • [4] Chen L., 2011, PROGRAMMING FINITE E
  • [5] Chen L., 2013, IFEM MATLAB SOFTWARE
  • [6] Chen Z., 2005, Finite Element Methods and Their Applications
  • [7] Ciarlet P.G., 2002, FINITE ELEMENT METHO, V40
  • [8] Cuvelier F., 2015, OPTFEM PACKAGES
  • [9] Cuvelier F., 2014, EFFICIENT WAY PERFOR
  • [10] MILAMIN: MATLAB-based finite element method solver for large problems
    Dabrowski, M.
    Krotkiewski, M.
    Schmid, D. W.
    [J]. GEOCHEMISTRY GEOPHYSICS GEOSYSTEMS, 2008, 9