BUG: resolve some decomposeParDict problems (issues #60, #265).

- Cleanup/centralize handling of -decomposeParDict by relocating
  common code into argList. Ensures that all processes receive
  identical information about the -decomposeParDict opton.

- Only use alternative decomposeParDict for simpleFoam/motorBike
  tutorial so that this will be included in the test loop for snappy.

- Added Mattijs' fix for surfaceRedistributePar.
This commit is contained in:
Mark Olesen
2016-10-25 18:19:19 +02:00
parent 196a4ea4e5
commit 52d0289ee1
16 changed files with 106 additions and 107 deletions

View File

@ -51,13 +51,11 @@ int readNumProcs
const Time& runTime
)
{
const word dictName = "decomposeParDict";
fileName dictFile;
if (args.optionReadIfPresent(optionName, dictFile))
if (args.optionReadIfPresent(optionName, dictFile) && isDir(dictFile))
{
if (isDir(dictFile))
{
dictFile = dictFile/"decomposeParDict";
}
dictFile = dictFile / dictName;
}
return readInt
@ -68,7 +66,7 @@ int readNumProcs
(
IOobject
(
"decomposeParDict",
dictName,
runTime.system(),
runTime,
IOobject::MUST_READ_IF_MODIFIED,
@ -376,7 +374,7 @@ int main(int argc, char *argv[])
if (parallelSource && !parallelTarget)
{
int nProcs = readNumProcs
const int nProcs = readNumProcs
(
args,
"sourceDecomposeParDict",
@ -448,7 +446,7 @@ int main(int argc, char *argv[])
}
else if (!parallelSource && parallelTarget)
{
int nProcs = readNumProcs
const int nProcs = readNumProcs
(
args,
"targetDecomposeParDict",
@ -521,13 +519,13 @@ int main(int argc, char *argv[])
}
else if (parallelSource && parallelTarget)
{
int nProcsSource = readNumProcs
const int nProcsSource = readNumProcs
(
args,
"sourceDecomposeParDict",
runTimeSource
);
int nProcsTarget = readNumProcs
const int nProcsTarget = readNumProcs
(
args,
"targetDecomposeParDict",