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
|
else
|
||||||
{
|
{
|
||||||
word regionName;
|
regionNames.resize(1, fvMesh::defaultRegion);
|
||||||
if (args.readIfPresent("region", regionName))
|
regionDirs.resize(1, word::null);
|
||||||
|
|
||||||
|
if (args.readIfPresent("region", regionNames.first()))
|
||||||
{
|
{
|
||||||
regionNames = wordList(1, regionName);
|
regionDirs.first() = regionNames.first();
|
||||||
regionDirs = regionNames;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
regionNames = wordList(1, fvMesh::defaultRegion);
|
|
||||||
regionDirs = wordList(1, word::null);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -146,16 +146,12 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
word regionName;
|
regionNames.resize(1, fvMesh::defaultRegion);
|
||||||
if (args.readIfPresent("region", regionName))
|
regionDirs.resize(1, word::null);
|
||||||
|
|
||||||
|
if (args.readIfPresent("region", regionNames.first()))
|
||||||
{
|
{
|
||||||
regionNames = wordList(1, regionName);
|
regionDirs.first() = regionNames.first();
|
||||||
regionDirs = regionNames;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
regionNames = wordList(1, fvMesh::defaultRegion);
|
|
||||||
regionDirs = wordList(1, word::null);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -247,7 +247,7 @@ int main(int argc, char *argv[])
|
|||||||
argList::addBoolOption
|
argList::addBoolOption
|
||||||
(
|
(
|
||||||
"copyZero",
|
"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
|
argList::addBoolOption
|
||||||
(
|
(
|
||||||
@ -318,15 +318,16 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
regionNames = {fvMesh::defaultRegion};
|
regionNames.resize(1);
|
||||||
args.readIfPresent("region", regionNames[0]);
|
regionNames.first() =
|
||||||
|
args.lookupOrDefault<word>("region", fvMesh::defaultRegion);
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll(regionNames, regioni)
|
forAll(regionNames, regioni)
|
||||||
{
|
{
|
||||||
const word& regionName = regionNames[regioni];
|
const word& regionName = regionNames[regioni];
|
||||||
const word& regionDir =
|
const word& regionDir =
|
||||||
regionName == fvMesh::defaultRegion ? word::null : regionName;
|
(regionName == fvMesh::defaultRegion ? word::null : regionName);
|
||||||
|
|
||||||
Info<< "\n\nDecomposing mesh " << regionName << nl << endl;
|
Info<< "\n\nDecomposing mesh " << regionName << nl << endl;
|
||||||
|
|
||||||
|
|||||||
@ -194,14 +194,12 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
regionNames = {fvMesh::defaultRegion};
|
regionNames.resize(1, fvMesh::defaultRegion);
|
||||||
if (args.readIfPresent("region", regionNames[0]))
|
regionDirs.resize(1, word::null);
|
||||||
|
|
||||||
|
if (args.readIfPresent("region", regionNames.first()))
|
||||||
{
|
{
|
||||||
regionDirs = regionNames;
|
regionDirs.first() = regionNames.first();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
regionDirs = {word::null};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user