Implementation of Polygonal Mesh Refinement in MATLAB

Yue Yu
DOI: https://doi.org/10.48550/arXiv.2101.03456
2021-01-10
Abstract:We present a simple and efficient MATLAB implementation of the local refinement for polygonal meshes. The purpose of this implementation is primarily educational, especially on the teaching of adaptive virtual element methods.
Numerical Analysis
What problem does this paper attempt to address?
The problem that this paper attempts to solve is to achieve local refinement of polygonal meshes, especially to provide a simple and efficient MATLAB implementation in the teaching and application of adaptive virtual element methods (VEMs). Specifically, the paper focuses on the following aspects: 1. **Local refinement of polygonal meshes**: - Provide an efficient and easy - to - understand MATLAB implementation for the local refinement of polygonal meshes. - This implementation is mainly for educational purposes, especially for teaching adaptive virtual element methods. 2. **Avoidance of the generation of small edges**: - During the refinement process, ensure that there is at most one hanging node on each edge, thus avoiding the generation of overly small edges. - Use the "4 - node subdivision" strategy, that is, divide by connecting the midpoint of each edge to the centroid of the element. 3. **Application of a posteriori error estimation**: - Apply the proposed mesh refinement method to the a posteriori error analysis of the Poisson equation to verify its validity and correctness. ### Core problem of the paper The core problem of the paper is to develop an effective MATLAB implementation to support the local refinement of polygonal meshes and ensure that no overly small edges or irregular elements are generated during the refinement process. This not only helps to improve the accuracy of numerical solutions but also provides a powerful tool for the teaching and research of adaptive virtual element methods. ### Formulas and algorithms The main formulas and algorithms involved in the paper include: - **4 - node subdivision**: \[ \text{err}(i)=\left\|z_{i}-\frac{1}{2}(z_{i - 1}+z_{i+1})\right\| \] where \(z_{i}\) is the vertex coordinate and \(N_{v}\) is the number of vertices. This formula is used to detect hanging nodes. - **A posteriori error estimation**: The a posteriori error estimator is used to select the elements that need to be refined. For the specific formula, refer to the residual - type a posteriori error estimator in reference [9]. ### Summary This paper solves the key problem of mesh refinement in the adaptive virtual element method by providing a MATLAB implementation of polygonal mesh refinement, ensuring the mesh quality and improving the accuracy of numerical solutions.