From b71c4676ce4cdac35c99cb84af3da78f807f196e Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 27 Feb 2017 11:49:19 +0000 Subject: [PATCH] ENH: cyclicACMI: report number of blended faces. Fixes #411. --- .../cyclicACMIPolyPatch/cyclicACMIPolyPatch.C | 55 ++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatch.C b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatch.C index 50ec5c1b0a..d801ec591e 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatch.C +++ b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatch.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -97,6 +97,59 @@ void Foam::cyclicACMIPolyPatch::resetAMI AMIPatchToPatchInterpolation& AMI = const_cast(this->AMI()); + // Output some stats. AMIInterpolation will have already output the + // average weights ("sum(weights) min/max/average = 1, 1, 1") + { + const scalarField& wghtsSum = AMI.srcWeightsSum(); + + label nUncovered = 0; + label nCovered = 0; + forAll(wghtsSum, facei) + { + scalar sum = wghtsSum[facei]; + if (sum < tolerance_) + { + nUncovered++; + } + else if (sum > scalar(1)-tolerance_) + { + nCovered++; + } + } + reduce(nUncovered, sumOp