Consider two definitions of a cubic region,
a = 5;
region1 = ImplicitRegion[0 <= x <= a && 0 <= y <= a && 0 <= z <= a, {x, y, z}];
region2 = Cuboid[{0, 0, 0}, {a, a, a}];
RegionPlot3D /@ {region1, region2}
We can test whether certain points fall inside the regions
{0, 0, 0} ∈ region1
{0, 0, 0} ∈ region2
(* True *)
(* True *)
But when I try to make a DiscretizeRegion
object for use in an FEM NDSolve
calculation, one is clearly better than the other:
{region1dis, region2dis} = DiscretizeRegion /@ {region1, region2}
This is clear visually as well as in region tests,
# ∈ region1dis & /@ {{0, 0, 0}, {.04, .04, .04}, {.4, .4, .4}}
# ∈ region2dis & /@ {{0, 0, 0}, {.04, .04, .04}, {.4, .4, .4}}
(* {False, False, True} *)
(* {True, True, True} *)
I can't find an option for DiscretizeRegion
that fixes this. Not AccuracyGoal
or PrecisionGoal
or MaxCellMeasure
, or any of the Method
s listed in this post, this post, or this post. If this is a duplicate of one of those, my apologies