diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C index 95bccb0e3f..502e710137 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C @@ -210,12 +210,14 @@ void Foam::cyclicAMIFvPatchField::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::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); } diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C index 6ad6ee6abc..1aa4aa9ffb 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C @@ -313,10 +313,21 @@ Foam::label Foam::fvMatrix::checkImplicit(const label fieldI) { if (bpsi[patchI].useImplicit()) { + if (debug) + { + Pout<< "fvMatrix::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;