Commit 5f115371 authored by Mark OLESEN's avatar Mark OLESEN
Browse files

STYLE: use bitSet class instead of PackedBoolList typedef

parent d0522f73
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2012-2016 OpenFOAM Foundation
Copyright (C) 2015-2018 OpenCFD Ltd.
Copyright (C) 2015-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -189,7 +189,7 @@ Foam::tetDecomposer::tetDecomposer(const polyMesh& mesh)
void Foam::tetDecomposer::setRefinement
(
const decompositionType decomposeType,
const PackedBoolList& decomposeCell,
const bitSet& decomposeCell,
polyTopoChange& meshMod
)
{
......@@ -213,7 +213,7 @@ void Foam::tetDecomposer::setRefinement
// Determine for every face whether it borders a cell that is decomposed
PackedBoolList decomposeFace(mesh_.nFaces());
bitSet decomposeFace(mesh_.nFaces());
{
for (label facei = 0; facei < mesh_.nInternalFaces(); facei++)
{
......
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2012-2016 OpenFOAM Foundation
Copyright (C) 2018 OpenCFD Ltd.
Copyright (C) 2018-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -42,7 +42,7 @@ SourceFiles
#define tetDecomposer_H
#include "DynamicList.H"
#include "PackedBoolList.H"
#include "bitSet.H"
#include "boolList.H"
#include "typeInfo.H"
#include "Enum.H"
......@@ -192,7 +192,7 @@ public:
void setRefinement
(
const decompositionType decomposeType,
const PackedBoolList& decomposeCell,
const bitSet& decomposeCell,
polyTopoChange& meshMod
);
......
......@@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017-2019 OpenCFD Ltd.
Copyright (C) 2017-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -55,7 +55,7 @@ Foam::label Foam::shortestPathSet::findMinFace
const polyMesh& mesh,
const label cellI,
const List<topoDistanceData>& allFaceInfo,
const PackedBoolList& isLeakPoint,
const bitSet& isLeakPoint,
const bool distanceMode,
const point& origin
)
......@@ -235,8 +235,8 @@ void Foam::shortestPathSet::calculateDistance
void Foam::shortestPathSet::sync
(
const polyMesh& mesh,
PackedBoolList& isLeakFace,
PackedBoolList& isLeakPoint,
bitSet& isLeakFace,
bitSet& isLeakPoint,
const label celli,
point& origin,
bool& findMinDistance
......@@ -286,8 +286,8 @@ bool Foam::shortestPathSet::touchesWall
const polyMesh& mesh,
const label facei,
PackedBoolList& isLeakFace,
const PackedBoolList& isLeakPoint
bitSet& isLeakFace,
const bitSet& isLeakPoint
) const
{
// Check if facei touches leakPoint
......@@ -378,7 +378,7 @@ bool Foam::shortestPathSet::genSingleLeakPath
const bool markLeakPath,
const label iter,
const polyMesh& mesh,
const PackedBoolList& isBlockedFace,
const bitSet& isBlockedFace,
const point& insidePoint,
const label insideCelli,
const point& outsidePoint,
......@@ -393,9 +393,9 @@ bool Foam::shortestPathSet::genSingleLeakPath
DynamicList<scalar>& samplingCurveDist,
// State of current leak paths
PackedBoolList& isLeakCell,
PackedBoolList& isLeakFace,
PackedBoolList& isLeakPoint,
bitSet& isLeakCell,
bitSet& isLeakFace,
bitSet& isLeakPoint,
// Work storage
List<topoDistanceData>& allFaceInfo,
......@@ -558,7 +558,7 @@ bool Foam::shortestPathSet::genSingleLeakPath
// Loop until we hit a boundary face
PackedBoolList isNewLeakPoint(isLeakPoint);
bitSet isNewLeakPoint(isLeakPoint);
while (mesh.isInternalFace(frontFaceI))
{
if (isBlockedFace.size() && isBlockedFace[frontFaceI])
......@@ -780,8 +780,8 @@ bool Foam::shortestPathSet::genSingleLeakPath
Foam::label Foam::shortestPathSet::erodeFaceSet
(
const polyMesh& mesh,
const PackedBoolList& isBlockedPoint,
PackedBoolList& isLeakFace
const bitSet& isBlockedPoint,
bitSet& isLeakFace
) const
{
if
......@@ -805,7 +805,7 @@ Foam::label Foam::shortestPathSet::erodeFaceSet
while (true)
{
PackedBoolList newIsLeakFace(isLeakFace);
bitSet newIsLeakFace(isLeakFace);
// Get number of edges
......@@ -827,7 +827,7 @@ Foam::label Foam::shortestPathSet::erodeFaceSet
// Match pp edges to coupled edges
labelList patchEdges;
labelList coupledEdges;
PackedBoolList sameEdgeOrientation;
bitSet sameEdgeOrientation;
PatchTools::matchEdges
(
pp,
......@@ -913,7 +913,7 @@ void Foam::shortestPathSet::genSamples
const bool addLeakPath,
const label maxIter,
const polyMesh& mesh,
const PackedBoolList& isBoundaryFace,
const bitSet& isBoundaryFace,
const point& insidePoint,
const label insideCelli,
const point& outsidePoint,
......@@ -923,9 +923,9 @@ void Foam::shortestPathSet::genSamples
DynamicList<label>& samplingFaces,
DynamicList<label>& samplingSegments,
DynamicList<scalar>& samplingCurveDist,
PackedBoolList& isLeakCell,
PackedBoolList& isLeakFace,
PackedBoolList& isLeakPoint
bitSet& isLeakCell,
bitSet& isLeakFace,
bitSet& isLeakPoint
) const
{
// Mark all paths needed to close a single combination of insidePoint,
......@@ -949,7 +949,7 @@ void Foam::shortestPathSet::genSamples
// Boundary face + additional temporary blocks (to force leakpath to
// outside)
autoPtr<PackedBoolList> isBlockedFace;
autoPtr<bitSet> isBlockedFace;
label iter;
bool markLeakPath = false;
......@@ -1051,7 +1051,7 @@ void Foam::shortestPathSet::genSamples
if (!isBlockedFace.valid())
{
//Pout<< "** Starting from original boundary faces." << endl;
isBlockedFace.set(new PackedBoolList(isBoundaryFace));
isBlockedFace.reset(new bitSet(isBoundaryFace));
}
markLeakPath = true;
......@@ -1147,7 +1147,7 @@ void Foam::shortestPathSet::genSamples
const label maxIter,
const polyMesh& mesh,
const labelUList& wallPatches,
const PackedBoolList& isBlockedFace
const bitSet& isBlockedFace
)
{
// Storage for sample points
......@@ -1158,7 +1158,7 @@ void Foam::shortestPathSet::genSamples
DynamicList<scalar> samplingCurveDist;
// Seed faces and points on 'real' boundary
PackedBoolList isBlockedPoint(mesh.nPoints());
bitSet isBlockedPoint(mesh.nPoints());
{
// Real boundaries
const polyBoundaryMesh& pbm = mesh.boundaryMesh();
......@@ -1202,11 +1202,11 @@ void Foam::shortestPathSet::genSamples
}
PackedBoolList isLeakPoint(isBlockedPoint);
bitSet isLeakPoint(isBlockedPoint);
// Newly closed faces
PackedBoolList isLeakFace(mesh.nFaces());
bitSet isLeakFace(mesh.nFaces());
// All cells along leak paths
PackedBoolList isLeakCell(mesh.nCells());
bitSet isLeakCell(mesh.nCells());
label prevSegmenti = 0;
scalar prevDistance = 0.0;
......@@ -1399,7 +1399,7 @@ Foam::shortestPathSet::shortestPathSet
maxIter,
mesh,
wallPatches,
PackedBoolList(isBlockedFace)
bitSet(isBlockedFace)
);
}
......@@ -1431,7 +1431,7 @@ Foam::shortestPathSet::shortestPathSet
}
}
genSamples(markLeakPath, maxIter, mesh, wallPatches, PackedBoolList());
genSamples(markLeakPath, maxIter, mesh, wallPatches, bitSet());
}
......
......@@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017 OpenCFD Ltd.
Copyright (C) 2017-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -75,7 +75,7 @@ SourceFiles
#define shortestPathSet_H
#include "sampledSet.H"
#include "PackedBoolList.H"
#include "bitSet.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -112,7 +112,7 @@ class shortestPathSet
const polyMesh& mesh,
const label cellI,
const List<topoDistanceData>& allFaceInfo,
const PackedBoolList& isLeakPoint,
const bitSet& isLeakPoint,
const bool minDistance,
const point& origin
);
......@@ -121,8 +121,8 @@ class shortestPathSet
void sync
(
const polyMesh& mesh,
PackedBoolList& isLeakFace,
PackedBoolList& isLeakPoint,
bitSet& isLeakFace,
bitSet& isLeakPoint,
const label celli,
point& origin,
bool& findMinDistance
......@@ -145,8 +145,8 @@ class shortestPathSet
const polyMesh& mesh,
const label facei,
PackedBoolList& isLeakFace,
const PackedBoolList& isLeakPoint
bitSet& isLeakFace,
const bitSet& isLeakPoint
) const;
//- Removes open-edged faces from set. Ignores edges with both points
......@@ -154,8 +154,8 @@ class shortestPathSet
label erodeFaceSet
(
const polyMesh& mesh,
const PackedBoolList& isBlockedPoint,
PackedBoolList& isLeakFace
const bitSet& isBlockedPoint,
bitSet& isLeakFace
) const;
//- Mark faces inbetween leak cells
......@@ -172,7 +172,7 @@ class shortestPathSet
const bool markLeakPath,
const label iter,
const polyMesh& mesh,
const PackedBoolList& isBlockedFace,
const bitSet& isBlockedFace,
const point& insidePoint,
const label insideCelli,
const point& outsidePoint,
......@@ -187,9 +187,9 @@ class shortestPathSet
DynamicList<scalar>& samplingCurveDist,
// State of current leak paths
PackedBoolList& isLeakCell,
PackedBoolList& isLeakFace,
PackedBoolList& isLeakPoint,
bitSet& isLeakCell,
bitSet& isLeakFace,
bitSet& isLeakPoint,
// Work storage
List<topoDistanceData>& allFaceInfo,
......@@ -206,7 +206,7 @@ class shortestPathSet
const bool markLeakPath,
const label maxIter,
const polyMesh& mesh,
const PackedBoolList& isBlockedFace,
const bitSet& isBlockedFace,
const point& insidePoint,
const label insideCelli,
const point& outsidePoint,
......@@ -216,9 +216,9 @@ class shortestPathSet
DynamicList<label>& samplingFaces,
DynamicList<label>& samplingSegments,
DynamicList<scalar>& samplingCurveDist,
PackedBoolList& isLeakCell,
PackedBoolList& isLeakFace,
PackedBoolList& isLeakPoint
bitSet& isLeakCell,
bitSet& isLeakFace,
bitSet& isLeakPoint
) const;
//- Generate whole path. With markLeakPath it will block all faces
......@@ -232,7 +232,7 @@ class shortestPathSet
const label maxIter,
const polyMesh& mesh,
const labelUList& wallPatches,
const PackedBoolList& blockedFace
const bitSet& blockedFace
);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment