Commit 482a1b08 authored by mattijs's avatar mattijs Committed by Andrew Heather
Browse files

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

parent 28335215
......@@ -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
......
......@@ -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
......
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