message=BUG: cyclicPeriodicAMI: corrected logic so that it correctly excludes

patches which do not overlap an integer number of times.
This commit is contained in:
william
2015-11-09 09:12:21 +00:00
committed by mattijs
parent c5331f518e
commit 29e1c6e77b
2 changed files with 15 additions and 15 deletions

View File

@ -360,11 +360,11 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
<< periodicPatch.name() << "." << exit(FatalError);
}
// Check that at least one patch has a weight sum of one
// Check that both patches have replicated an integer number of times
if
(
mag(1 - srcSum) > matchTolerance()
&& mag(1 - tgtSum) > matchTolerance()
mag(srcSum - floor(srcSum + matchTolerance())) > matchTolerance()
|| mag(tgtSum - floor(tgtSum + matchTolerance())) > matchTolerance()
)
{
FatalErrorIn