GEOS
GEOS copied to clipboard
[Feature] Geometric object margins
What is the requested feature? Automatically extend geometric object bounds by an epsilon.
Is your request related to a specific problem?
I'm always frustrated when I have to manually specify inclusive margins for a Box
(or read someone else's input file with such margins) e.g.
<Box xMin="-0.01 8.99 -0.01"
xMax=" 1.01 10.01 0.01"/>
This is error prone, and if you refine the mesh, you (may) have to manually change the margins as well.
Describe the solution you'd like
We could automatically extend the bounds of each geometric object by an eps
in each direction, where eps = ulp * numeric_limits<real64>::epsilon() * meshBody->m_globalLengthScale
and ulp
could be between 2 and 10. The above declaration would then look like
<Box xMin=" 0.0 9.0 0.0"
xMax=" 1.0 10.0 0.0"/>
which to me is pretty unambiguous, although this opinion may be controversial.
Describe alternatives you've considered
- We could also have
eps
as another (optional) input attribute of each geometric shape, so the user would have full control on the margin size. Whether it should default to zero or to the length-scale-based value above is a good question. -
eps
could also be set on the entireGeometry
block rather than individual shapes, although I think this is a worse alternative.
@klevzoff, I all for this change. I think the object should include its boundary, and an internally defined epsilon is much safer.