mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
- 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:
@ -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",
|
||||
|
||||
Reference in New Issue
Block a user