An efficient way to assemble finite element matrices in vector languages

François Cuvelier 1 Caroline Japhet 1, * Gilles Scarella 1
* Auteur correspondant
1 MCS
LAGA - Laboratoire Analyse, Géométrie et Applications
Abstract : 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, Scilab, R, Julia, 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 P1 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.
Liste complète des métadonnées

https://hal-univ-paris13.archives-ouvertes.fr/hal-00931066
Contributeur : Caroline Japhet <>
Soumis le : mercredi 15 avril 2015 - 12:10:41
Dernière modification le : mardi 22 mai 2018 - 20:40:10
Document(s) archivé(s) le : lundi 14 septembre 2015 - 09:08:01

Fichiers

paperBITrevised.pdf
Fichiers produits par l'(les) auteur(s)

Identifiants

  • HAL Id : hal-00931066, version 2
  • ARXIV : 1401.3301

Citation

François Cuvelier, Caroline Japhet, Gilles Scarella. An efficient way to assemble finite element matrices in vector languages. 2015. 〈hal-00931066v2〉

Partager

Métriques

Consultations de la notice

420

Téléchargements de fichiers

2810