A validated MATLAB framework for sparse vectorized finite element assembly

Authors

  • Stefano Micheletti MOX, Dipartimento di Matematica, Politecnico di Milano

DOI:

https://doi.org/10.13135/3103-1935/13647

Keywords:

Finite Element Method, sparse assembly, vectorization, MATLAB programming, partial differential equations, Navier-Stokes equations, scientific software

Abstract

We present a compact MATLAB framework for finite element prototyping based on sparse vectorized assembly. The purpose of the code is not to compete with large-scale production finite element libraries, but to expose, in a transparent and reproducible way, the algebraic structure that connects a variational formulation with an efficient implementation in a high-level language. The codebase reorganizes earlier MATLAB prototypes into functions with explicit inputs and outputs, examples, regression tests and validation scripts. The framework covers piecewise linear and quadratic finite elements on triangular meshes, variable-coefficient diffusion–reaction problems with quadrature, a vectorized tetrahedral implementation for the three-dimensional Poisson equation, and a Mini-element discretization of the incompressible Navier–Stokes equations. Numerical experiments illustrate both performance and reproducibility. In particular, the DFG flow-around-a-cylinder benchmark is used to validate the incompressible-flow module and to discuss the different mesh sensitivities of drag, lift and pressure-difference outputs.

Published

2026-09-14

How to Cite

Micheletti, S. (2026). A validated MATLAB framework for sparse vectorized finite element assembly. Journal of Approximation Software, 3(2). https://doi.org/10.13135/3103-1935/13647

Issue

Section

Articles