From cca5743dee8fb881a899cd935a349c7f0a21b931 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Wed, 2 May 2018 10:21:53 +0100 Subject: [PATCH] Bugfix: filter empty processor patches --- .../decomposeTools/finiteVolume/decomposeMesh.C | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/decompositionMethods/decomposeReconstruct/decomposeTools/finiteVolume/decomposeMesh.C b/src/decompositionMethods/decomposeReconstruct/decomposeTools/finiteVolume/decomposeMesh.C index 9cc673e28..5509f91f0 100644 --- a/src/decompositionMethods/decomposeReconstruct/decomposeTools/finiteVolume/decomposeMesh.C +++ b/src/decompositionMethods/decomposeReconstruct/decomposeTools/finiteVolume/decomposeMesh.C @@ -566,9 +566,6 @@ void Foam::domainDecomposition::decomposeMesh(const bool filterEmptyPatches) procPatchSize_[ownerProc][patchI]++; } } - - // Processor patch. Skip it - continue; } else if (isA(patches[patchI])) @@ -793,6 +790,8 @@ void Foam::domainDecomposition::decomposeMesh(const bool filterEmptyPatches) } } + Pout<< "procPatchSize_: " << procPatchSize_ << endl; + // Face zone treatment. HJ, 27/Mar/2009 // Face zones identified as global will be present on all CPUs List > procZoneFaceList(nProcs_); @@ -1047,7 +1046,17 @@ void Foam::domainDecomposition::decomposeMesh(const bool filterEmptyPatches) forAll (oldPatchSizes, patchI) { - if (!filterEmptyPatches || oldPatchSizes[patchI] > 0) + // If filterEmptyPatches is set to true, or a patch is a + // processor patch, remove it + if + ( + (filterEmptyPatches || isA(patches[patchI])) + && oldPatchSizes[patchI] == 0 + ) + { + // Patch filtered: do nothing + } + else { curBoundaryAddressing[nPatches] = patchI;