We use cookies to ensure that we give you the best experience on our website. By continuing to browse this repository, you give consent for essential cookies to be used. You can read more about our Privacy and Cookie Policy.

Durham Research Online
You are in:

Fast native-MATLAB stiffness assembly for SIPG linear elasticity.

Bird, R.E. and Coombs, W.M. and Giani, S. (2017) 'Fast native-MATLAB stiffness assembly for SIPG linear elasticity.', Computers and mathematics with applications., 74 (12). pp. 3209-3230.


When written in MATLAB the finite element method (FEM) can be implemented quickly and with significantly fewer lines, when compared to compiled code. MATLAB is also an attractive environment for generating bespoke routines for scientific computation as it contains a library of easily accessible inbuilt functions, effective debugging tools and a simple syntax for generating scripts. However, there is a general view that MATLAB is too inefficient for the analysis of large problems. Here this preconception is challenged by detailing a vectorised and blocked algorithm for the global stiffness matrix computation of the symmetric interior penalty discontinuous Galerkin (SIPG) FEM. The major difference between the computation of the global stiffness matrix for SIPG and conventional continuous Galerkin approximations is the requirement to evaluate inter-element face terms, this significantly increases the computational effort. This paper focuses on the face integrals as they dominate the computation time and have not been addressed in the existing literature. Unlike existing optimised finite element algorithms available in the literature the paper makes use of only native MATLAB functionality and is compatible with GNU Octave. The algorithm is primarily described for 2D analysis for meshes with homogeneous element type and polynomial order. The same structure is also applied to, and results presented for, a 3D analysis. For problem sizes of 106 degrees of freedom (DOF), 2D computations of the local stiffness matrices were at least ≈24 times faster, with 13.7 times improvement from vectorisation and a further 1.8 times improvement from blocking. The speed up from blocking and vectorisation is dependent on the computer architecture, with the range of potential improvements shown for two architectures in this paper.

Item Type:Article
Full text:(AM) Accepted Manuscript
Available under License - Creative Commons Attribution.
Download PDF
Full text:(VoR) Version of Record
Available under License - Creative Commons Attribution.
Download PDF
Publisher Web site:
Publisher statement:© 2017 The Author(s). Published by Elsevier Ltd. This is an open access article under the CC BY license ( by/4.0/).
Date accepted:15 August 2017
Date deposited:17 August 2017
Date of first online publication:09 September 2017
Date first made open access:No date available

Save or Share this output

Look up in GoogleScholar