Abstract:We present a simple and efficient MATLAB implementation of the linear virtual element method for the three dimensional Poisson equation. The purpose of this software is primarily educational, to demonstrate how the key components of the method can be translated into code.
What problem does this paper attempt to address?
The problem that this paper attempts to solve is to provide a simple and efficient MATLAB implementation of the three - dimensional linear Virtual Element Method (VEM) for solving the three - dimensional Poisson equation. Specifically, the goal of the paper is educational, aiming to show how to transform the key components of the Virtual Element Method into code, especially on general polyhedral meshes. Although the current program is only applicable to the first - order virtual element space, the design idea can be directly extended to the high - order case.
### Background and Objectives of the Paper
- **Background**: The Virtual Element Method (VEM) was first proposed and analyzed in reference [1]. It is an extension of the standard finite element method on general polygonal meshes. In recent years, the Virtual Element Method has made rapid progress in the numerical solution of various partial differential equations (PDEs). Although there have been many studies on the Virtual Element Method for three - dimensional problems, as far as the author knows, there are no publicly available relevant implementations at present.
- **Objective**: This paper aims to provide a simple and efficient MATLAB implementation for solving the three - dimensional Poisson equation on general polyhedral meshes. The paper describes in detail each important part of the method and shows step by step how to transform it into code.
### Main Contents
1. **Introduction**:
- Introduces the basic concepts of the Virtual Element Method and its applications in two - dimensional and three - dimensional problems.
- Emphasizes the educational purpose of the current work, that is, to show how to transform the key steps of the Virtual Element Method into code.
2. **Virtual Element Method for Three - dimensional Poisson Equation**:
- Defines the model problem of the three - dimensional Poisson equation, including Dirichlet boundary conditions and Neumann boundary conditions.
- Describes the basic framework of the Virtual Element Method, including the definitions of local bilinear forms and local linear forms.
- Explains in detail the calculation method of the elliptic projection, including the implementation on polygonal faces and polyhedral elements.
3. **Data Structures and Test Scripts**:
- Describes the data structure representing the polyhedral mesh, including node coordinates and element connectivity.
- Provides a test script (main_PoissonVEM3.m), showing how to load predefined mesh data, set boundary conditions, solve the problem, and calculate the discrete L2 error and H1 error.
4. **Implementation of Elliptic Projection**:
- Explains in detail how to calculate the elliptic projection on polygonal faces, including establishing a local coordinate system and calculating relevant matrices.
- Shows how to calculate the elliptic projection on polyhedral elements and assemble the local stiffness matrix and load vector.
5. **Treatment of Boundary Conditions**:
- Introduces how to handle Neumann boundary conditions and Dirichlet boundary conditions, including how to assemble the boundary conditions into the overall linear system.
6. **Solver Selection**:
- For small - scale linear systems, directly use MATLAB's backslash command to solve; for large - scale systems, use the Algebraic Multigrid Method (AMG) to solve.
### Conclusion
The paper shows how to implement the three - dimensional linear Virtual Element Method in MATLAB through detailed code implementation and test cases. The results show that this method has the optimal convergence rate in both the L2 norm and the H1 norm. The code and test script provided in the paper can be found on GitHub as part of the mVEM package, which is convenient for readers to learn and use.
### References
- [1] L. Beirão Da Veiga, F. Brezzi, A. Cangiani, G. Manzini, L. D. Marini, and A. Russo. Basic principles of virtual element methods. *Math. Models Meth. Appl. Sci.*, 23(1):199–214, 2013.
- [2] B. Ahmad, A. Alsaedi, F. Brezzi, L.D. Marini, and A. Russo. Equivalent projectors fo