diff --git a/applications/utilities/preProcessing/faceAgglomerate/faceAgglomerate.C b/applications/utilities/preProcessing/faceAgglomerate/faceAgglomerate.C index ee9339d0f9..be2310aabe 100644 --- a/applications/utilities/preProcessing/faceAgglomerate/faceAgglomerate.C +++ b/applications/utilities/preProcessing/faceAgglomerate/faceAgglomerate.C @@ -109,6 +109,16 @@ int main(int argc, char *argv[]) } } + + // - All patches which are not agglomarated are identity for finalAgglom + forAll(boundary, patchId) + { + if (finalAgglom[patchId].size() == 0) + { + finalAgglom[patchId] = identity(boundary[patchId].size()); + } + } + // Sync agglomeration across coupled patches labelList nbrAgglom(mesh.nFaces() - mesh.nInternalFaces(), -1); diff --git a/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C b/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C index 9467906f15..e322bcc541 100644 --- a/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C +++ b/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C @@ -83,11 +83,19 @@ void Foam::pairPatchAgglomeration::setBasedEdgeWeights() facePairWeight_[edgeCommon] = -1.0; } } - else if (eFaces.size() == 3) + else { - facePairWeight_.insert(edge(eFaces[1], eFaces[0]), -1.0); - facePairWeight_.insert(edge(eFaces[2], eFaces[0]), -1.0); - facePairWeight_.insert(edge(eFaces[1], eFaces[2]), -1.0); + forAll(eFaces, j) + { + for (label k = j+1; k