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); << 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 if
( (
mag(1 - srcSum) > matchTolerance() mag(srcSum - floor(srcSum + matchTolerance())) > matchTolerance()
&& mag(1 - tgtSum) > matchTolerance() || mag(tgtSum - floor(tgtSum + matchTolerance())) > matchTolerance()
) )
{ {
FatalErrorIn FatalErrorIn

View File

@ -18,20 +18,20 @@ convertToMeters 1;
vertices vertices
( (
(0 0.3 0 ) (0 0.333333333333333 0 )
(0 0.7 0 ) (0 0.666666666666667 0 )
(0 0.7 0.1) (0 0.666666666666667 0.1)
(0 0.3 0.1) (0 0.333333333333333 0.1)
(0.8 0.3 0 ) (0.8 0.333333333333333 0 )
(0.8 0.7 0 ) (0.8 0.666666666666667 0 )
(0.8 0.7 0.1) (0.8 0.666666666666667 0.1)
(0.8 0.3 0.1) (0.8 0.333333333333333 0.1)
(1 0.3 0 ) (1 0.333333333333333 0 )
(1 0.7 0 ) (1 0.666666666666667 0 )
(1 0.7 0.1) (1 0.666666666666667 0.1)
(1 0.3 0.1) (1 0.333333333333333 0.1)
(1 0 0 ) (1 0 0 )
(1 1 0 ) (1 1 0 )