A validated MATLAB framework for sparse vectorized finite element assembly
DOI:
https://doi.org/10.13135/3103-1935/13647Keywords:
Finite Element Method, sparse assembly, vectorization, MATLAB programming, partial differential equations, Navier-Stokes equations, scientific softwareAbstract
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.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Stefano Micheletti

This work is licensed under a Creative Commons Attribution 4.0 International License.
JAS only considers unpublished manuscripts.
JAS is committed to electronic open-access publishing since its foundation in 2023 and has chosen to apply the Creative Commons Attribution License (CCAL) CC-BY to all articles.
Under the Creative Commons Attribution License, authors retain ownership of the copyright for their article, but authors allow anyone to download, reuse, reprint, modify, distribute, and/or copy articles in JAS, provided that the original authors and source are credited.
