Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
integration-cfmesh
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Community
integration-cfmesh
Commits
37f772b2
Commit
37f772b2
authored
Sep 18, 2017
by
Mark Olesen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
STYLE: modernize argList usage
parent
c2df77e7
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
76 additions
and
102 deletions
+76
-102
utilities/FLMAToSurface/FLMAToSurface.C
utilities/FLMAToSurface/FLMAToSurface.C
+2
-2
utilities/FMSToSurface/FMSToSurface.C
utilities/FMSToSurface/FMSToSurface.C
+6
-6
utilities/FMSToVTK/FMSToVTK.C
utilities/FMSToVTK/FMSToVTK.C
+2
-2
utilities/checkSurfaceMesh/checkSurfaceMesh.C
utilities/checkSurfaceMesh/checkSurfaceMesh.C
+1
-1
utilities/copySurfaceParts/copySurfaceParts.C
utilities/copySurfaceParts/copySurfaceParts.C
+3
-3
utilities/extrudeEdgesInto2DSurface/extrudeEdgesInto2DSurface.C
...ies/extrudeEdgesInto2DSurface/extrudeEdgesInto2DSurface.C
+2
-2
utilities/generateBoundaryLayers/generateBoundaryLayers.C
utilities/generateBoundaryLayers/generateBoundaryLayers.C
+6
-7
utilities/importSurfaceAsSubset/importSurfaceAsSubset.C
utilities/importSurfaceAsSubset/importSurfaceAsSubset.C
+2
-2
utilities/improveMeshQuality/improveMeshQuality.C
utilities/improveMeshQuality/improveMeshQuality.C
+19
-35
utilities/mergeSurfacePatches/mergeSurfacePatches.C
utilities/mergeSurfacePatches/mergeSurfacePatches.C
+16
-22
utilities/patchesToSubsets/patchesToSubsets.C
utilities/patchesToSubsets/patchesToSubsets.C
+2
-2
utilities/removeSurfaceFacets/removeSurfaceFacets.C
utilities/removeSurfaceFacets/removeSurfaceFacets.C
+3
-3
utilities/subsetToPatch/subsetToPatch.C
utilities/subsetToPatch/subsetToPatch.C
+2
-2
utilities/surfaceFeatureEdges/surfaceFeatureEdges.C
utilities/surfaceFeatureEdges/surfaceFeatureEdges.C
+4
-9
utilities/surfaceGenerateBoundingBox/surfaceGenerateBoundingBox.C
...s/surfaceGenerateBoundingBox/surfaceGenerateBoundingBox.C
+3
-3
utilities/surfaceToFMS/surfaceToFMS.C
utilities/surfaceToFMS/surfaceToFMS.C
+3
-1
No files found.
utilities/FLMAToSurface/FLMAToSurface.C
View file @
37f772b2
...
...
@@ -46,8 +46,8 @@ int main(int argc, char *argv[])
argList
::
validArgs
.
append
(
"output surface file"
);
argList
args
(
argc
,
argv
);
fileName
inFileName
(
args
.
args
()
[
1
]);
fileName
outFileName
(
args
.
args
()
[
2
]);
fileName
inFileName
(
args
[
1
]);
fileName
outFileName
(
args
[
2
]);
if
(
inFileName
.
ext
()
!=
"flma"
)
{
...
...
utilities/FMSToSurface/FMSToSurface.C
View file @
37f772b2
...
...
@@ -105,12 +105,12 @@ int main(int argc, char *argv[])
argList
::
validArgs
.
append
(
"input surface file"
);
argList
::
validArgs
.
append
(
"output surface file"
);
argList
::
validOptions
.
insert
(
"exportSubsets"
,
"
"
);
argList
::
validOptions
.
insert
(
"exportFeatureEdges"
,
"
"
);
argList
::
addBoolOption
(
"exportSubsets
"
);
argList
::
addBoolOption
(
"exportFeatureEdges
"
);
argList
args
(
argc
,
argv
);
fileName
inFileName
(
args
.
args
()
[
1
]);
fileName
outFileName
(
args
.
args
()
[
2
]);
const
fileName
inFileName
(
args
[
1
]);
const
fileName
outFileName
(
args
[
2
]);
fileName
outFileNoExt
=
outFileName
.
lessExt
();
fileName
outExtension
=
outFileName
.
ext
();
...
...
@@ -125,7 +125,7 @@ int main(int argc, char *argv[])
origSurf
.
writeSurface
(
outFileName
);
// export surface subsets as separate surface meshes
if
(
args
.
option
s
().
f
ound
(
"exportSubsets"
))
if
(
args
.
option
F
ound
(
"exportSubsets"
))
{
DynList
<
label
>
subsetIDs
;
origSurf
.
facetSubsetIndices
(
subsetIDs
);
...
...
@@ -150,7 +150,7 @@ int main(int argc, char *argv[])
}
}
if
(
args
.
option
s
().
f
ound
(
"exportFeatureEdges"
))
if
(
args
.
option
F
ound
(
"exportFeatureEdges"
))
{
fileName
fName
=
outFileNoExt
+
"_featureEdges"
;
fName
+=
".vtk"
;
...
...
utilities/FMSToVTK/FMSToVTK.C
View file @
37f772b2
...
...
@@ -333,8 +333,8 @@ int main(int argc, char *argv[])
argList
args
(
argc
,
argv
);
// Process commandline arguments
fileName
inFileName
(
args
.
args
()
[
1
]);
fileName
outPrefix
(
args
.
args
()
[
2
]);
fileName
inFileName
(
args
[
1
]);
fileName
outPrefix
(
args
[
2
]);
// Read original surface
triSurf
origSurf
(
inFileName
);
...
...
utilities/checkSurfaceMesh/checkSurfaceMesh.C
View file @
37f772b2
...
...
@@ -44,7 +44,7 @@ int main(int argc, char *argv[])
argList
::
validArgs
.
append
(
"input surface file"
);
argList
args
(
argc
,
argv
);
const
fileName
inFileName
(
args
.
args
()
[
1
]);
const
fileName
inFileName
(
args
[
1
]);
triSurf
surf
(
inFileName
);
...
...
utilities/copySurfaceParts/copySurfaceParts.C
View file @
37f772b2
...
...
@@ -47,8 +47,8 @@ int main(int argc, char *argv[])
argList
::
validArgs
.
append
(
"patch/subset name"
);
argList
args
(
argc
,
argv
);
const
fileName
inFileName
(
args
.
args
()
[
1
]);
const
fileName
outFileName
(
args
.
args
()
[
2
]);
const
fileName
inFileName
(
args
[
1
]);
const
fileName
outFileName
(
args
[
2
]);
if
(
outFileName
==
inFileName
)
{
...
...
@@ -59,7 +59,7 @@ int main(int argc, char *argv[])
}
wordList
patches
(
1
);
patches
[
0
]
=
args
.
args
()
[
3
];
patches
[
0
]
=
args
[
3
];
triSurf
originalSurface
(
inFileName
);
...
...
utilities/extrudeEdgesInto2DSurface/extrudeEdgesInto2DSurface.C
View file @
37f772b2
...
...
@@ -46,8 +46,8 @@ int main(int argc, char *argv[])
argList
args
(
argc
,
argv
);
fileName
inFileName
(
args
.
args
()
[
1
]);
fileName
outFileName
(
args
.
args
()
[
2
]);
fileName
inFileName
(
args
[
1
]);
fileName
outFileName
(
args
[
2
]);
// read the input surface
triSurf
origSurf
(
inFileName
);
...
...
utilities/generateBoundaryLayers/generateBoundaryLayers.C
View file @
37f772b2
...
...
@@ -53,13 +53,14 @@ void generateLayer
{
const
dictionary
&
bndLayers
=
meshDict
.
subDict
(
"boundaryLayers"
);
if
(
bndLayers
.
found
(
"nLayers"
))
label
nLayers
;
if
(
bndLayers
.
readIfPresent
(
"nLayers"
,
nLayers
))
{
const
label
nLayers
=
readLabel
(
bndLayers
.
lookup
(
"nLayers"
));
if
(
nLayers
>
0
)
{
bl
.
addLayerForAllPatches
();
}
}
else
if
(
bndLayers
.
found
(
"patchBoundaryLayers"
))
{
const
dictionary
&
patchLayers
=
...
...
@@ -106,7 +107,7 @@ void layerRefinement(polyMeshGen& mesh, const dictionary& meshDict)
int
main
(
int
argc
,
char
*
argv
[])
{
argList
::
validOptions
.
insert
(
"2DLayers"
,
"bool
"
);
argList
::
addBoolOption
(
"2DLayers
"
);
# include "setRootCase.H"
# include "createTime.H"
...
...
@@ -127,9 +128,7 @@ int main(int argc, char *argv[])
polyMeshGen
pmg
(
runTime
);
pmg
.
read
();
bool
is2DLayer
(
false
);
if
(
args
.
options
().
found
(
"2DLayers"
))
is2DLayer
=
true
;
const
bool
is2DLayer
=
args
.
optionFound
(
"2DLayers"
);
// generate the initial boundary layer
generateLayer
(
pmg
,
meshDict
,
is2DLayer
);
...
...
utilities/importSurfaceAsSubset/importSurfaceAsSubset.C
View file @
37f772b2
...
...
@@ -50,8 +50,8 @@ int main(int argc, char *argv[])
argList
args
(
argc
,
argv
);
fileName
inFileName
(
args
.
args
()
[
1
]);
fileName
importFileName
(
args
.
args
()
[
2
]);
fileName
inFileName
(
args
[
1
]);
fileName
importFileName
(
args
[
2
]);
triSurf
originalSurface
(
inFileName
);
...
...
utilities/improveMeshQuality/improveMeshQuality.C
View file @
37f772b2
...
...
@@ -39,64 +39,48 @@ int main(int argc, char *argv[])
{
argList
::
validArgs
.
clear
();
argList
::
validOptions
.
insert
(
"nLoops"
,
"int"
);
argList
::
validOptions
.
insert
(
"nIterations"
,
"int"
);
argList
::
validOptions
.
insert
(
"nSurfaceIterations"
,
"int"
);
argList
::
validOptions
.
insert
(
"qualityThreshold"
,
"scalar"
);
argList
::
validOptions
.
insert
(
"constrainedCellsSet"
,
"word"
);
argList
::
addOption
(
"nLoops"
,
"int"
);
argList
::
addOption
(
"nIterations"
,
"int"
);
argList
::
addOption
(
"nSurfaceIterations"
,
"int"
);
argList
::
addOption
(
"qualityThreshold"
,
"scalar"
);
argList
::
addOption
(
"constrainedCellsSet"
,
"word"
);
# include "setRootCase.H"
# include "createTime.H"
//
read the setting
s
//
Default
s
label
nIterations
(
50
);
label
nLoops
(
10
);
label
nSurfaceIterations
(
2
);
scalar
qualityThreshold
(
0
.
1
);
if
(
args
.
options
().
found
(
"nLoops"
))
{
nLoops
=
readLabel
(
args
[
"nLoops"
]);
}
else
{
Info
<<
"Default number of loops is 10"
<<
endl
;
}
// Read the settings
if
(
args
.
options
().
found
(
"nIterations"
))
{
nIterations
=
readLabel
(
args
[
"nIterations"
]);
}
else
if
(
!
args
.
optionReadIfPresent
(
"nLoops"
,
nLoops
))
{
Info
<<
"Default number of iterations is 50"
<<
endl
;
Info
<<
"Default number of loops is "
<<
nLoops
<<
endl
;
}
if
(
args
.
options
().
found
(
"nSurfaceIterations"
))
if
(
!
args
.
optionReadIfPresent
(
"nIterations"
,
nIterations
))
{
nSurfaceIterations
=
readLabel
(
args
[
"nSurfaceIterations"
]);
}
else
{
Info
<<
"Default number of surface iterations is 2"
<<
endl
;
Info
<<
"Default number of iterations is "
<<
nIterations
<<
endl
;
}
if
(
args
.
options
().
found
(
"qualityThreshold"
))
if
(
!
args
.
optionReadIfPresent
(
"nSurfaceIterations"
,
nSurfaceIterations
))
{
qualityThreshold
=
readScalar
(
args
[
"qualityThreshold"
]);
Info
<<
"Default number of surface iterations is "
<<
nSurfaceIterations
<<
endl
;
}
else
if
(
!
args
.
optionReadIfPresent
(
"qualityThreshold"
,
qualityThreshold
))
{
Info
<<
"Using default quality threshold 0.1"
<<
endl
;
}
word
constrainedCellSet
;
if
(
args
.
options
().
found
(
"constrainedCellsSet"
))
{
constrainedCellSet
=
args
.
options
()[
"constrainedCellsSet"
];
}
else
if
(
!
args
.
optionReadIfPresent
(
"constrainedCellSet"
,
constrainedCellSet
))
{
Info
<<
"No constraints applied on the smoothing procedure"
<<
endl
;
}
...
...
utilities/mergeSurfacePatches/mergeSurfacePatches.C
View file @
37f772b2
...
...
@@ -300,31 +300,26 @@ int main(int argc, char *argv[])
argList
::
validArgs
.
append
(
"input surface file"
);
argList
::
validArgs
.
append
(
"new patch"
);
argList
::
validOptions
.
insert
(
"patchNames"
,
"list of names"
);
argList
::
validOptions
.
insert
(
"patchIds"
,
"list of patchIds"
);
argList
::
validOptions
.
insert
(
"patchIdRange"
,
"(start end)"
);
argList
::
validOptions
.
insert
(
"output"
,
"file name (default overwrite)"
);
argList
::
validOptions
.
insert
(
"keep"
,
"
"
);
argList
::
addOption
(
"patchNames"
,
"list of names"
);
argList
::
addOption
(
"patchIds"
,
"list of patchIds"
);
argList
::
addOption
(
"patchIdRange"
,
"(start end)"
);
argList
::
addOption
(
"output"
,
"file name (default overwrite)"
);
argList
::
addBoolOption
(
"keep
"
);
argList
args
(
argc
,
argv
);
// Process commandline arguments
fileName
inFileName
(
args
.
args
()
[
1
]);
fileName
inFileName
(
args
[
1
]);
word
newPatchName
(
args
.
args
()
[
2
]);
word
newPatchName
(
args
[
2
]);
fileName
outFileName
(
inFileName
);
if
(
args
.
option
s
().
f
ound
(
"output"
))
if
(
args
.
option
F
ound
(
"output"
))
{
outFileName
=
args
.
options
()
[
"output"
];
outFileName
=
args
[
"output"
];
}
bool
keepPatches
=
false
;
if
(
args
.
options
().
found
(
"keep"
))
{
keepPatches
=
true
;
}
const
bool
keepPatches
=
args
.
optionFound
(
"keep"
);
// Read original surface
triSurf
origSurf
(
inFileName
);
...
...
@@ -334,13 +329,13 @@ int main(int argc, char *argv[])
if
(
args
.
options
().
found
(
"patchNames"
))
{
if
(
args
.
option
s
().
f
ound
(
"patchIds"
))
if
(
args
.
option
F
ound
(
"patchIds"
))
{
FatalError
()
<<
"Cannot specify both patch names and ids"
<<
Foam
::
abort
(
FatalError
);
}
IStringStream
is
(
args
.
options
()
[
"patchNames"
]);
IStringStream
is
(
args
[
"patchNames"
]);
wordList
patchNames
(
is
);
getPatchIds
...
...
@@ -351,17 +346,16 @@ int main(int argc, char *argv[])
);
}
if
(
args
.
option
s
().
f
ound
(
"patchIds"
))
if
(
args
.
option
F
ound
(
"patchIds"
))
{
IStringStream
is
(
args
.
options
()
[
"patchIds"
]);
IStringStream
is
(
args
[
"patchIds"
]);
patchIds
.
append
(
labelList
(
is
));
}
if
(
args
.
option
s
().
f
ound
(
"patchIdRange"
))
if
(
args
.
option
F
ound
(
"patchIdRange"
))
{
IStringStream
is
(
args
.
options
()[
"patchIdRange"
]);
IStringStream
is
(
args
[
"patchIdRange"
]);
Pair
<
label
>
idRange
(
is
);
for
(
label
id
=
idRange
.
first
();
id
<=
idRange
.
second
();
id
++
)
...
...
utilities/patchesToSubsets/patchesToSubsets.C
View file @
37f772b2
...
...
@@ -46,8 +46,8 @@ int main(int argc, char *argv[])
argList
::
validArgs
.
append
(
"output surface file"
);
argList
args
(
argc
,
argv
);
fileName
inFileName
(
args
.
args
()
[
1
]);
fileName
outFileName
(
args
.
args
()
[
2
]);
fileName
inFileName
(
args
[
1
]);
fileName
outFileName
(
args
[
2
]);
if
(
outFileName
.
ext
()
!=
"fms"
)
Warning
<<
"The subsets cann only be saved in the .fms format"
<<
endl
;
...
...
utilities/removeSurfaceFacets/removeSurfaceFacets.C
View file @
37f772b2
...
...
@@ -46,9 +46,9 @@ int main(int argc, char *argv[])
argList
args
(
argc
,
argv
);
fileName
inFileName
(
args
.
args
()
[
1
]);
fileName
outFileName
(
args
.
args
()
[
2
]);
word
patchName
(
args
.
args
()
[
3
]);
fileName
inFileName
(
args
[
1
]);
fileName
outFileName
(
args
[
2
]);
word
patchName
(
args
[
3
]);
// read the input surface
triSurf
origSurf
(
inFileName
);
...
...
utilities/subsetToPatch/subsetToPatch.C
View file @
37f772b2
...
...
@@ -125,8 +125,8 @@ int main(int argc, char *argv[])
argList
::
validArgs
.
append
(
"subset"
);
argList
args
(
argc
,
argv
);
fileName
inFileName
(
args
.
args
()
[
1
]);
word
subsetName
(
args
.
args
()
[
2
]);
fileName
inFileName
(
args
[
1
]);
word
subsetName
(
args
[
2
]);
triSurf
*
origSurfPtr
=
new
triSurf
(
inFileName
);
...
...
utilities/surfaceFeatureEdges/surfaceFeatureEdges.C
View file @
37f772b2
...
...
@@ -49,11 +49,11 @@ int main(int argc, char *argv[])
argList
::
validArgs
.
clear
();
argList
::
validArgs
.
append
(
"input surface file"
);
argList
::
validArgs
.
append
(
"output surface file"
);
argList
::
validOptions
.
insert
(
"angle"
,
"scalar"
);
argList
::
addOption
(
"angle"
,
"scalar"
);
argList
args
(
argc
,
argv
);
fileName
inFileName
(
args
.
args
()
[
1
]);
fileName
outFileName
(
args
.
args
()
[
2
]);
const
fileName
inFileName
(
args
[
1
]);
const
fileName
outFileName
(
args
[
2
]);
if
(
outFileName
==
inFileName
)
{
...
...
@@ -64,12 +64,7 @@ int main(int argc, char *argv[])
}
scalar
tol
(
45
.
0
);
if
(
args
.
options
().
found
(
"angle"
))
{
const
scalar
ang
=
readScalar
(
args
[
"angle"
]);
tol
=
ang
;
}
else
if
(
!
args
.
optionReadIfPresent
(
"angle"
,
tol
))
{
Info
<<
"Using 45 deg as default angle!"
<<
endl
;
}
...
...
utilities/surfaceGenerateBoundingBox/surfaceGenerateBoundingBox.C
View file @
37f772b2
...
...
@@ -56,8 +56,8 @@ int main(int argc, char *argv[])
argList
args
(
argc
,
argv
);
fileName
inFileName
(
args
.
args
()
[
1
]);
fileName
outFileName
(
args
.
args
()
[
2
]);
fileName
inFileName
(
args
[
1
]);
fileName
outFileName
(
args
[
2
]);
if
(
outFileName
==
inFileName
)
{
...
...
@@ -77,7 +77,7 @@ int main(int argc, char *argv[])
for
(
label
i
=
3
;
i
<
9
;
++
i
)
{
std
::
stringstream
ss
;
ss
<<
args
.
args
()
[
i
];
ss
<<
args
[
i
];
scalar
s
;
ss
>>
s
;
...
...
utilities/surfaceToFMS/surfaceToFMS.C
View file @
37f772b2
...
...
@@ -43,10 +43,12 @@ int main(int argc, char *argv[])
argList
::
validArgs
.
append
(
"input surface file"
);
argList
args
(
argc
,
argv
);
const
fileName
inFileName
(
args
.
args
()
[
1
]);
const
fileName
inFileName
(
args
[
1
]);
if
(
inFileName
.
ext
()
==
"fms"
)
{
FatalError
<<
"trying to convert a fms file to itself"
<<
exit
(
FatalError
);
}
fileName
outFileName
(
inFileName
.
lessExt
()
+
".fms"
);
...
...
Write
Preview
Markdown
is supported
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