We discuss a new method for the generation of locally refined finite element meshes using convolutional neural networks. As a model problem we consider a linear elasticity problem on a two-dimensional domain with holes that has a polygonal boundary.

When applying a Galerkin discretization using quadrilateral finite elements, one usually has to perform adaptive refinement to properly resolve maxima of the stress distribution. Such an adaptive scheme requires a local error estimator and a corresponding local refinement strategy, which leads to a high computational cost. We propose to reduce the complexity of obtaining a suitable discretization by training a neural network whose evaluation replaces the adaptive refinement procedure.

The resulting displacement and distribution of stresses depend on the geometry of the domain and on the boundary conditions. We train a neural network on a large class of possible domains and boundary conditions from different classes of geometric complexity and we analyze its behavior on unseen data.

In order to process the geometry data independently of the underlying discretization scheme, we interpret computational domain and boundary conditions as pixeleted images. Likewise, the output of the networks is an grayscale image that predicts the optimal local mesh density distribution. Besides the increased flexibility, this representation makes it possible to employ powerful network architectures based on convolutional networks.