mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -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) 2015-2016 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -76,7 +76,7 @@ Usage
|
||||
trackLength | Tracking segment length | no |
|
||||
nSubCycle | Number of tracking steps per cell | no|
|
||||
cloudName | Cloud name to use | yes |
|
||||
bounds | Bounding box to trim tracks | no | greatBox
|
||||
bounds | Bounding box to trim tracks | no | invertedBox
|
||||
seedSampleSet| Seeding method (see below)| yes |
|
||||
\endtable
|
||||
|
||||
@ -136,10 +136,10 @@ class streamLine
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
streamLine(const streamLine&);
|
||||
streamLine(const streamLine&) = delete;
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const streamLine&);
|
||||
void operator=(const streamLine&) = delete;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -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_));
|
||||
|
||||
@ -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) 2015-2016 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -79,7 +79,7 @@ Usage
|
||||
trackLength | Tracking segment length | no |
|
||||
nSubCycle | Number of tracking steps per cell | no|
|
||||
cloudName | Cloud name to use | yes |
|
||||
bounds | Bounding box to trim tracks | no | greatBox
|
||||
bounds | Bounding box to trim tracks | no | invertedBox
|
||||
seedSampleSet| Seeding method (see below)| yes |
|
||||
\endtable
|
||||
|
||||
|
||||
@ -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.
|
||||
@ -179,7 +179,7 @@ void Foam::functionObjects::runTimePostPro::scene::initialise
|
||||
vtkSmartPointer<vtkLightKit> lightKit = vtkSmartPointer<vtkLightKit>::New();
|
||||
lightKit->AddLightsToRenderer(renderer);
|
||||
|
||||
if (clipBox_ != boundBox::greatBox)
|
||||
if (!clipBox_.empty())
|
||||
{
|
||||
const point& min = clipBox_.min();
|
||||
const point& max = clipBox_.max();
|
||||
@ -237,7 +237,7 @@ void Foam::functionObjects::runTimePostPro::scene::setCamera
|
||||
// Apply clipping if required
|
||||
// Note: possible optimisation - if the camera is static, this only needs
|
||||
// to be done once on initialisation
|
||||
if (clipBox_ != boundBox::greatBox)
|
||||
if (!clipBox_.empty())
|
||||
{
|
||||
// Call ResetCamera() to fit clip box in view
|
||||
clipBoxActor_->VisibilityOn();
|
||||
@ -278,7 +278,7 @@ Foam::functionObjects::runTimePostPro::scene::scene
|
||||
cameraUp_(nullptr),
|
||||
cameraViewAngle_(nullptr),
|
||||
cameraZoom_(nullptr),
|
||||
clipBox_(boundBox::greatBox),
|
||||
clipBox_(boundBox::invertedBox),
|
||||
clipBoxActor_(),
|
||||
parallelProjection_(true),
|
||||
nFrameTotal_(1),
|
||||
|
||||
@ -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 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -334,7 +334,7 @@ Foam::distanceSurface::distanceSurface
|
||||
cell_(dict.lookupOrDefault("cell", true)),
|
||||
regularise_(dict.lookupOrDefault("regularise", true)),
|
||||
average_(dict.lookupOrDefault("average", false)),
|
||||
bounds_(dict.lookupOrDefault("bounds", boundBox::greatBox)),
|
||||
bounds_(dict.lookupOrDefault("bounds", boundBox::invertedBox)),
|
||||
zoneKey_(keyType::null),
|
||||
needsUpdate_(true),
|
||||
isoSurfCellPtr_(nullptr),
|
||||
|
||||
@ -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 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -145,7 +145,7 @@ public:
|
||||
const bool cell,
|
||||
const Switch regularise,
|
||||
const Switch average,
|
||||
const boundBox& bounds = boundBox::greatBox
|
||||
const boundBox& bounds = boundBox::invertedBox
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -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 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -468,7 +468,7 @@ Foam::sampledIsoSurface::sampledIsoSurface
|
||||
sampledSurface(name, mesh, dict),
|
||||
isoField_(dict.lookup("isoField")),
|
||||
isoVal_(readScalar(dict.lookup("isoValue"))),
|
||||
bounds_(dict.lookupOrDefault("bounds", boundBox::greatBox)),
|
||||
bounds_(dict.lookupOrDefault("bounds", boundBox::invertedBox)),
|
||||
mergeTol_(dict.lookupOrDefault("mergeTol", 1e-6)),
|
||||
regularise_(dict.lookupOrDefault("regularise", true)),
|
||||
average_(dict.lookupOrDefault("average", false)),
|
||||
|
||||
@ -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 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -207,7 +207,7 @@ Foam::sampledIsoSurfaceCell::sampledIsoSurfaceCell
|
||||
MeshStorage(),
|
||||
isoField_(dict.lookup("isoField")),
|
||||
isoVal_(readScalar(dict.lookup("isoValue"))),
|
||||
bounds_(dict.lookupOrDefault("bounds", boundBox::greatBox)),
|
||||
bounds_(dict.lookupOrDefault("bounds", boundBox::invertedBox)),
|
||||
regularise_(dict.lookupOrDefault("regularise", true)),
|
||||
average_(dict.lookupOrDefault("average", true)),
|
||||
zoneKey_(keyType::null),
|
||||
|
||||
@ -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 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -263,7 +263,7 @@ Foam::sampledCuttingPlane::sampledCuttingPlane
|
||||
:
|
||||
sampledSurface(name, mesh, dict),
|
||||
plane_(dict),
|
||||
bounds_(dict.lookupOrDefault("bounds", boundBox::greatBox)),
|
||||
bounds_(dict.lookupOrDefault("bounds", boundBox::invertedBox)),
|
||||
mergeTol_(dict.lookupOrDefault("mergeTol", 1e-6)),
|
||||
regularise_(dict.lookupOrDefault("regularise", true)),
|
||||
average_(dict.lookupOrDefault("average", false)),
|
||||
|
||||
@ -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) 2015-2016 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -1619,7 +1619,7 @@ Foam::isoSurface::isoSurface
|
||||
DynamicList<label> trimTriMap;
|
||||
// Trimmed to original point
|
||||
labelList trimTriPointMap;
|
||||
if (bounds_ != boundBox::greatBox)
|
||||
if (!bounds_.empty())
|
||||
{
|
||||
trimToBox
|
||||
(
|
||||
@ -1652,7 +1652,7 @@ Foam::isoSurface::isoSurface
|
||||
}
|
||||
|
||||
|
||||
if (bounds_ != boundBox::greatBox)
|
||||
if (!bounds_.empty())
|
||||
{
|
||||
// Adjust interpolatedPoints_
|
||||
inplaceRenumber(triPointMergeMap_, interpolatedPoints_);
|
||||
|
||||
@ -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 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -411,7 +411,7 @@ public:
|
||||
const scalarField& pointIsoVals,
|
||||
const scalar iso,
|
||||
const bool regularise,
|
||||
const boundBox& bounds = boundBox::greatBox,
|
||||
const boundBox& bounds = boundBox::invertedBox,
|
||||
const scalar mergeTol = 1e-6 // fraction of bounding box
|
||||
);
|
||||
|
||||
|
||||
@ -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 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -1436,7 +1436,7 @@ Foam::isoSurfaceCell::isoSurfaceCell
|
||||
DynamicList<label> trimTriMap;
|
||||
// Trimmed to original point
|
||||
labelList trimTriPointMap;
|
||||
if (bounds_ != boundBox::greatBox)
|
||||
if (!bounds_.empty())
|
||||
{
|
||||
isoSurface::trimToBox
|
||||
(
|
||||
@ -1468,7 +1468,7 @@ Foam::isoSurfaceCell::isoSurfaceCell
|
||||
<< " merged triangles." << endl;
|
||||
}
|
||||
|
||||
if (bounds_ != boundBox::greatBox)
|
||||
if (!bounds_.empty())
|
||||
{
|
||||
// Adjust interpolatedPoints_
|
||||
inplaceRenumber(triPointMergeMap_, interpolatedPoints_);
|
||||
|
||||
@ -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 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -330,7 +330,7 @@ public:
|
||||
const scalarField& pointValues,
|
||||
const scalar iso,
|
||||
const bool regularise,
|
||||
const boundBox& bounds = boundBox::greatBox,
|
||||
const boundBox& bounds = boundBox::invertedBox,
|
||||
const scalar mergeTol = 1e-6 // fraction of bounding box
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user