An efficient way to perform the assembly of finite element matrices in vector languages
Résumé
We describe different optimization techniques to perform the assembly of finite element matrices in vector languages (e.g. Matlab, Octave, Python), from the standard approach to recent vectorized ones, without any low level language used. We finally obtain a simple and efficient vectorized algorithm. A comparison is given with a compiled language such as C. Unlike what was expected and generally accepted, examples show that the performances of Matlab, Octave and Python are not as far as the ones of C. The principle of this assembly algorithm is general, we present it for a large class of partial differential operators in the scalar or vector cases in 2d and 3d, in the P1 finite elements case, with an application to linear elasticity. We present numerical results which illustrate the computational costs of the different approaches.
Origine | Fichiers produits par l'(les) auteur(s) |
---|