diff --git a/src/overset/oversetMesh/oversetFringe/overlapFringe/adaptiveOverlapFringe/adaptiveOverlapFringe.C b/src/overset/oversetMesh/oversetFringe/overlapFringe/adaptiveOverlapFringe/adaptiveOverlapFringe.C index 2d33aaac5..2c679f70e 100644 --- a/src/overset/oversetMesh/oversetFringe/overlapFringe/adaptiveOverlapFringe/adaptiveOverlapFringe.C +++ b/src/overset/oversetMesh/oversetFringe/overlapFringe/adaptiveOverlapFringe/adaptiveOverlapFringe.C @@ -94,10 +94,9 @@ void Foam::adaptiveOverlapFringe::suitabilityFractionSlope forAllConstIter(FIFOStack, iterHist, it) { - iterSum += it().iteration(); - iterSquaredSum += pow(it().iteration(), 2); - suitabilitySum += it().suitability(); - iterXSuitabilitySum += it().iteration()*it().suitability(); + n += (it().iteration() - iterMean)* + (it().suitability() - suitabilityMean); + d += sqr(it().iteration() - iterMean); } reduce(n, sumOp());