BUG: Fixes #2175 and #2176

This commit is contained in:
sergio
2021-08-06 11:07:48 -07:00
parent b78dccdd51
commit 93b0a57791
2 changed files with 15 additions and 4 deletions

View File

@ -210,12 +210,14 @@ void Foam::cyclicAMIFvPatchField<Type>::updateInterfaceMatrix
solveScalarField pnf(psiInternal, nbrFaceCells);
const labelUList& faceCells = lduAddr.patchAddr(patchId);
// Transform according to the transformation tensors
transformCoupleField(pnf, cmpt);
if (cyclicAMIPatch_.applyLowWeightCorrection())
{
solveScalarField pif(psiInternal, cyclicAMIPatch_.faceCells());
solveScalarField pif(psiInternal, faceCells);
pnf = cyclicAMIPatch_.interpolate(pnf, pif);
}
else
@ -223,8 +225,6 @@ void Foam::cyclicAMIFvPatchField<Type>::updateInterfaceMatrix
pnf = cyclicAMIPatch_.interpolate(pnf);
}
const labelUList& faceCells = lduAddr.patchAddr(patchId);
// Multiply the field by coefficients and add into the result
this->addToInternalField(result, !add, faceCells, coeffs, pnf);
}

View File

@ -313,10 +313,21 @@ Foam::label Foam::fvMatrix<Type>::checkImplicit(const label fieldI)
{
if (bpsi[patchI].useImplicit())
{
if (debug)
{
Pout<< "fvMatrix<Type>::checkImplicit "
<< " fieldi:" << fieldI
<< " field:" << this->psi(fieldI).name()
<< " on mesh:"
<< this->psi(fieldI).mesh().name()
<< " patch:" << bpsi[patchI].patch().name()
<< endl;
}
id += (label(2) << patchI);
}
}
if (id > 0)
if (id >= 0)
{
lduAssemblyName_ = word("lduAssembly") + name(id);
useImplicit_ = true;