ENH: cyclicPeriodic: add some printing

This commit is contained in:
mattijs
2015-12-11 11:37:49 +00:00
parent 604166a26a
commit a71172b693

View File

@ -535,8 +535,36 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
<< endl;
}
// Normalise the weights
// Normalise the weights. Disable printing since weights are
// still areas.
AMIPtr_->normaliseWeights(true, false);
// Print some statistics
const label nFace = returnReduce(size(), sumOp<label>());
if (nFace)
{
scalarField srcWghtSum(size(), 0);
scalarField tgtWghtSum(size(), 0);
forAll(*this, faceI)
{
srcWghtSum[faceI] = sum(AMIPtr_->srcWeights()[faceI]);
tgtWghtSum[faceI] = sum(AMIPtr_->tgtWeights()[faceI]);
}
Info<< indent
<< "AMI: Patch " << name()
<< " sum(weights) min/max/average = "
<< gMin(srcWghtSum) << ", "
<< gMax(srcWghtSum) << ", "
<< gAverage(srcWghtSum) << endl;
Info<< indent
<< "AMI: Patch " << neighbPatch().name()
<< " sum(weights) min/max/average = "
<< gMin(tgtWghtSum) << ", "
<< gMax(tgtWghtSum) << ", "
<< gAverage(tgtWghtSum) << endl;
}
}
}