Report cluster size in AMG coarsening

This commit is contained in:
Hrvoje Jasak 2017-02-06 11:38:05 +00:00
parent a8ddd0885f
commit fdffd47248

View file

@ -369,6 +369,20 @@ void Foam::BlockMatrixAgglomeration<Type>::calcAgglomeration()
{ {
Pout << ". Rejected" << endl; Pout << ". Rejected" << endl;
} }
// Count cluster size
labelList clusterSize(nCoarseEqns_, 0);
forAll (agglomIndex_, eqnI)
{
clusterSize[agglomIndex_[eqnI]]++;
}
label minClusterSize = gMin(clusterSize);
label maxClusterSize = gMax(clusterSize);
Info<< "Cluster size: min = " << minClusterSize
<< " max = " << maxClusterSize << endl;
} }
} }