mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: more consistency in handling of -region vs -allRegions
This commit is contained in:
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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<word>("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;
|
||||
|
||||
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user