ENH: use invertedBox instead of greatBox for signalling no clipping

- more stable/predictable to check for a bounding box !empty() rather
  than comparing to greatBox directly.
This commit is contained in:
Mark Olesen
2017-02-01 14:31:09 +00:00
parent 0ffae6461a
commit e76d5ce567
13 changed files with 34 additions and 34 deletions

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -545,8 +545,8 @@ bool Foam::functionObjects::streamLineBase::read(const dictionary& dict)
}
bounds_ = boundBox::greatBox;
if (dict.readIfPresent("bounds", bounds_))
bounds_ = boundBox::invertedBox;
if (dict.readIfPresent("bounds", bounds_) && !bounds_.empty())
{
Info<< " clipping all segments to " << bounds_ << nl << endl;
}
@ -701,7 +701,7 @@ bool Foam::functionObjects::streamLineBase::write()
if (Pstream::master())
{
if (bounds_ != boundBox::greatBox)
if (!bounds_.empty())
{
// Clip to bounding box
trimToBox(treeBoundBox(bounds_));