Bug introduced in 11.1.0 and fixed in 11.2.0
I have a problem that occurs in ToBoundaryMesh
in Mathematica version 11.1, whereas in 11.0 it worked fine. I defined ImplicitRegion
as shown below and it looks fine, but when I use this region in ToBoundaryMesh
2 corner points are lost (I checked it with select) and boundary is wrong. Consequently, also ToElementMesh
gives wrong mesh. I am sorry about decimal numbers, example is taken from bigger model. Problem appears to be random, if I for example delete some decimal numbers in criterions for region result is correct.
<< NDSolve`FEM`
reg = ImplicitRegion[(-0.6666666666666666` + x)^2 + (-0.125` + y)^2 >=
0.0064` && (-0.6666666666666666` + x)^2 + (-0.375` + y)^2 >=
0.0064` && (-0.6666666666666666` + x)^2 + (-0.625` + y)^2 >=
0.0064` && (-0.6666666666666666` + x)^2 + (-0.875` + y)^2 >=
0.0064` && (-0.9333333333333333` + x)^2 + (-0.125` + y)^2 >=
0.0064` && (-0.9333333333333333` + x)^2 + (-0.375` + y)^2 >=
0.0064` && (-0.9333333333333333` + x)^2 + (-0.625` + y)^2 >=
0.0064` && (-0.9333333333333333` + x)^2 + (-0.875` + y)^2 >=
0.0064` && -y <= -0 && -1 + x <= 0 && -1 + y <=
0 && -x <= -0.5, {x, y}];
RegionPlot[reg]
boundary = ToBoundaryMesh[reg];
boundary["Wireframe"]
pp = boundary["Coordinates"];
Select[pp, #[[1]] == 1. && #[[2]] == 1. &]
Select[pp, #[[1]] == 1. && #[[2]] == 0. &]
ToElementMesh[boundary]["Wireframe"]
Correct solution in Mathematica 11.0.