Commit da8198a4 authored by mattijs's avatar mattijs
Browse files

added region option

parent 1bdfa97f
......@@ -49,7 +49,7 @@ int main(int argc, char *argv[])
(
IOobject
(
mergePolyMesh::defaultRegion,
masterRegion,
runTimeMaster.timeName(),
runTimeMaster
)
......@@ -63,7 +63,7 @@ int main(int argc, char *argv[])
(
IOobject
(
mergePolyMesh::defaultRegion,
addRegion,
runTimeToAdd.timeName(),
runTimeToAdd
)
......
......@@ -2,9 +2,11 @@
argList::validArgs.append("master root");
argList::validArgs.append("master case");
argList::validOptions.insert("masterRegion", "name");
argList::validArgs.append("root to add");
argList::validArgs.append("case to add");
argList::validOptions.insert("addRegion", "name");
argList args(argc, argv);
......@@ -15,9 +17,15 @@
fileName rootDirMaster(args.additionalArgs()[0]);
fileName caseDirMaster(args.additionalArgs()[1]);
word masterRegion = polyMesh::defaultRegion;
args.optionReadIfPresent("masterRegion", masterRegion);
fileName rootDirToAdd(args.additionalArgs()[2]);
fileName caseDirToAdd(args.additionalArgs()[3]);
word addRegion = polyMesh::defaultRegion;
args.optionReadIfPresent("addRegion", addRegion);
Info<< "Master: " << rootDirMaster << " " << caseDirMaster << nl
<< "mesh to add: " << rootDirToAdd << " " << caseDirToAdd << endl;
Info<< "Master: " << rootDirMaster << " " << caseDirMaster
<< " region " << masterRegion << nl
<< "mesh to add: " << rootDirToAdd << " " << caseDirToAdd
<< " region " << addRegion << endl;
......@@ -38,13 +38,14 @@ Description
int main(int argc, char *argv[])
{
# include "addRegionOption.H"
timeSelector::addOptions();
argList::validArgs.append("fieldName");
argList::validArgs.append("patchName");
# include "setRootCase.H"
# include "createTime.H"
instantList timeDirs = timeSelector::select0(runTime, args);
# include "createMesh.H"
# include "createNamedMesh.H"
word fieldName(args.additionalArgs()[0]);
word patchName(args.additionalArgs()[1]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment