mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Updated AMI output to include average weights
This commit is contained in:
@ -1094,18 +1094,19 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::normaliseWeights
|
||||
const bool output
|
||||
)
|
||||
{
|
||||
scalarList wghtSum(wght.size(), 0.0);
|
||||
|
||||
scalar minBound = VGREAT;
|
||||
scalar maxBound = -VGREAT;
|
||||
|
||||
scalar tSum = 0.0;
|
||||
|
||||
// Normalise the weights
|
||||
forAll(wght, faceI)
|
||||
{
|
||||
scalar s = sum(wght[faceI]);
|
||||
wghtSum[faceI] = s;
|
||||
|
||||
scalar t = s/patchAreas[faceI];
|
||||
|
||||
tSum += t;
|
||||
|
||||
if (t < minBound)
|
||||
{
|
||||
minBound = t;
|
||||
@ -1122,11 +1123,16 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::normaliseWeights
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (output)
|
||||
{
|
||||
Info<< "AMI: Patch " << patchName << " weights min/max = "
|
||||
const label nFace = returnReduce(wght.size(), sumOp<scalar>());
|
||||
reduce(tSum, sumOp<scalar>());
|
||||
|
||||
Info<< "AMI: Patch " << patchName << " weights min/max/average = "
|
||||
<< returnReduce(minBound, minOp<scalar>()) << ", "
|
||||
<< returnReduce(maxBound, maxOp<scalar>()) << endl;
|
||||
<< returnReduce(maxBound, maxOp<scalar>()) << ", "
|
||||
<< tSum/nFace << endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user