A mesh generator for two-dimensional triangulated geometries written in C++ and interfaced with MATLAB
Purpose The mesh generator in the MATLAB partial differential equation toolbox can automatically create desired meshes with simple syntax, but it has several disadvantages. This paper presents a new mesh generator for two-dimensional triangulated geometries, written in C++ and interfaced with MATLAB. Design/methodology/approach A new MATLAB interface function, meshgeneration and its name-value arguments are designed by referring to those of the generateMesh function in the MATLAB partial differential equation toolbox. Findings This paper describes the implementation details of the mesh-generation method and provides all the source code. Additional examples indicate that the desired meshes can be generated effectively for two-dimensional triangulated geometries with a single line of MATLAB code using different name-value arguments. Originality/value The main features of the new mesh generator are: (1) the generated mesh preserves all nodes of triangulated geometries; (2) mesh elements are automatically refined in narrow regions; (3) the effect of mesh size growth rate (gradient) is effectively captured; (4) global and local mesh size can be easily controlled by name-value arguments; and (5) high-quality meshes can be generated.
Authors
- Quanbing Luo (ORCID: https://orcid.org/0000-0001-6975-0211)
- Hua Li
Institutions
- Guangdong University of Technology (CN)
- Nanyang Technological University (SG)
Publication Details
- Journal
- Engineering Computations
- Published
- 2026-11-12
- DOI
- https://doi.org/10.1108/ec-06-2025-0695
- Primary Topic
- Computational Geometry and Mesh Generation
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- National Natural Science Foundation of China
- China Scholarship Council