Unstructured meshes
The MBB beam of the mesh study on unstructured triangles, an informative example: the same problem, lengths and methods, only the mesh changes, with the Cartesian runs of the same levels beside it. The script writes a table and figures and requires nothing of the numbers. The rows of the fixed table are described on the Benchmarks page (LUSolver, backend :compiled). validation/mbb_unstructured.jl.
The mesh is generated in the script with the API of Gmsh (GridapGmsh): the half MBB beam (0, 3) × (0, 1) with vertices at the ends of the load and of the roller, Delaunay triangles (Mesh.Algorithm = 5) of size a₀ = h √(2/√3) with h = 3/120, which gives equilateral triangles the node density of 120 × 40. The default algorithm of Gmsh (frontal-Delaunay) gives in a rectangle an almost perfect lattice of equilateral triangles (edges along 0°, 60° and 120°), a structured mesh in disguise; Delaunay gives edges in every direction. On the machine of the table the mesh has 5659 vertices and 11016 triangles (gmsh_jll 4.15.4); the mesh depends on the version of Gmsh and on the platform (5658 and 11014 with the Gmsh SDK 4.13–4.15.2 on Linux x86_64), and the script prints the numbers it gets. h/2 and h/4 are its uniform red refinements (Gridap.Adaptivity.refine, each triangle into four: 44064 and 176256 triangles), so the meshes are nested and a design is prolonged exactly to h/4, as on the Cartesian meshes. The problem: density SiMPL (P0) and the reaction–diffusion level set (Ersatz()), rmin = 0.06, τ = 2e-4, Emin = 1e-3, volume 0.5, the default stop.
The measures of the bank are weighted by the cell areas on these meshes (MeshCells in validation/common): a design is read as 0/1 keeping the area of the solid (volume_threshold(χ, vf, area)), the holes are counted by their area (at least π(rmin/2)²), the perimeter is the length of the edges between solid and void (on triangles a zigzag: not comparable with the staircase of the Cartesian meshes). Designs of different meshes are compared on a common Cartesian mesh, 480 × 160: the cell means of the triangles are averaged over each of its cells (4 × 4 samples per cell, rasterize on a grid 4 times finer), the Cartesian designs are prolonged, and each design is read there as 0/1 keeping the volume. That comparison depends on the transfer by a few tenths of a point: taking the value at the centre of each cell instead of the mean gave +0.30 % and +0.36 % (density SiMPL, h/2 and h/4) and −0.04 % and +0.40 % (the level set) instead of the values of the table.
The script reports, for the triangles, the measures of the mesh study between h/2 and h/4 (on h/4) and, for each level, J_bin, holes and iterations against the Cartesian run of the same level on the common mesh.
SUMMARY_TABLE
OUTCOMES
On h/2 and h/4 the designs are those of the Cartesian meshes: the same members and holes and iterations within a few (density SiMPL 40 and 42 against 43 and 47; the level set 71 and 73 against 67 and 69). On the common mesh J_bin of the triangles is within 0.13 % of the Cartesian design on h/4 (+0.13 % and +0.03 %); on h/2 density SiMPL is −0.12 % and the level set −0.93 % (the design on triangles is slightly stiffer there). On its own mesh J_bin of the triangles is lower than the Cartesian one with a similar number of vertices (the column vs ref of the fixed table: −0.1 to −0.8 % on h/2 and h/4, −1.3 % and −2.0 % on h): linear triangles are stiffer than bilinear quadrilaterals, a difference of the discretisation of the state that adds to that of the designs.
On h the level set gives another design: J_bin −2.69 % on the common mesh, 4 holes against 5 and 134 iterations against 74. In a probe made when designing this example (the same mesh, 2026-11-29, Apple M5 Max, 4 threads, Julia 1.13), the level set breaks a thin diagonal bar on the left at iteration 78 (J from 160.1 to 164.1, at most 166.95 at iteration 93) and settles again at 161.8. Density SiMPL on h keeps the 3 holes of the Cartesian design (−0.91 %).
The dependence on the mesh is that of the Cartesian meshes. Between h/2 and h/4, on h/4: density SiMPL +0.83 % (Cartesian +0.81 %) and again 4 holes against 5 (the small hole under the load), the level set +1.23 % (Cartesian +1.48 %), with 3.6 % of the area changing phase (5.8 %).
The outcome of the level set against the 1 % of the mesh study depends on the family of meshes. Nested families give +1.2–1.5 % between h/2 and h/4 (Cartesian +1.48 %; Delaunay with red refinement +1.23 %, this page; frontal-Delaunay with red refinement +1.07 %), but meshes of Gmsh generated anew at each size (a₀/2, a₀/4, not nested; compared by sampling on 480 × 160) give +0.90 %: the 1 % lies within the spread between meshes. The last two figures come from the probe made when designing this example (2026-11-29, Apple M5 Max, 4 threads, Julia 1.13; not run by the script). In that probe simplexify(240 × 80) (every diagonal in the same direction) was the only mesh that changed the topology of the level set (5 holes instead of 7, 105 iterations instead of 65–71, 8.8 % of the area different from the Cartesian design, against about 2 % for the meshes of Gmsh): the bias appears with a structured anisotropic mesh, not with the unstructured ones.
The fixed report table (J_bin on the own mesh, the volume kept; vs ref: the triangles against the Cartesian run of the same level, each on its own mesh):
FIXED_TABLE