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
Community
integration-cfmesh
Compare Revisions
23d46a1bc7c2b1fe854549f37c8357e3f00478d7...20ca801a3ac0b35064ad92a3aa5482c24e70c3f4
Commits (1)
STYLE: avoid deprecated argList methods
· 20ca801a
Mark OLESEN
authored
May 31, 2019
20ca801a
Hide whitespace changes
Inline
Side-by-side
utilities/FMSToSurface/FMSToSurface.C
View file @
20ca801a
...
...
@@ -132,7 +132,7 @@ int main(int argc, char *argv[])
origSurf
.
writeSurface
(
outFileName
);
// export surface subsets as separate surface meshes
if
(
args
.
optionF
ound
(
"exportSubsets"
))
if
(
args
.
f
ound
(
"exportSubsets"
))
{
DynList
<
label
>
subsetIDs
;
origSurf
.
facetSubsetIndices
(
subsetIDs
);
...
...
@@ -157,7 +157,7 @@ int main(int argc, char *argv[])
}
}
if
(
args
.
optionF
ound
(
"exportFeatureEdges"
))
if
(
args
.
f
ound
(
"exportFeatureEdges"
))
{
fileName
fName
=
outFileNoExt
+
"_featureEdges"
;
fName
+=
".vtk"
;
...
...
utilities/generateBoundaryLayers/generateBoundaryLayers.C
View file @
20ca801a
...
...
@@ -136,7 +136,7 @@ int main(int argc, char *argv[])
polyMeshGen
pmg
(
runTime
);
pmg
.
read
();
const
bool
is2DLayer
=
args
.
optionF
ound
(
"2DLayers"
);
const
bool
is2DLayer
=
args
.
f
ound
(
"2DLayers"
);
// generate the initial boundary layer
generateLayer
(
pmg
,
meshDict
,
is2DLayer
);
...
...
utilities/improveMeshQuality/improveMeshQuality.C
View file @
20ca801a
...
...
@@ -64,31 +64,31 @@ int main(int argc, char *argv[])
// Read the settings
if
(
!
args
.
optionR
eadIfPresent
(
"nLoops"
,
nLoops
))
if
(
!
args
.
r
eadIfPresent
(
"nLoops"
,
nLoops
))
{
Info
<<
"Default number of loops is "
<<
nLoops
<<
endl
;
}
if
(
!
args
.
optionR
eadIfPresent
(
"nIterations"
,
nIterations
))
if
(
!
args
.
r
eadIfPresent
(
"nIterations"
,
nIterations
))
{
Info
<<
"Default number of iterations is "
<<
nIterations
<<
endl
;
}
if
(
!
args
.
optionR
eadIfPresent
(
"nSurfaceIterations"
,
nSurfaceIterations
))
if
(
!
args
.
r
eadIfPresent
(
"nSurfaceIterations"
,
nSurfaceIterations
))
{
Info
<<
"Default number of surface iterations is "
<<
nSurfaceIterations
<<
endl
;
}
if
(
!
args
.
optionR
eadIfPresent
(
"qualityThreshold"
,
qualityThreshold
))
if
(
!
args
.
r
eadIfPresent
(
"qualityThreshold"
,
qualityThreshold
))
{
Info
<<
"Using default quality threshold 0.1"
<<
endl
;
}
word
constrainedCellSet
;
if
(
!
args
.
optionR
eadIfPresent
(
"constrainedCellSet"
,
constrainedCellSet
))
if
(
!
args
.
r
eadIfPresent
(
"constrainedCellSet"
,
constrainedCellSet
))
{
Info
<<
"No constraints applied on the smoothing procedure"
<<
endl
;
}
...
...
utilities/mergeSurfacePatches/mergeSurfacePatches.C
View file @
20ca801a
...
...
@@ -69,7 +69,8 @@ void getPatchIds
if
(
nFound
!=
patchNames
.
size
())
{
WarningInFunction
<<
"Not all supplied patch names were found on the surface mesh"
<<
endl
;
<<
"Not all supplied patch names were found on the surface mesh"
<<
endl
;
}
}
...
...
@@ -321,12 +322,9 @@ int main(int argc, char *argv[])
fileName
outFileName
(
inFileName
);
if
(
args
.
optionFound
(
"output"
))
{
outFileName
=
args
[
"output"
];
}
args
.
readIfPresent
(
"output"
,
outFileName
);
const
bool
keepPatches
=
args
.
optionF
ound
(
"keep"
);
const
bool
keepPatches
=
args
.
f
ound
(
"keep"
);
// Read original surface
triSurf
origSurf
(
inFileName
);
...
...
@@ -334,16 +332,16 @@ int main(int argc, char *argv[])
// Get patch ids
DynamicList
<
label
>
patchIds
;
if
(
args
.
options
().
found
(
"patchNames"
))
if
(
args
.
found
(
"patchNames"
))
{
if
(
args
.
optionF
ound
(
"patchIds"
))
if
(
args
.
f
ound
(
"patchIds"
))
{
FatalError
()
<<
"Cannot specify both patch names and ids"
FatalErrorInFunction
<<
"Cannot specify both patch names and ids"
<<
nl
<<
Foam
::
abort
(
FatalError
);
}
IStringStream
is
(
args
[
"patchNames"
]);
wordList
patchNames
(
is
);
wordList
patchNames
(
args
.
getList
<
word
>
(
"patchNames"
));
getPatchIds
(
...
...
@@ -352,20 +350,15 @@ int main(int argc, char *argv[])
patchIds
);
}
if
(
args
.
optionFound
(
"patchIds"
))
else
if
(
args
.
found
(
"patchIds"
))
{
IStringStream
is
(
args
[
"patchIds"
]);
patchIds
.
append
(
labelList
(
is
));
patchIds
.
append
(
args
.
getList
<
label
>
(
"patchIds"
));
}
if
(
args
.
optionFound
(
"patchIdRange"
))
labelPair
idRange
;
if
(
args
.
readIfPresent
(
"patchIdRange"
,
idRange
))
{
IStringStream
is
(
args
[
"patchIdRange"
]);
Pair
<
label
>
idRange
(
is
);
for
(
label
id
=
idRange
.
first
();
id
<=
idRange
.
second
();
id
++
)
for
(
label
id
=
idRange
.
first
();
id
<=
idRange
.
second
();
++
id
)
{
patchIds
.
append
(
id
);
}
...
...
@@ -373,7 +366,8 @@ int main(int argc, char *argv[])
if
(
!
patchIds
.
size
())
{
FatalError
()
<<
"No patches specified"
FatalErrorInFunction
<<
"No patches specified"
<<
nl
<<
Foam
::
abort
(
FatalError
);
}
...
...
@@ -389,11 +383,11 @@ int main(int argc, char *argv[])
// Write new surface mesh
newSurf
->
writeSurface
(
outFileName
);
Info
<<
"Original surface patches: "
<<
origSurf
.
patches
().
size
()
<<
endl
;
Info
<<
"Final surface patches: "
<<
newSurf
->
patches
().
size
()
<<
endl
;
Info
<<
"Surface written to "
<<
outFileName
<<
endl
;
Info
<<
"Original surface patches: "
<<
origSurf
.
patches
().
size
()
<<
nl
<<
"Final surface patches: "
<<
newSurf
->
patches
().
size
()
<<
nl
<<
"Surface written to "
<<
outFileName
<<
endl
;
Info
<<
"End
\n
"
<<
endl
;
Info
<<
"
\n
End
\n
"
<<
endl
;
return
0
;
}
...
...
utilities/scaleMesh/scaleMesh.C
View file @
20ca801a
...
...
@@ -48,8 +48,7 @@ int main(int argc, char *argv[])
#include
"setRootCase.H"
#include
"createTime.H"
// const scalar scalingFactor(readScalar(args[1]));
const
scalar
scalingFactor
(
args
.
argRead
<
scalar
>
(
1
));
const
scalar
scalingFactor
(
args
.
get
<
scalar
>
(
1
));
Info
<<
"Scaling mesh vertices by a factor "
<<
scalingFactor
<<
endl
;
...
...
utilities/scaleSurfaceMesh/scaleSurfaceMesh.C
View file @
20ca801a
...
...
@@ -54,8 +54,7 @@ int main(int argc, char *argv[])
const
fileName
inFileName
(
args
[
1
]);
const
fileName
outFileName
(
args
[
2
]);
// const scalar scalingFactor(readScalar(args[3]));
const
scalar
scalingFactor
(
args
.
argRead
<
scalar
>
(
3
));
const
scalar
scalingFactor
(
args
.
get
<
scalar
>
(
3
));
// read the surface mesh
triSurf
surface
(
inFileName
);
...
...
utilities/surfaceFeatureEdges/surfaceFeatureEdges.C
View file @
20ca801a
...
...
@@ -68,7 +68,7 @@ int main(int argc, char *argv[])
}
scalar
tol
(
45
.
0
);
if
(
!
args
.
optionR
eadIfPresent
(
"angle"
,
tol
))
if
(
!
args
.
r
eadIfPresent
(
"angle"
,
tol
))
{
Info
<<
"Using 45 deg as default angle!"
<<
endl
;
}
...
...
utilities/surfaceToFMS/surfaceToFMS.C
View file @
20ca801a
...
...
@@ -52,7 +52,8 @@ int main(int argc, char *argv[])
const
fileName
inFileName
(
args
[
1
]);
if
(
inFileName
.
ext
()
==
"fms"
)
{
FatalError
<<
"trying to convert a fms file to itself"
FatalErrorInFunction
<<
"trying to convert a fms file to itself"
<<
nl
<<
exit
(
FatalError
);
}
...
...