Vectfem: a generalized MATLAB-based vectorized algorithm for the computation of global matrix/force for finite elements of any type and approximation order in linear elasticity - Sadjiep Tchuigwa, Baurice Sylvain; Krmela, Jan; Pokorný, Jan; Krmelová, Vladimíra; Jilek, Petr (My University, 2024)
In this paper, we introduce a new vectorized MATLAB-based algorithm for eﬃcient serial computation of global matrix/force arising from ﬁnite element method (FEM) for meshes of any type and approximation order in linear elasticity. Because for-loops in MATLAB are very slow, we propose a modiﬁed process that takes advantage of vectorization and sparse assembly to achieve good performance while using the same memory as the standard algorithm. For this purpose, by using good programming practices, the implementation of this scheme is succinctly described and can be integrated into any MATLAB package dealing with FEM. Speciﬁcally, attention is paid to the calculation of the triplet (row index, column index, matrix components) as well as the assembly of the global stiﬀness matrix, mass matrix and force vector. Additionally, an extension of the proposed approach for Mindlin plate theory and functionally graded materials is outlined. Finally, the accuracy of this strategy is veriﬁed on selected numerical tests after comparing the obtained results with those of ABAQUS. In terms of performance, the study conducted on a set of meshes considering the standard algorithm and two other well-known MATLAB vectorized algorithms revealed that: (i) for a 2D beam problem meshed with P1-triangle elements, a speedup of about 8 and 15 is achieved with sparse and fsparse, respectively. (ii) for a 3D plate problem meshed with P1-tetrahedral elements, a speedup of about 4 and 8 is achieved with sparse and fsparse, respectively. When compared to ABAQUS performance, the proposed scheme results in a computational time that is about ﬁve times smaller.
Vectfem: zobecněný vektorizovaný algoritmus založený na MATLABu pro výpočet globální matice/síly pro konečné prvky libovolného typu a aproximace v lineární elasticitě
Keywords: finite element method; algorithm; vectorization; elasticity; sparse; MATLAB; metoda konečných prvků; algoritmus; vektorizace; pružnost; prostor; MATLAB