Code covered by the BSD License  

Highlights from
Fast assembly of stiffness and matrices in finite element method using nodal elements

Be the first to rate this file! 58 Downloads (last 30 days) File Size: 841 KB File ID: #27826
image thumbnail

Fast assembly of stiffness and matrices in finite element method using nodal elements


Jan Valdman


03 Jun 2010 (Updated )

vectorization of FEM matrices assembly

| Watch this File

File Information

This code demonstrates vectorization concepts from paper
Talal Rahman and Jan Valdman: Fast MATLAB assembly of FEM matrices in 2D and 3D: nodal elements, Applied Mathematics and Computation 219, 7151–7158 (2013).

To run the code, call

"start_assembly_P1_3D" or

in the Matlab window to perform tests for nodal P1 (linear) elements defined on 2D triangular or 3D tetrahedral mesh. For a given mesh, mass and stiffness matrices are generated in an efficient vectorized and fast way.

Functionality is extended to generate mass and stiffness matrices for a (vector) linear elasticity problem.

To run the code, call

"start_assembly_P1_3D_elasticity" or

Recently, Tien Dat Ngo (EFPL Lausanne) added assembly of stifness matrices in linear elasticity for linear elements on a hexahedral mesh

To run the code, call




This file inspired Obstacle Problem In 2 D And Its Aposteriori Error Estimate, Thermo Magnetic Solver, Fast Assembly Of Stiffness And Matrices In Finite Element Method Using Edge Elements, and Calc Meshdata.

MATLAB release MATLAB 7.9 (R2009b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
10 Jul 2010

2D functionality added

16 Sep 2010

added start_calculate_areas

17 Feb 2011

tested for both linux and windows

02 Mar 2011

report link add, extended to work for linear elasticity

19 Mar 2013

Paper information added

17 Dec 2013

Q1 assembly in 3D for linear elasticity added thanks to Tien Dat Ngo.

16 May 2014

improved description

Contact us