mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: more consistent use of good() or direct testing instead valid()
This commit is contained in:
@ -103,7 +103,7 @@ void Foam::sampledCuttingPlane::checkBoundsIntersection
|
||||
// Verify specified bounding box
|
||||
const boundBox& clipBb = isoParams_.getClipBounds();
|
||||
|
||||
if (clipBb.valid())
|
||||
if (clipBb.good())
|
||||
{
|
||||
// Bounding box does not overlap with (global) mesh!
|
||||
if (!clipBb.overlaps(meshBb))
|
||||
@ -419,7 +419,7 @@ void Foam::sampledCuttingPlane::createGeometry()
|
||||
// the initial selection smaller.
|
||||
|
||||
const boundBox& clipBb = isoParams_.getClipBounds();
|
||||
if (clipBb.valid() && cellsToSelect.any())
|
||||
if (clipBb.good() && cellsToSelect.any())
|
||||
{
|
||||
const auto& cellCentres = fvm.C();
|
||||
|
||||
|
||||
@ -166,7 +166,7 @@ Foam::sampledPlane::sampledPlane
|
||||
<< " origin:" << origin()
|
||||
<< " normal:" << normal();
|
||||
|
||||
if (bounds_.valid())
|
||||
if (bounds_.good())
|
||||
{
|
||||
Info<< " bounds:" << bounds_;
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ void Foam::cuttingPlane::checkOverlap
|
||||
const plane& pln = *this;
|
||||
|
||||
// Plane does not intersect the user bounding box
|
||||
if (userBounds.valid() && !userBounds.intersects(pln))
|
||||
if (userBounds.good() && !userBounds.intersects(pln))
|
||||
{
|
||||
WarningInFunction
|
||||
<< nl << callerName
|
||||
|
||||
@ -38,7 +38,7 @@ void Foam::cuttingSurfaceBase::checkOverlap
|
||||
)
|
||||
{
|
||||
// User bounding-box does not overlap with (global) mesh!
|
||||
if (userBounds.valid() && !userBounds.overlaps(meshBounds))
|
||||
if (userBounds.good() && !userBounds.overlaps(meshBounds))
|
||||
{
|
||||
WarningInFunction
|
||||
<< nl << callerName
|
||||
|
||||
@ -183,7 +183,7 @@ Foam::label Foam::isoSurfaceBase::blockCells
|
||||
{
|
||||
// Could warn about invalid...
|
||||
}
|
||||
else if (bb.valid())
|
||||
else if (bb.good())
|
||||
{
|
||||
const pointField& cc = mesh_.cellCentres();
|
||||
|
||||
|
||||
@ -815,7 +815,7 @@ Foam::triSurface Foam::isoSurfaceCell::stitchTriPoints
|
||||
triPointReverseMap[rawPointi+2],
|
||||
0
|
||||
);
|
||||
if (tri.valid())
|
||||
if (tri.good())
|
||||
{
|
||||
newToOldTri.append(oldTriI);
|
||||
dynTris.append(tri);
|
||||
@ -1300,7 +1300,7 @@ Foam::isoSurfaceCell::isoSurfaceCell
|
||||
DynamicList<label> trimTriMap;
|
||||
// Trimmed to original point
|
||||
labelList trimTriPointMap;
|
||||
if (getClipBounds().valid())
|
||||
if (getClipBounds().good())
|
||||
{
|
||||
isoSurfacePoint::trimToBox
|
||||
(
|
||||
@ -1332,7 +1332,7 @@ Foam::isoSurfaceCell::isoSurfaceCell
|
||||
<< " merged triangles." << endl;
|
||||
}
|
||||
|
||||
if (getClipBounds().valid())
|
||||
if (getClipBounds().good())
|
||||
{
|
||||
// Adjust interpolatedPoints_
|
||||
inplaceRenumber(triPointMergeMap_, interpolatedPoints_);
|
||||
|
||||
@ -933,7 +933,7 @@ Foam::triSurface Foam::isoSurfacePoint::stitchTriPoints
|
||||
);
|
||||
rawPointi += 3;
|
||||
|
||||
if (tri.valid())
|
||||
if (tri.good())
|
||||
{
|
||||
newToOldTri.append(oldTriI);
|
||||
dynTris.append(tri);
|
||||
@ -1603,7 +1603,7 @@ Foam::isoSurfacePoint::isoSurfacePoint
|
||||
DynamicList<label> trimTriMap;
|
||||
// Trimmed to original point
|
||||
labelList trimTriPointMap;
|
||||
if (getClipBounds().valid())
|
||||
if (getClipBounds().good())
|
||||
{
|
||||
trimToBox
|
||||
(
|
||||
@ -1636,7 +1636,7 @@ Foam::isoSurfacePoint::isoSurfacePoint
|
||||
}
|
||||
|
||||
|
||||
if (getClipBounds().valid())
|
||||
if (getClipBounds().good())
|
||||
{
|
||||
// Adjust interpolatedPoints_
|
||||
inplaceRenumber(triPointMergeMap_, interpolatedPoints_);
|
||||
|
||||
Reference in New Issue
Block a user