BUG: cyclicPeriodicAMI: Floor operation should add 0.5 to round to the nearest integer.

This commit is contained in:
william
2015-11-09 09:13:15 +00:00
committed by mattijs
parent 29e1c6e77b
commit 73f41cf1f6

View File

@ -363,8 +363,8 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
// Check that both patches have replicated an integer number of times
if
(
mag(srcSum - floor(srcSum + matchTolerance())) > matchTolerance()
|| mag(tgtSum - floor(tgtSum + matchTolerance())) > matchTolerance()
mag(srcSum - floor(srcSum + 0.5)) > matchTolerance()
|| mag(tgtSum - floor(tgtSum + 0.5)) > matchTolerance()
)
{
FatalErrorIn