File Exchange

image thumbnail

Fast FEM assembly: nodal elements

version 1.17.0.0 (813 KB) by Jan Valdman
Vectorized assembly of FEM matrices.

11 Downloads

Updated 04 Aug 2018

View Version History

View License

This code demonstrates vectorization concepts from the 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).

A link to the paper can be found at the author web page located at http://sites.google.com/site/janvaldman/publications

Please cite the paper if you find the code useful.

Available scripts from the paper:

"start_compute_areas"

"start_assembly_P1_2D"

"start_assembly_P1_3D"

"start_assembly_P1_2D_elasticity"

"start_assembly_P1_3D_elasticity"

Additional script (provided by Tien Dat Ngo from EFPL Lausanne):

"start_assembly_Q1_3D_elasticity"

Cite As

Jan Valdman (2020). Fast FEM assembly: nodal elements (https://www.mathworks.com/matlabcentral/fileexchange/27826-fast-fem-assembly-nodal-elements), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (8)

zhouzhou pan

Is the function "phider" not uploaded ?

Jan Valdman

coeffs denotes a scalar coefficient in corresponding bilinear forms:
a(u,v) = (coeffs * grad u, grad v) (in the stiffness matrix function),
a(u,v) = (coeffs *u, v) (in the mass matrix function),
where u,v are P1 functions. Ignore it in the input of both functions to have coeffs=1.

Jan Valdman

It is straightforward to modify FEM assemblies to work with rectangular elements, but it is not done in this version. Read the paper and try it yourself :).

Ming Chen

What's the 'coeffs' mean in function 'stifness_matrixP1' and 'mass_matrixP1'?

Gracen Mueller

can this create a mass matrix for a rectangular (2 dimensional) mesh?

Kristinn Gudnason

put kanakasem

MATLAB Release Compatibility
Created with R2014b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!