Skip to content

Commit 16d810c

Browse files
author
Henry Weller
committed
ideasUnvToFoam: added region option
This allows mesh conversion of several UNV files into region meshes of a multi-region case. Patch contributed by Tobias Holzmann
1 parent a3f769b commit 16d810c

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,11 @@ int main(int argc, char *argv[])
667667
"dump",
668668
"dump boundary faces as boundaryFaces.obj (for debugging)"
669669
);
670+
argList::addOption
671+
(
672+
"region",
673+
"specify the mesh region"
674+
);
670675

671676
#include "setRootCase.H"
672677
#include "createTime.H"
@@ -681,7 +686,6 @@ int main(int argc, char *argv[])
681686
<< exit(FatalError);
682687
}
683688

684-
685689
// Switch on additional debug info
686690
const bool verbose = false; // true;
687691

@@ -1161,14 +1165,20 @@ int main(int argc, char *argv[])
11611165

11621166
Info<< endl;
11631167

1168+
// Set regions path if set
1169+
word regionName = polyMesh::defaultRegion;
11641170

1171+
if (args.optionFound("region"))
1172+
{
1173+
regionName = args.option("region");
1174+
}
11651175

11661176
// Construct mesh
11671177
polyMesh mesh
11681178
(
11691179
IOobject
11701180
(
1171-
polyMesh::defaultRegion,
1181+
regionName,
11721182
runTime.constant(),
11731183
runTime
11741184
),

0 commit comments

Comments
 (0)