Added region support

This commit is contained in:
Hrvoje Jasak 2018-12-04 10:28:48 +00:00
parent b9d1febcdc
commit 4ec6684c03
2 changed files with 32 additions and 10 deletions

View file

@ -275,7 +275,7 @@ int main(int argc, char *argv[])
( (
IOobject IOobject
( (
fvMesh::defaultRegion, targetRegionName,
runTimeTarget.timeName(), runTimeTarget.timeName(),
runTimeTarget runTimeTarget
) )
@ -300,7 +300,7 @@ int main(int argc, char *argv[])
( (
IOobject IOobject
( (
fvMesh::defaultRegion, sourceRegionName,
runTimeSource.timeName(), runTimeSource.timeName(),
runTimeSource runTimeSource
) )
@ -342,7 +342,7 @@ int main(int argc, char *argv[])
( (
IOobject IOobject
( (
fvMesh::defaultRegion, sourceRegionName,
runTimeSource.timeName(), runTimeSource.timeName(),
runTimeSource runTimeSource
) )
@ -365,7 +365,7 @@ int main(int argc, char *argv[])
( (
IOobject IOobject
( (
fvMesh::defaultRegion, targetRegionName,
runTimeTarget.timeName(), runTimeTarget.timeName(),
runTimeTarget runTimeTarget
) )
@ -446,7 +446,7 @@ int main(int argc, char *argv[])
( (
IOobject IOobject
( (
fvMesh::defaultRegion, sourceRegionName,
runTimeSource.timeName(), runTimeSource.timeName(),
runTimeSource runTimeSource
) )
@ -481,7 +481,7 @@ int main(int argc, char *argv[])
( (
IOobject IOobject
( (
fvMesh::defaultRegion, targetRegionName,
runTimeTarget.timeName(), runTimeTarget.timeName(),
runTimeTarget runTimeTarget
) )
@ -523,7 +523,7 @@ int main(int argc, char *argv[])
( (
IOobject IOobject
( (
fvMesh::defaultRegion, sourceRegionName,
runTimeSource.timeName(), runTimeSource.timeName(),
runTimeSource runTimeSource
) )
@ -533,7 +533,7 @@ int main(int argc, char *argv[])
( (
IOobject IOobject
( (
fvMesh::defaultRegion, targetRegionName,
runTimeTarget.timeName(), runTimeTarget.timeName(),
runTimeTarget runTimeTarget
) )

View file

@ -2,6 +2,9 @@
argList::validArgs.clear(); argList::validArgs.clear();
argList::validArgs.append("source dir"); argList::validArgs.append("source dir");
argList::validOptions.insert("sourceRegion", "name");
argList::validOptions.insert("targetRegion", "name");
argList::validOptions.insert("sourceTime", "scalar"); argList::validOptions.insert("sourceTime", "scalar");
argList::validOptions.insert("parallelSource", ""); argList::validOptions.insert("parallelSource", "");
argList::validOptions.insert("parallelTarget", ""); argList::validOptions.insert("parallelTarget", "");
@ -21,8 +24,27 @@
fileName rootDirSource = casePath.path(); fileName rootDirSource = casePath.path();
fileName caseDirSource = casePath.name(); fileName caseDirSource = casePath.name();
Info<< "Source: " << rootDirSource << " " << caseDirSource << nl word sourceRegionName;
<< "Target: " << rootDirTarget << " " << caseDirTarget << endl; word targetRegionName;
args.optionReadIfPresent
(
"sourceRegion",
sourceRegionName,
fvMesh::defaultRegion
);
args.optionReadIfPresent
(
"targetRegion",
targetRegionName,
fvMesh::defaultRegion
);
Info<< "Source: " << rootDirSource << " " << caseDirSource
<< " " << sourceRegionName << nl
<< "Target: " << rootDirTarget << " " << caseDirTarget
<< " " << targetRegionName << endl;
bool parallelSource = args.optionFound("parallelSource"); bool parallelSource = args.optionFound("parallelSource");
bool parallelTarget = args.optionFound("parallelTarget"); bool parallelTarget = args.optionFound("parallelTarget");