Commit 4b859dcc authored by Mark Olesen's avatar Mark Olesen
Browse files

argList.C added Mattijs' check on distributed roots (slaves only)

parent f1d7955e
......@@ -337,23 +337,21 @@ Foam::argList::argList
Switch distributed(false);
if (decompositionDict.found("distributed"))
if
(
decompositionDict.readIfPresent("distributed", distributed)
&& distributed
)
{
decompositionDict.lookup("distributed") >> distributed;
decompositionDict.lookup("roots") >> roots;
if (distributed)
if (roots.size() != Pstream::nProcs()-1)
{
decompositionDict.lookup("roots") >> roots;
if (roots.size() != Pstream::nProcs())
{
FatalError
<< "number of entries in "
<< "decompositionDict::roots"
<< " is not equal to the number of processors "
<< Pstream::nProcs()
<< exit(FatalError);
}
FatalError
<< "number of entries in decompositionDict::roots"
<< " is not equal to the number of slaves "
<< Pstream::nProcs()-1
<< exit(FatalError);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment