NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

MeshingNet: A New Mesh Generation Method based on Deep Learning

Zheyan Zhang, Yongxing Wang, Peter K. Jimack, He Wang

Abstract

MeshingNet is a deep learning framework designed to accelerate Finite Element Analysis (FEA) by predicting optimal local mesh densities for unstructured meshes. Traditional a posteriori error estimation requires an iterative "solve-estimate-refine" loop that is computationally expensive. MeshingNet replaces this process with a single neural network inference, mapping domain geometry and physical parameters directly to target element areas. Trained on high-accuracy solutions, the model generates high-quality non-uniform meshes up to 300 times faster than standard methods while maintaining solution accuracy.

Introduction

In computational science, solving partial differential equations (PDEs) via the Finite Element Method (FEM) requires discretizing a domain into a mesh. The accuracy and efficiency of the solution are heavily dependent on this discretization. Ideally, a non-uniform mesh is employed—fine in regions where the solution exhibits high gradients and coarse where it is smooth.

Traditionally, finding the optimal mesh density involves a posteriori error estimation. This iterative process requires solving the problem on an initial coarse mesh, estimating local errors, refining the mesh, and repeating until convergence. This loop represents a significant computational bottleneck. MeshingNet aims to bypass this bottleneck by using a deep neural network to predict the ideal local mesh density in a single pass.

Methodology

MeshingNet treats mesh density prediction as a regression task. The model learns a mapping function $F(\Gamma, B, M) \to A(X)$, where $\Gamma$ represents domain geometry, $B$ denotes boundary conditions, $M$ signifies material parameters, and $A(X)$ is the target local area upper bound for any point $X$ in the domain.

Overview of the MeshingNet training and testing pipeline.

To ensure the network is invariant to the rotation or translation of the geometry, the authors utilize Mean Value Coordinates (MVC). MVCs provide a way to represent interior points relative to an arbitrary polygon's vertices. The authors evaluated several architectures, including standard Fully Connected Networks (FCN) and Residual Networks (ResNet1 and ResNet2), finding that ResNet architectures offered superior training stability. Crucially, MeshingNet does not generate the mesh elements directly; instead, it provides density guidance to established, optimized meshing software like Triangle.

Experimental Setup

Due to the lack of standard benchmarks for this task, the authors developed two synthetic datasets:

  1. 2D Poisson’s Equation: Comprising 3,800 randomly generated octagons to test geometric adaptability.
  2. 2D Linear Elasticity: Featuring polygons with 6–8 edges and varying material properties (density and Poisson’s ratio) and boundary conditions (fixed, pressure, or traction).

For each problem, a "ground truth" high-accuracy solution (HAS) was computed on an extremely fine uniform mesh. This HAS served as the gold standard for determining the ideal error distribution and subsequent target element areas for training.

Results and Discussion

The primary advantage of MeshingNet is its inference speed. Predicting target mesh densities for a new problem takes approximately 0.046 seconds—over 300 times faster than traditional iterative error estimation.

Comparison of error distribution (left), MeshingNet-generated non-uniform mesh (middle), and standard uniform mesh (right).

In Poisson problems, meshes guided by MeshingNet achieved FE errors between 0.0007 and 0.0015. In contrast, uniform meshes of comparable size resulted in significantly higher errors, ranging from 0.0015 to 0.0025. In elasticity tests, the potential energy of solutions on MeshingNet-guided meshes was much closer to the ground truth than those on uniform meshes or meshes refined using the standard Zienkiewicz-Zhu (ZZ) estimator.

A key insight of this work is the robustness of the approach to prediction errors. Unlike Physics-Informed Neural Networks (PINNs) that attempt to predict the PDE solution directly, MeshingNet only predicts the mesh density. If the prediction is slightly sub-optimal, the FE solver still produces a valid, albeit slightly less efficient, result. This "offline" cost-shifting—where expensive error calculations are performed once during training—allows for extremely "cheap" and reliable inference at runtime.

Limitations and Future Work

While MeshingNet shows great promise, it is currently limited to 2D polygonal domains. Extending the framework to 3D domains using tetrahedral meshing tools like Tetgen is a critical next step. Additionally, while the model handles random polygons, its performance on the highly complex geometries typical of industrial CAD models remains to be tested.

Future research will also explore more advanced architectures, such as Graph Neural Networks (GNNs) or Convolutional Neural Networks (CNNs), which may better capture complex spatial relationships than fully connected layers. To mitigate the high cost of generating training data for 3D problems, the authors suggest exploring the use of less expensive traditional estimators for initial data generation.

Summary updated

BibTeX
@inproceedings{zhang2020meshingnet,
  author = {Zheyan Zhang and Yongxing Wang and Peter K. Jimack and He Wang},
  title = {{MeshingNet: A New Mesh Generation Method based on Deep Learning}},
  booktitle = {ICCS},
  year = {2020},
  url = {https://openreview.net/forum?id=HJzN5WlpfKfv},
}
Figure