From f5e03a04c8d0d3d9d411db94b88b4d47d64984e0 Mon Sep 17 00:00:00 2001 From: Yan Zhang Date: Wed, 17 Jun 2020 19:41:28 +0200 Subject: [PATCH] correct the calculation of offset --- conditionalAverageTemplates.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conditionalAverageTemplates.C b/conditionalAverageTemplates.C index bc26a51..98a60b2 100644 --- a/conditionalAverageTemplates.C +++ b/conditionalAverageTemplates.C @@ -203,7 +203,7 @@ void Foam::conditionalAverage::combineSampledValues } const scalar start = gMin(conditionalField); const scalar end = gMax(conditionalField); - const scalar offset = (end - start)/(nBins_ - 1); + const scalar offset = (end - start)/nBins_; forAll( conditionalField, trackCelli ) {