diff --git a/applications/utilities/preProcessing/mapFields/mapFields.C b/applications/utilities/preProcessing/mapFields/mapFields.C index 2f0277417..bd3c36904 100644 --- a/applications/utilities/preProcessing/mapFields/mapFields.C +++ b/applications/utilities/preProcessing/mapFields/mapFields.C @@ -275,7 +275,7 @@ int main(int argc, char *argv[]) ( IOobject ( - fvMesh::defaultRegion, + targetRegionName, runTimeTarget.timeName(), runTimeTarget ) @@ -300,7 +300,7 @@ int main(int argc, char *argv[]) ( IOobject ( - fvMesh::defaultRegion, + sourceRegionName, runTimeSource.timeName(), runTimeSource ) @@ -342,7 +342,7 @@ int main(int argc, char *argv[]) ( IOobject ( - fvMesh::defaultRegion, + sourceRegionName, runTimeSource.timeName(), runTimeSource ) @@ -365,7 +365,7 @@ int main(int argc, char *argv[]) ( IOobject ( - fvMesh::defaultRegion, + targetRegionName, runTimeTarget.timeName(), runTimeTarget ) @@ -446,7 +446,7 @@ int main(int argc, char *argv[]) ( IOobject ( - fvMesh::defaultRegion, + sourceRegionName, runTimeSource.timeName(), runTimeSource ) @@ -481,7 +481,7 @@ int main(int argc, char *argv[]) ( IOobject ( - fvMesh::defaultRegion, + targetRegionName, runTimeTarget.timeName(), runTimeTarget ) @@ -523,7 +523,7 @@ int main(int argc, char *argv[]) ( IOobject ( - fvMesh::defaultRegion, + sourceRegionName, runTimeSource.timeName(), runTimeSource ) @@ -533,7 +533,7 @@ int main(int argc, char *argv[]) ( IOobject ( - fvMesh::defaultRegion, + targetRegionName, runTimeTarget.timeName(), runTimeTarget ) diff --git a/applications/utilities/preProcessing/mapFields/setRoots.H b/applications/utilities/preProcessing/mapFields/setRoots.H index 6aceba234..5964c26ce 100644 --- a/applications/utilities/preProcessing/mapFields/setRoots.H +++ b/applications/utilities/preProcessing/mapFields/setRoots.H @@ -2,6 +2,9 @@ argList::validArgs.clear(); argList::validArgs.append("source dir"); + argList::validOptions.insert("sourceRegion", "name"); + argList::validOptions.insert("targetRegion", "name"); + argList::validOptions.insert("sourceTime", "scalar"); argList::validOptions.insert("parallelSource", ""); argList::validOptions.insert("parallelTarget", ""); @@ -21,8 +24,27 @@ fileName rootDirSource = casePath.path(); fileName caseDirSource = casePath.name(); - Info<< "Source: " << rootDirSource << " " << caseDirSource << nl - << "Target: " << rootDirTarget << " " << caseDirTarget << endl; + word sourceRegionName; + 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 parallelTarget = args.optionFound("parallelTarget");