mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: use simpler boundBox handling
- use default initialize boundBox instead of invertedBox - reset() instead of assigning from invertedBox - extend (three parameter version) and grow method - inflate(Random) instead of extend + re-assigning
This commit is contained in:
committed by
Andrew Heather
parent
1339c3357b
commit
e5006a62d7
@ -64,7 +64,7 @@ void Foam::functionObjects::fieldExtents::calcFieldExtents
|
||||
|
||||
auto extents = [this](const scalarField& mask, const vectorField& C)
|
||||
{
|
||||
boundBox extents(boundBox::invertedBox);
|
||||
boundBox extents;
|
||||
forAll(mask, i)
|
||||
{
|
||||
if (mask[i] > 0.5)
|
||||
@ -77,7 +77,7 @@ void Foam::functionObjects::fieldExtents::calcFieldExtents
|
||||
|
||||
if (extents.empty())
|
||||
{
|
||||
extents.add(point::zero);
|
||||
extents.reset(point::zero);
|
||||
}
|
||||
|
||||
return extents;
|
||||
@ -97,7 +97,7 @@ void Foam::functionObjects::fieldExtents::calcFieldExtents
|
||||
Log << " internal field: " << bb << nl;
|
||||
file() << bb;
|
||||
|
||||
this->setResult(fieldName + "_internal_min" , bb.min());
|
||||
this->setResult(fieldName + "_internal_min", bb.min());
|
||||
this->setResult(fieldName + "_internal_max", bb.max());
|
||||
}
|
||||
|
||||
|
||||
@ -927,7 +927,7 @@ bool Foam::functionObjects::streamLineBase::read(const dictionary& dict)
|
||||
}
|
||||
|
||||
|
||||
bounds_ = boundBox::invertedBox;
|
||||
bounds_.reset();
|
||||
if (dict.readIfPresent("bounds", bounds_) && !bounds_.empty())
|
||||
{
|
||||
Info<< " clipping all segments to " << bounds_ << nl << endl;
|
||||
|
||||
Reference in New Issue
Block a user