ENH: creating a bounding box without points yields an inverted box

- The code create a box with a (0,0,0) point.
  The new definition is more logical and makes it very easy to grow
  the bounding box to include new points. It also simplifies much of
  the logic in the constructors.

- Use ROOTVGREAT instead of VGREAT for sizing greatBox and invertedBox.
  Avoids some overflow issues reported by Mattijs (thus GREAT has been
  used in treeBoundBox), but might still need further revision.
This commit is contained in:
Mark Olesen
2017-02-01 12:15:00 +00:00
parent af4429f94c
commit 0ffae6461a
10 changed files with 60 additions and 102 deletions

View File

@ -74,7 +74,7 @@ void Foam::patchCloudSet::calcSamples
labelList patchFaces(sz);
sz = 0;
treeBoundBox bb(treeBoundBox::invertedBox);
treeBoundBox bb(boundBox::invertedBox);
forAllConstIter(labelHashSet, patchSet_, iter)
{
const polyPatch& pp = mesh().boundaryMesh()[iter.key()];