diff --git a/applications/test/checkDecomposePar/Test-checkDecomposePar.C b/applications/test/checkDecomposePar/Test-checkDecomposePar.C index 49eed5ed13..a34d695b86 100644 --- a/applications/test/checkDecomposePar/Test-checkDecomposePar.C +++ b/applications/test/checkDecomposePar/Test-checkDecomposePar.C @@ -108,16 +108,12 @@ int main(int argc, char *argv[]) } else { - word regionName; - if (args.readIfPresent("region", regionName)) + regionNames.resize(1, fvMesh::defaultRegion); + regionDirs.resize(1, word::null); + + if (args.readIfPresent("region", regionNames.first())) { - regionNames = wordList(1, regionName); - regionDirs = regionNames; - } - else - { - regionNames = wordList(1, fvMesh::defaultRegion); - regionDirs = wordList(1, word::null); + regionDirs.first() = regionNames.first(); } } diff --git a/applications/test/decomposePar/Test-decomposePar.C b/applications/test/decomposePar/Test-decomposePar.C index 8026319c17..96d9f3726a 100644 --- a/applications/test/decomposePar/Test-decomposePar.C +++ b/applications/test/decomposePar/Test-decomposePar.C @@ -146,16 +146,12 @@ int main(int argc, char *argv[]) } else { - word regionName; - if (args.readIfPresent("region", regionName)) + regionNames.resize(1, fvMesh::defaultRegion); + regionDirs.resize(1, word::null); + + if (args.readIfPresent("region", regionNames.first())) { - regionNames = wordList(1, regionName); - regionDirs = regionNames; - } - else - { - regionNames = wordList(1, fvMesh::defaultRegion); - regionDirs = wordList(1, word::null); + regionDirs.first() = regionNames.first(); } } diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C index f2fa418280..1626063681 100644 --- a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C +++ b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C @@ -247,7 +247,7 @@ int main(int argc, char *argv[]) argList::addBoolOption ( "copyZero", - "Copy \a 0 directory to processor* rather than decompose the fields" + "Copy a 0 directory to processor* rather than decompose the fields" ); argList::addBoolOption ( @@ -318,15 +318,16 @@ int main(int argc, char *argv[]) } else { - regionNames = {fvMesh::defaultRegion}; - args.readIfPresent("region", regionNames[0]); + regionNames.resize(1); + regionNames.first() = + args.lookupOrDefault("region", fvMesh::defaultRegion); } forAll(regionNames, regioni) { const word& regionName = regionNames[regioni]; const word& regionDir = - regionName == fvMesh::defaultRegion ? word::null : regionName; + (regionName == fvMesh::defaultRegion ? word::null : regionName); Info<< "\n\nDecomposing mesh " << regionName << nl << endl; diff --git a/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C b/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C index 0e653aae20..8a6c49fee7 100644 --- a/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C +++ b/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C @@ -194,14 +194,12 @@ int main(int argc, char *argv[]) } else { - regionNames = {fvMesh::defaultRegion}; - if (args.readIfPresent("region", regionNames[0])) + regionNames.resize(1, fvMesh::defaultRegion); + regionDirs.resize(1, word::null); + + if (args.readIfPresent("region", regionNames.first())) { - regionDirs = regionNames; - } - else - { - regionDirs = {word::null}; + regionDirs.first() = regionNames.first(); } }