ENH: scotchDecomp: check validity of processorWeights. Fixes #1207.

This commit is contained in:
mattijs
2019-02-14 12:40:25 +00:00
committed by Andrew Heather
parent 2833521576
commit 482a1b08a7
2 changed files with 17 additions and 0 deletions

View File

@ -718,6 +718,15 @@ Foam::label Foam::ptscotchDecomp::decompose
<< processorWeights
<< endl;
}
if (processorWeights.size() != nDomains_)
{
FatalIOErrorInFunction(coeffsDict_)
<< "processorWeights not the same size"
<< " as the wanted number of domains " << nDomains_
<< exit(FatalIOError);
}
check
(
SCOTCH_archCmpltw

View File

@ -349,6 +349,14 @@ Foam::label Foam::scotchDecomp::decomposeSerial
Info<< "scotchDecomp : Using procesor weights " << processorWeights
<< endl;
}
if (processorWeights.size() != nDomains_)
{
FatalIOErrorInFunction(coeffsDict_)
<< "processorWeights not the same size"
<< " as the wanted number of domains " << nDomains_
<< exit(FatalIOError);
}
check
(
SCOTCH_archCmpltw