BUG: fan b.c. was using phi on slave side.

This commit is contained in:
mattijs
2010-10-21 18:38:58 +01:00
parent 4704d7fccd
commit a0517f0ea9
10 changed files with 93 additions and 54 deletions

View File

@ -171,6 +171,23 @@ tmp<Field<Type> > cyclicFvPatchField<Type>::patchNeighbourField() const
}
template<class Type>
const cyclicFvPatchField<Type>& cyclicFvPatchField<Type>::neighbourPatchField()
const
{
const GeometricField<Type, fvPatchField, volMesh>& fld =
static_cast<const GeometricField<Type, fvPatchField, volMesh>&>
(
this->internalField()
);
return refCast<const cyclicFvPatchField<Type> >
(
fld.boundaryField()[this->cyclicPatch().neighbPatchID()]
);
}
template<class Type>
void cyclicFvPatchField<Type>::updateInterfaceMatrix
(

View File

@ -150,9 +150,12 @@ public:
// Evaluation functions
//- Return neighbour coupled given internal cell data
//- Return neighbour coupled internal cell data
tmp<Field<Type> > patchNeighbourField() const;
//- Return reference to neighbour patchField
const cyclicFvPatchField<Type>& neighbourPatchField() const;
//- Update result field based on interface functionality
virtual void updateInterfaceMatrix
(

View File

@ -140,7 +140,17 @@ public:
//- Return the "jump" across the patch.
virtual tmp<Field<Type> > jump() const
{
return jump_;
if (this->cyclicPatch().owner())
{
return jump_;
}
else
{
return refCast<const fanFvPatchField<Type> >
(
this->neighbourPatchField()
).jump();
}
}