Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
5f115371
Commit
5f115371
authored
Mar 18, 2020
by
Mark OLESEN
Browse files
STYLE: use bitSet class instead of PackedBoolList typedef
parent
d0522f73
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/dynamicMesh/polyTopoChange/polyTopoChange/tetDecomposer.C
View file @
5f115371
...
...
@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2012-2016 OpenFOAM Foundation
Copyright (C) 2015-20
18
OpenCFD Ltd.
Copyright (C) 2015-20
20
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
PackedBoolLis
t
&
decomposeCell
,
const
bitSe
t
&
decomposeCell
,
polyTopoChange
&
meshMod
)
{
...
...
@@ -213,7 +213,7 @@ void Foam::tetDecomposer::setRefinement
// Determine for every face whether it borders a cell that is decomposed
PackedBoolLis
t
decomposeFace
(
mesh_
.
nFaces
());
bitSe
t
decomposeFace
(
mesh_
.
nFaces
());
{
for
(
label
facei
=
0
;
facei
<
mesh_
.
nInternalFaces
();
facei
++
)
{
...
...
src/dynamicMesh/polyTopoChange/polyTopoChange/tetDecomposer.H
View file @
5f115371
...
...
@@ -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
"
PackedBoolLis
t.H"
#include
"
bitSe
t.H"
#include
"boolList.H"
#include
"typeInfo.H"
#include
"Enum.H"
...
...
@@ -192,7 +192,7 @@ public:
void
setRefinement
(
const
decompositionType
decomposeType
,
const
PackedBoolLis
t
&
decomposeCell
,
const
bitSe
t
&
decomposeCell
,
polyTopoChange
&
meshMod
);
...
...
src/sampling/sampledSet/shortestPath/shortestPathSet.C
View file @
5f115371
...
...
@@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017-20
19
OpenCFD Ltd.
Copyright (C) 2017-20
20
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
PackedBoolLis
t
&
isLeakPoint
,
const
bitSe
t
&
isLeakPoint
,
const
bool
distanceMode
,
const
point
&
origin
)
...
...
@@ -235,8 +235,8 @@ void Foam::shortestPathSet::calculateDistance
void
Foam
::
shortestPathSet
::
sync
(
const
polyMesh
&
mesh
,
PackedBoolLis
t
&
isLeakFace
,
PackedBoolLis
t
&
isLeakPoint
,
bitSe
t
&
isLeakFace
,
bitSe
t
&
isLeakPoint
,
const
label
celli
,
point
&
origin
,
bool
&
findMinDistance
...
...
@@ -286,8 +286,8 @@ bool Foam::shortestPathSet::touchesWall
const
polyMesh
&
mesh
,
const
label
facei
,
PackedBoolLis
t
&
isLeakFace
,
const
PackedBoolLis
t
&
isLeakPoint
bitSe
t
&
isLeakFace
,
const
bitSe
t
&
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
PackedBoolLis
t
&
isBlockedFace
,
const
bitSe
t
&
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
PackedBoolLis
t
&
isLeakCell
,
PackedBoolLis
t
&
isLeakFace
,
PackedBoolLis
t
&
isLeakPoint
,
bitSe
t
&
isLeakCell
,
bitSe
t
&
isLeakFace
,
bitSe
t
&
isLeakPoint
,
// Work storage
List
<
topoDistanceData
>&
allFaceInfo
,
...
...
@@ -558,7 +558,7 @@ bool Foam::shortestPathSet::genSingleLeakPath
// Loop until we hit a boundary face
PackedBoolLis
t
isNewLeakPoint
(
isLeakPoint
);
bitSe
t
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
PackedBoolLis
t
&
isBlockedPoint
,
PackedBoolLis
t
&
isLeakFace
const
bitSe
t
&
isBlockedPoint
,
bitSe
t
&
isLeakFace
)
const
{
if
...
...
@@ -805,7 +805,7 @@ Foam::label Foam::shortestPathSet::erodeFaceSet
while
(
true
)
{
PackedBoolLis
t
newIsLeakFace
(
isLeakFace
);
bitSe
t
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
;
PackedBoolLis
t
sameEdgeOrientation
;
bitSe
t
sameEdgeOrientation
;
PatchTools
::
matchEdges
(
pp
,
...
...
@@ -913,7 +913,7 @@ void Foam::shortestPathSet::genSamples
const
bool
addLeakPath
,
const
label
maxIter
,
const
polyMesh
&
mesh
,
const
PackedBoolLis
t
&
isBoundaryFace
,
const
bitSe
t
&
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
,
PackedBoolLis
t
&
isLeakCell
,
PackedBoolLis
t
&
isLeakFace
,
PackedBoolLis
t
&
isLeakPoint
bitSe
t
&
isLeakCell
,
bitSe
t
&
isLeakFace
,
bitSe
t
&
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
<
PackedBoolLis
t
>
isBlockedFace
;
autoPtr
<
bitSe
t
>
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
PackedBoolLis
t
(
isBoundaryFace
));
isBlockedFace
.
re
set
(
new
bitSe
t
(
isBoundaryFace
));
}
markLeakPath
=
true
;
...
...
@@ -1147,7 +1147,7 @@ void Foam::shortestPathSet::genSamples
const
label
maxIter
,
const
polyMesh
&
mesh
,
const
labelUList
&
wallPatches
,
const
PackedBoolLis
t
&
isBlockedFace
const
bitSe
t
&
isBlockedFace
)
{
// Storage for sample points
...
...
@@ -1158,7 +1158,7 @@ void Foam::shortestPathSet::genSamples
DynamicList
<
scalar
>
samplingCurveDist
;
// Seed faces and points on 'real' boundary
PackedBoolLis
t
isBlockedPoint
(
mesh
.
nPoints
());
bitSe
t
isBlockedPoint
(
mesh
.
nPoints
());
{
// Real boundaries
const
polyBoundaryMesh
&
pbm
=
mesh
.
boundaryMesh
();
...
...
@@ -1202,11 +1202,11 @@ void Foam::shortestPathSet::genSamples
}
PackedBoolLis
t
isLeakPoint
(
isBlockedPoint
);
bitSe
t
isLeakPoint
(
isBlockedPoint
);
// Newly closed faces
PackedBoolLis
t
isLeakFace
(
mesh
.
nFaces
());
bitSe
t
isLeakFace
(
mesh
.
nFaces
());
// All cells along leak paths
PackedBoolLis
t
isLeakCell
(
mesh
.
nCells
());
bitSe
t
isLeakCell
(
mesh
.
nCells
());
label
prevSegmenti
=
0
;
scalar
prevDistance
=
0
.
0
;
...
...
@@ -1399,7 +1399,7 @@ Foam::shortestPathSet::shortestPathSet
maxIter
,
mesh
,
wallPatches
,
PackedBoolLis
t
(
isBlockedFace
)
bitSe
t
(
isBlockedFace
)
);
}
...
...
@@ -1431,7 +1431,7 @@ Foam::shortestPathSet::shortestPathSet
}
}
genSamples
(
markLeakPath
,
maxIter
,
mesh
,
wallPatches
,
PackedBoolLis
t
());
genSamples
(
markLeakPath
,
maxIter
,
mesh
,
wallPatches
,
bitSe
t
());
}
...
...
src/sampling/sampledSet/shortestPath/shortestPathSet.H
View file @
5f115371
...
...
@@ -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
"
PackedBoolLis
t.H"
#include
"
bitSe
t.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
@@ -112,7 +112,7 @@ class shortestPathSet
const
polyMesh
&
mesh
,
const
label
cellI
,
const
List
<
topoDistanceData
>&
allFaceInfo
,
const
PackedBoolLis
t
&
isLeakPoint
,
const
bitSe
t
&
isLeakPoint
,
const
bool
minDistance
,
const
point
&
origin
);
...
...
@@ -121,8 +121,8 @@ class shortestPathSet
void
sync
(
const
polyMesh
&
mesh
,
PackedBoolLis
t
&
isLeakFace
,
PackedBoolLis
t
&
isLeakPoint
,
bitSe
t
&
isLeakFace
,
bitSe
t
&
isLeakPoint
,
const
label
celli
,
point
&
origin
,
bool
&
findMinDistance
...
...
@@ -145,8 +145,8 @@ class shortestPathSet
const
polyMesh
&
mesh
,
const
label
facei
,
PackedBoolLis
t
&
isLeakFace
,
const
PackedBoolLis
t
&
isLeakPoint
bitSe
t
&
isLeakFace
,
const
bitSe
t
&
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
PackedBoolLis
t
&
isBlockedPoint
,
PackedBoolLis
t
&
isLeakFace
const
bitSe
t
&
isBlockedPoint
,
bitSe
t
&
isLeakFace
)
const
;
//- Mark faces inbetween leak cells
...
...
@@ -172,7 +172,7 @@ class shortestPathSet
const
bool
markLeakPath
,
const
label
iter
,
const
polyMesh
&
mesh
,
const
PackedBoolLis
t
&
isBlockedFace
,
const
bitSe
t
&
isBlockedFace
,
const
point
&
insidePoint
,
const
label
insideCelli
,
const
point
&
outsidePoint
,
...
...
@@ -187,9 +187,9 @@ class shortestPathSet
DynamicList
<
scalar
>&
samplingCurveDist
,
// State of current leak paths
PackedBoolLis
t
&
isLeakCell
,
PackedBoolLis
t
&
isLeakFace
,
PackedBoolLis
t
&
isLeakPoint
,
bitSe
t
&
isLeakCell
,
bitSe
t
&
isLeakFace
,
bitSe
t
&
isLeakPoint
,
// Work storage
List
<
topoDistanceData
>&
allFaceInfo
,
...
...
@@ -206,7 +206,7 @@ class shortestPathSet
const
bool
markLeakPath
,
const
label
maxIter
,
const
polyMesh
&
mesh
,
const
PackedBoolLis
t
&
isBlockedFace
,
const
bitSe
t
&
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
,
PackedBoolLis
t
&
isLeakCell
,
PackedBoolLis
t
&
isLeakFace
,
PackedBoolLis
t
&
isLeakPoint
bitSe
t
&
isLeakCell
,
bitSe
t
&
isLeakFace
,
bitSe
t
&
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
PackedBoolLis
t
&
blockedFace
const
bitSe
t
&
blockedFace
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment