diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C index 2f5598f2dd..a4433a14e0 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C @@ -345,13 +345,13 @@ Foam::cyclicAMIFvPatchField::getNeighbourField template bool Foam::cyclicAMIFvPatchField::cacheNeighbourField() const { - const auto& AMI = this->ownerAMI(); + // const auto& AMI = this->ownerAMI(); - if (AMI.cacheActive()) - { - return false; - } - else + // if (AMI.cacheActive()) + // { + // return false; + // } + // else { return (FieldBase::localBoundaryConsistency() != 0); } @@ -383,11 +383,12 @@ Foam::cyclicAMIFvPatchField::getPatchNeighbourField } const auto& fvp = this->patch(); + const auto& mesh = fvp.boundaryMesh().mesh(); if ( patchNeighbourFieldPtr_ - && !fvp.boundaryMesh().mesh().upToDatePoints(this->internalField()) + && !mesh.upToDatePoints(this->internalField()) ) { //DebugPout @@ -451,7 +452,8 @@ template Foam::tmp> Foam::cyclicAMIFvPatchField::patchNeighbourField() const { - return this->getPatchNeighbourField(true); // checkCommunicator = true + // checkCommunicator = true + return this->getPatchNeighbourField(true); } diff --git a/src/meshTools/AMIInterpolation/GAMG/interfaceFields/cyclicACMIGAMGInterfaceField/cyclicACMIGAMGInterfaceField.C b/src/meshTools/AMIInterpolation/GAMG/interfaceFields/cyclicACMIGAMGInterfaceField/cyclicACMIGAMGInterfaceField.C index 4f0a50270a..576c1485d6 100644 --- a/src/meshTools/AMIInterpolation/GAMG/interfaceFields/cyclicACMIGAMGInterfaceField/cyclicACMIGAMGInterfaceField.C +++ b/src/meshTools/AMIInterpolation/GAMG/interfaceFields/cyclicACMIGAMGInterfaceField/cyclicACMIGAMGInterfaceField.C @@ -440,18 +440,19 @@ void Foam::cyclicACMIGAMGInterfaceField::updateInterfaceMatrix if (cache.index0() == -1 && cache.index1() == -1) { - if (cyclicACMIInterface_.owner()) - { - work = AMI.interpolateToSource(work); - } - else - { - work = AMI.interpolateToTarget(work); - } + solveScalarField pnf(faceCells.size(), Zero); + + AMI.weightedSum + ( + cyclicACMIInterface_.owner(), + work, + pnf, // result + solveScalarField::null() + ); const labelUList& faceCells = lduAddr.patchAddr(patchId); - this->addToInternalField(result, !add, faceCells, coeffs, work); + this->addToInternalField(result, !add, faceCells, coeffs, pnf); } else { diff --git a/src/meshTools/AMIInterpolation/GAMG/interfaceFields/cyclicAMIGAMGInterfaceField/cyclicAMIGAMGInterfaceField.C b/src/meshTools/AMIInterpolation/GAMG/interfaceFields/cyclicAMIGAMGInterfaceField/cyclicAMIGAMGInterfaceField.C index 83c7e92246..2cc4d24767 100644 --- a/src/meshTools/AMIInterpolation/GAMG/interfaceFields/cyclicAMIGAMGInterfaceField/cyclicAMIGAMGInterfaceField.C +++ b/src/meshTools/AMIInterpolation/GAMG/interfaceFields/cyclicAMIGAMGInterfaceField/cyclicAMIGAMGInterfaceField.C @@ -325,6 +325,10 @@ void Foam::cyclicAMIGAMGInterfaceField::updateInterfaceMatrix const auto& cache = AMI.cache(); + // Assume that sends are also OK + sendRequests_.clear(); + sendRequests1_.clear(); + if (AMI.distributed() && AMI.comm() != -1) { if (commsType != UPstream::commsTypes::nonBlocking) diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C index 7d41d4e21e..24dafc3bb4 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C +++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C @@ -393,11 +393,11 @@ void Foam::cyclicAMIPolyPatch::resetAMI(const UList& points) const label refProci = -1; if (size() > 0) { - refProci = UPstream::myProcNo(); + refProci = UPstream::myProcNo(comm); } reduce(refProci, maxOp