From a9605357dd9bb62799bb1bfdebc7caf7b939a65e Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Tue, 5 Dec 2023 12:01:19 +0000 Subject: [PATCH] intersectionPatchToPatch: Fix for single precision --- .../patchToPatch/intersection/intersectionPatchToPatch.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/meshTools/patchToPatch/intersection/intersectionPatchToPatch.C b/src/meshTools/patchToPatch/intersection/intersectionPatchToPatch.C index e929571fca..eddb99f45b 100644 --- a/src/meshTools/patchToPatch/intersection/intersectionPatchToPatch.C +++ b/src/meshTools/patchToPatch/intersection/intersectionPatchToPatch.C @@ -904,7 +904,7 @@ Foam::patchToPatches::intersection::srcWeights() const forAll(srcCouples_[srcFacei], i) { result[srcFacei][i] *= - min(max(srcCoverage_[srcFacei], small), 1)/aSum; + min(max(srcCoverage_[srcFacei], small), scalar(1))/aSum; } } @@ -936,7 +936,7 @@ Foam::patchToPatches::intersection::tgtWeights() const forAll(tgtCouples_[tgtFacei], i) { result[tgtFacei][i] *= - min(max(tgtCoverage_[tgtFacei], small), 1)/aSum; + min(max(tgtCoverage_[tgtFacei], small), scalar(1))/aSum; } }