Merge remote-tracking branch 'origin/BUGFIX/correctImplicitBoundarySource' into nextRelease
This commit is contained in:
commit
039cfc95c9
1 changed files with 30 additions and 5 deletions
|
@ -28,6 +28,7 @@ License
|
||||||
#include "calculatedFvPatchFields.H"
|
#include "calculatedFvPatchFields.H"
|
||||||
#include "zeroGradientFvPatchFields.H"
|
#include "zeroGradientFvPatchFields.H"
|
||||||
#include "coupledFvPatchFields.H"
|
#include "coupledFvPatchFields.H"
|
||||||
|
#include "transformField.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -163,8 +164,7 @@ void Foam::fvMatrix<Type>::addBoundarySource
|
||||||
}
|
}
|
||||||
else if (couples)
|
else if (couples)
|
||||||
{
|
{
|
||||||
tmp<Field<Type> > tpnf = ptf.patchNeighbourField();
|
Field<Type> pnf = ptf.patchNeighbourField();
|
||||||
const Field<Type>& pnf = tpnf();
|
|
||||||
|
|
||||||
const unallocLabelList& addr = lduAddr().patchAddr(patchI);
|
const unallocLabelList& addr = lduAddr().patchAddr(patchI);
|
||||||
|
|
||||||
|
@ -192,11 +192,36 @@ void Foam::fvMatrix<Type>::correctImplicitBoundarySource
|
||||||
|
|
||||||
if (ptf.coupled())
|
if (ptf.coupled())
|
||||||
{
|
{
|
||||||
scalarField pnf = ptf.patchNeighbourField()().component(cmpt);
|
// Get access to transformation data
|
||||||
|
|
||||||
const lduInterfaceField& lf =
|
const lduInterfaceField& lf =
|
||||||
refCast<const lduInterfaceField>(ptf);
|
refCast<const lduInterfaceField>(ptf);
|
||||||
|
|
||||||
|
const coupledFvPatch& cfvp =
|
||||||
|
refCast<const coupledFvPatch>(ptf.patch());
|
||||||
|
|
||||||
|
// Get the component of "other side" field that will be handled
|
||||||
|
// implicitly. Note that patchNeighbourField function gives
|
||||||
|
// the neighbour field AFTER transform, where the implicit
|
||||||
|
// components are mis-aligned: it needs to be transformed back
|
||||||
|
// HJ, 10/Apr/2014
|
||||||
|
scalarField pnf;
|
||||||
|
|
||||||
|
if (cfvp.parallel())
|
||||||
|
{
|
||||||
|
// No transformation needed
|
||||||
|
pnf = ptf.patchNeighbourField()().component(cmpt);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Transform back to this side to get the implicit component
|
||||||
|
pnf = transform
|
||||||
|
(
|
||||||
|
cfvp.reverseT(),
|
||||||
|
ptf.patchNeighbourField()
|
||||||
|
)().component(cmpt);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Identical implicitness transformation (back)
|
||||||
lf.transformCoupleField(pnf, cmpt);
|
lf.transformCoupleField(pnf, cmpt);
|
||||||
|
|
||||||
const unallocLabelList& addr = lduAddr().patchAddr(patchI);
|
const unallocLabelList& addr = lduAddr().patchAddr(patchI);
|
||||||
|
|
Reference in a new issue