BUG: cyclicPeriodicAMI: synchronisation of cyclic transformation in case of zero faces

This commit is contained in:
mattijs
2015-11-09 09:20:48 +00:00
parent 7310a1c5b7
commit c999886f17

View File

@ -119,8 +119,15 @@ void Foam::cyclicPeriodicAMIPolyPatch::syncTransforms() const
// replacing with the transformations from other processors. // replacing with the transformations from other processors.
// Parallel in this context refers to a parallel transformation, // Parallel in this context refers to a parallel transformation,
// rather than a rotational transformation // rather than a rotational transformation.
bool isParallel = periodicPatch.parallel();
// Note that a cyclic with zero faces is considered parallel so
// explicitly check for that.
bool isParallel =
(
periodicPatch.size()
&& periodicPatch.parallel()
);
reduce(isParallel, orOp<bool>()); reduce(isParallel, orOp<bool>());
if (isParallel) if (isParallel)
@ -187,6 +194,8 @@ void Foam::cyclicPeriodicAMIPolyPatch::syncTransforms() const
( (
periodicPatch.reverseT() periodicPatch.reverseT()
) = reverseT[procI]; ) = reverseT[procI];
break;
} }
} }
} }
@ -293,21 +302,26 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
pointField nbrPoints(nbrPoints0); pointField nbrPoints(nbrPoints0);
// Create patches for all the points // Create patches for all the points
primitivePatch thisPatch0
// Source patch at initial location
const primitivePatch thisPatch0
( (
SubList<face>(localFaces(), size()), SubList<face>(localFaces(), size()),
thisPoints0 thisPoints0
); );
// Source patch that gets moved
primitivePatch thisPatch primitivePatch thisPatch
( (
SubList<face>(localFaces(), size()), SubList<face>(localFaces(), size()),
thisPoints thisPoints
); );
primitivePatch nbrPatch0 // Target patch at initial location
const primitivePatch nbrPatch0
( (
SubList<face>(neighbPatch().localFaces(), neighbPatch().size()), SubList<face>(neighbPatch().localFaces(), neighbPatch().size()),
nbrPoints0 nbrPoints0
); );
// Target patch that gets moved
primitivePatch nbrPatch primitivePatch nbrPatch
( (
SubList<face>(neighbPatch().localFaces(), neighbPatch().size()), SubList<face>(neighbPatch().localFaces(), neighbPatch().size()),