I'm trying to define a region within a cell and below a level set of a function using ImplicitRegion and ToElementMesh.
Here I define the cell
basis = {{1.3, 3.4}, {3.8, 1.1}}/2;
offset = {0, 0};
cell = Parallelogram[offset, Transpose[basis]];
Graphics[{Transparent, EdgeForm[Thick], cell}]
Here is the function definition.
f[x_, y_, n_] := RankedMin[Eigenvalues[ { {(x)^2 + (y)^2, .1, 0, 0, 0},
{.1, (x + 1)^2 + (y)^2, .1, 0, 0},
{0, .1, (x - 1)^2 + (y)^2, .1, 0},
{0, 0, .1, (x)^2 + (y + 1)^2, .1},
{0, 0, 0, .1, (x)^2 + (y - 1)^2} } ], n];
Plot3D[f[x, y, 1], {x, y} \[Element] cell]
Here I create the region
<< NDSolve`FEM`
reg = ToElementMesh[ ImplicitRegion[ f[x, y, 1] < 10 && {x, y} \[Element] cell, {x, y}]];
To test that the region was accurate, I set the isovalue of the level set to 10. The expected area is then just the area of the cell, but it's off by a bit.
Total[reg["MeshElementMeasure"], 2] - Abs[Det[basis]]
-0.000564115
From a plot of the region you can see that the top-left and lower-right corners are getting cut off.
Show[RegionPlot[reg], Graphics[{Transparent, EdgeForm[Thin], cell}]]
Is there a way I can compute an ElementMesh that can accurately represent this region to within 15 decimals?
I have tried increasing AccuracyGoal, setting "BoundaryMeshGenerator" -> "Continuation", decreasing the size of MaxBoundaryCellMeasure and MaxCellMeasure, and setting MeshQualityGoal -> Maximal.


