[Paper Review] mVEM: A MATLAB Software Package for the Virtual Element Methods
This paper presents mVEM, a free and open-source MATLAB software package implementing virtual element methods (VEMs) for polygonal and polyhedral meshes in two and three dimensions. It provides efficient, transparent, and reusable code for solving elliptic problems—including the Darcy and Poisson equations—using mixed and conforming VEM formulations, with optimal convergence rates demonstrated on various mesh types including triangulations, structured quadrilateral/polyhedral meshes, and Centroidal Voronoi Tessellations (CVT).
This paper summarizes the development of mVEM, a MATLAB software package containing efficient and easy-following codes for various virtual element methods (VEMs) published in the literature. We explain in detail the numerical implementation of the mixed VEMs for the Darcy problem and the three-dimensional linear VEMs for the Poisson equation. For other model problems, we present the construction of the discrete methods and only provide the implementation of the elliptic projection matrices. Some mesh related functions are also given in the package, including the mesh generation and refinement in two or three dimensions. mVEM is free and open source software.
Motivation & Objective
- To develop a comprehensive, reusable, and easy-to-follow MATLAB software package for virtual element methods (VEMs) applicable to complex geometries and general polygonal/polyhedral meshes.
- To provide detailed numerical implementations of mixed VEMs for the Darcy problem and linear VEMs for the Poisson equation in three dimensions, where such implementations were previously unavailable.
- To support mesh generation and refinement in 2D and 3D, including dual mesh construction from Delaunay triangulations and specialized mesh types like CVTs.
- To enable the implementation of various VEM formulations for different PDEs, including reaction-diffusion, linear elasticity, plate bending, Stokes flow, and variational inequalities.
- To offer a foundation for future extensions to time-dependent problems, adaptive methods, nonlinear mechanics, and multiphysics problems such as Cahn-Hilliard and Navier-Stokes systems.
Proposed method
- The package implements the virtual element method using a variational formulation based on integration by parts, where the weak form is assembled element-wise using computable projections.
- For each element, the method computes the local stiffness matrix using an $L^2$ projection and an elliptic projection to handle non-polynomial terms without explicit knowledge of shape functions.
- The software uses a data structure to represent polygonal and polyhedral meshes, including vertex lists, element connectivity, and boundary markers for Dirichlet and Neumann conditions.
- Mesh generation is supported via a modified PolyMesher algorithm and Delaunay-based dual meshing, enabling structured and Centroidal Voronoi Tessellation (CVT) meshes.
- The implementation employs element-wise loops for clarity and extensibility, particularly for 3D problems, though vectorization is suggested for performance improvement.
- The code includes functions for error computation in $H^1$ and $L^2$ norms, convergence rate analysis, and visualization of solutions and meshes.
Experimental results
Research questions
- RQ1How can a transparent and reusable MATLAB implementation of the virtual element method be designed for both 2D and 3D problems on general polygonal and polyhedral meshes?
- RQ2What is the optimal convergence behavior of linear VEMs for the Poisson equation in three dimensions on unstructured polyhedral meshes?
- RQ3How does the performance of the VEM implementation compare to classical finite element methods when the mesh is composed of triangles?
- RQ4Can the VEM formulation be extended to mixed formulations (e.g., Darcy problem) and higher-order problems with minimal code complexity?
- RQ5What are the computational bottlenecks in VEM implementation, and how can they be mitigated through code design and potential vectorization?
Key findings
- The mVEM package successfully implements mixed VEMs for the Darcy problem and linear VEMs for the 3D Poisson equation on general polyhedral meshes, with clear and documented code.
- Optimal convergence rates of order two in the $L^2$ norm and order one in the $H^1$ norm are achieved for the Poisson problem on tetrahedral, structured quadrilateral, and CVT meshes.
- On coarse meshes, the $L^2$ error convergence rate is suboptimal (not close to 2), a known issue also observed in standard linear finite elements, but optimal rates are recovered on finer meshes.
- For triangulated meshes, the linear VEM reduces to the standard linear finite element method, confirming consistency of the formulation.
- The current implementation uses element-wise loops for clarity, but performance can be improved via vectorization, especially for large-scale 3D problems.
- The package is extensible and provides a foundation for future development in time-dependent problems, adaptive VEMs, and nonlinear solid mechanics applications.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.