BUG: FaceCellWave: do not enter/leaveDomain for collocated patches

This commit is contained in:
mattijs
2012-08-30 18:14:56 +01:00
parent 00e7b89ec3
commit 4504746b8c

View File

@ -55,14 +55,14 @@ namespace Foam
{ {
FaceCellWave<Type, TrackingData>& solver_; FaceCellWave<Type, TrackingData>& solver_;
const polyPatch& patch_; const cyclicAMIPolyPatch& patch_;
public: public:
combine combine
( (
FaceCellWave<Type, TrackingData>& solver, FaceCellWave<Type, TrackingData>& solver,
const polyPatch& patch const cyclicAMIPolyPatch& patch
) )
: :
solver_(solver), solver_(solver),
@ -80,10 +80,19 @@ namespace Foam
{ {
if (y.valid(solver_.data())) if (y.valid(solver_.data()))
{ {
label meshFaceI = -1;
if (patch_.owner())
{
meshFaceI = patch_.start() + faceI;
}
else
{
meshFaceI = patch_.neighbPatch().start() + faceI;
}
x.updateFace x.updateFace
( (
solver_.mesh(), solver_.mesh(),
patch_.start() + faceI, meshFaceI,
y, y,
solver_.propagationTol(), solver_.propagationTol(),
solver_.data() solver_.data()
@ -725,17 +734,18 @@ void Foam::FaceCellWave<Type, TrackingData>::handleAMICyclicPatches()
) )
); );
if (!nbrPatch.parallel() || nbrPatch.separated())
{
// Adapt sendInfo for leaving domain // Adapt sendInfo for leaving domain
const vectorField::subField fc = nbrPatch.faceCentres(); const vectorField::subField fc = nbrPatch.faceCentres();
forAll(sendInfo, i) forAll(sendInfo, i)
{ {
sendInfo[i].leaveDomain(mesh_, nbrPatch, i, fc[i], td_); sendInfo[i].leaveDomain(mesh_, nbrPatch, i, fc[i], td_);
} }
}
// Transfer sendInfo to cycPatch // Transfer sendInfo to cycPatch
combine<Type, TrackingData> cmb(*this, cycPatch); combine<Type, TrackingData> cmb(*this, cycPatch);
cycPatch.interpolate(sendInfo, cmb, receiveInfo); cycPatch.interpolate(sendInfo, cmb, receiveInfo);
} }
@ -750,12 +760,15 @@ void Foam::FaceCellWave<Type, TrackingData>::handleAMICyclicPatches()
); );
} }
if (!cycPatch.parallel() || cycPatch.separated())
{
// Adapt receiveInfo for entering domain // Adapt receiveInfo for entering domain
const vectorField::subField fc = cycPatch.faceCentres(); const vectorField::subField fc = cycPatch.faceCentres();
forAll(receiveInfo, i) forAll(receiveInfo, i)
{ {
receiveInfo[i].enterDomain(mesh_, cycPatch, i, fc[i], td_); receiveInfo[i].enterDomain(mesh_, cycPatch, i, fc[i], td_);
} }
}
// Merge into global storage // Merge into global storage
forAll(receiveInfo, i) forAll(receiveInfo, i)