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
bcda061f
Commit
bcda061f
authored
Jul 23, 2020
by
mattijs
Browse files
ENH: checkMesh: improved checking on writeFields. Fixes
#1786
.
parent
d3c76d8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
applications/utilities/mesh/manipulation/checkMesh/checkMesh.C
View file @
bcda061f
...
...
@@ -142,31 +142,45 @@ int main(int argc, char *argv[])
const
word
surfaceFormat
=
args
.
getOrDefault
<
word
>
(
"writeSets"
,
""
);
const
bool
writeSets
=
surfaceFormat
.
size
();
// All potential writeable fields
const
wordHashSet
allFields
({
"nonOrthoAngle"
,
"faceWeight"
,
"skewness"
,
"cellDeterminant"
,
"aspectRatio"
,
"cellShapes"
,
"cellVolume"
,
"cellVolumeRatio"
,
"minTetVolume"
,
"minPyrVolume"
,
"cellRegion"
,
"wallDistance"
,
"cellZone"
,
"faceZone"
});
wordHashSet
selectedFields
;
bool
writeFields
=
args
.
readIfPresent
(
"writeFields"
,
selectedFields
);
if
(
!
writeFields
&&
args
.
found
(
"writeAllFields"
))
if
(
args
.
found
(
"writeFields"
))
{
selectedFields
=
args
.
getList
<
word
>
(
"writeFields"
);
wordHashSet
badFields
(
selectedFields
);
badFields
-=
allFields
;
if
(
!
badFields
.
empty
())
{
FatalErrorInFunction
<<
"Illegal field(s) "
<<
flatOutput
(
badFields
.
sortedToc
())
<<
nl
<<
"Valid fields are "
<<
flatOutput
(
allFields
.
sortedToc
())
<<
nl
<<
exit
(
FatalError
);
}
}
else
if
(
args
.
found
(
"writeAllFields"
))
{
selectedFields
.
insert
({
"nonOrthoAngle"
,
"faceWeight"
,
"skewness"
,
"cellDeterminant"
,
"aspectRatio"
,
"cellShapes"
,
"cellVolume"
,
"cellVolumeRatio"
,
"minTetVolume"
,
"minPyrVolume"
,
"cellRegion"
,
"wallDistance"
,
"cellZone"
,
"faceZone"
});
selectedFields
=
allFields
;
}
...
...
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