Skip to content
GitLab
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
d5884c8d
Commit
d5884c8d
authored
Jul 24, 2020
by
Mark OLESEN
Browse files
STYLE: use HashSet xor instead of two operations (faceZoneSet)
STYLE: use global operator instead of HashSet -= operator
parent
6e75cf2e
Changes
2
Hide whitespace changes
Inline
Side-by-side
applications/utilities/mesh/manipulation/checkMesh/checkMesh.C
View file @
d5884c8d
...
...
@@ -166,8 +166,7 @@ int main(int argc, char *argv[])
if
(
args
.
found
(
"writeFields"
))
{
selectedFields
=
args
.
getList
<
word
>
(
"writeFields"
);
wordHashSet
badFields
(
selectedFields
);
badFields
-=
allFields
;
const
wordHashSet
badFields
(
selectedFields
-
allFields
);
if
(
!
badFields
.
empty
())
{
...
...
@@ -229,7 +228,7 @@ int main(int argc, char *argv[])
IOobject
::
MUST_READ
,
IOobject
::
NO_WRITE
)
)
)
);
}
...
...
src/meshTools/sets/topoSets/faceZoneSet.C
View file @
d5884c8d
...
...
@@ -320,17 +320,11 @@ void Foam::faceZoneSet::sync(const polyMesh& mesh)
{
const
labelHashSet
zoneSet
(
addressing_
);
//
Get e
lements that are in zone but not faceSet
labelHashSet
badSet
(
zoneSet
);
badSet
-=
*
this
;
//
E
lements that are in zone but not faceSet
, and
// elements that are in faceSet but not in zone
labelHashSet
badSet
(
*
this
^
zoneSet
)
;
// Add elements that are in faceSet but not in zone
labelHashSet
fSet
(
*
this
);
fSet
-=
zoneSet
;
badSet
+=
fSet
;
label
nBad
=
returnReduce
(
badSet
.
size
(),
sumOp
<
label
>
());
const
label
nBad
=
returnReduce
(
badSet
.
size
(),
sumOp
<
label
>
());
if
(
nBad
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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