# How to define element size with ToBoundaryMesh?

I am trying to make a mesh for finite element analysis with shell elements: I have to define 2D finite elements in 3D space. My code is:

mesh = ToBoundaryMesh[Polygon[{{0, 0, 0}, {1, 0, 0}, {2, 0, 0}, {2, 0, 0.2}, {0, 0, 0.2}}], "MaxBoundaryCellMeasure" -> 0.01];


However, the produced mesh does not seem to consider the prescribed "MaxBoundaryCellMeasure", since the result is the same regardless the prescribed value for "MaxBoundaryCellMeasure":

Is this possibly a bug? I can solve the problem for the presented simple case with other possible definitions of my domain (e.g. ImplicitRegion). However, I would like to be able to prescribe mesh density when I define domain as Polygon, since I will have to define some more complex domains (with imperfect holes etc.)

Thank you in advance for the answer!

• I gues the problem here is that your mesh does not describe a boundary of a 3-dimensional domain so that TetGenLink cannot be used to refine it. Instead, you could set up this mesh in the plane first (e.g., with ToElementMesh), then extract the coordinates and cells, map the coordinates to $\mathbb{R}^3$, and then apply ToBoundaryMesh. – Henrik Schumacher May 25 '18 at 12:34

## 1 Answer

Yes, this is seems to be a short coming of ToBoundaryMesh. But you can work abound that with:

dg = DiscretizeRegion[
Polygon[{{0, 0, 0}, {1, 0, 0}, {2, 0, 0}, {2, 0, 0.2}, {0, 0,
0.2}}], MaxCellMeasure -> {"Area" -> 0.005}];
ToBoundaryMesh[dg]["Wireframe"]


• Thank you Henrik Schumacher and user21. You've solve my problem and now it works fine! – Teja May 26 '18 at 21:34