diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C index 95bccb0e3f91de85129efe95fadaf5bcddb001d6..502e7101370d57e5482a4f7011d491536d93d8ac 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<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); } diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C index 6ad6ee6abcfaccc1f6677776604741d99154968a..1aa4aa9ffb68b7f2a1251e85a49ed3efc3b20b8d 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C @@ -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;