ENH: minor consistency improvements for bounding box

- a valid() method (same as !empty() call) for consistency with other
  containers and data types

- a centre() method (same as midpoint() method) for consistency with
  other OpenFOAM geometric entities
This commit is contained in:
Mark Olesen
2019-01-09 09:32:23 +01:00
parent a0a7da2edd
commit 2067014079
26 changed files with 123 additions and 98 deletions

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2016-2019 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -1460,7 +1460,7 @@ Foam::isoSurfaceCell::isoSurfaceCell
DynamicList<label> trimTriMap;
// Trimmed to original point
labelList trimTriPointMap;
if (!bounds_.empty())
if (bounds_.valid())
{
isoSurface::trimToBox
(
@ -1492,7 +1492,7 @@ Foam::isoSurfaceCell::isoSurfaceCell
<< " merged triangles." << endl;
}
if (!bounds_.empty())
if (bounds_.valid())
{
// Adjust interpolatedPoints_
inplaceRenumber(triPointMergeMap_, interpolatedPoints_);