From d51967d72812b28a6f5170e1648322f9036f0129 Mon Sep 17 00:00:00 2001 From: mattijs Date: Thu, 6 Apr 2023 13:33:18 +0100 Subject: [PATCH] ENH: faceAgglomerate: more robust. Fixes #2741 - feature angle compared to real angle - stop agglomerating if number of marked edges does not change --- .../pairPatchAgglomeration/Make/options | 1 + .../pairPatchAgglomeration.C | 431 ++++++++++++------ .../pairPatchAgglomeration.H | 34 +- .../constant/air/viewFactorsDict | 23 +- 4 files changed, 352 insertions(+), 137 deletions(-) diff --git a/src/fvAgglomerationMethods/pairPatchAgglomeration/Make/options b/src/fvAgglomerationMethods/pairPatchAgglomeration/Make/options index 82c725aa85..7063a63df5 100644 --- a/src/fvAgglomerationMethods/pairPatchAgglomeration/Make/options +++ b/src/fvAgglomerationMethods/pairPatchAgglomeration/Make/options @@ -1,4 +1,5 @@ EXE_INC = \ + -I$(LIB_SRC)/fileFormats/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude diff --git a/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C b/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C index d1e2faf2ec..8bc9ed667e 100644 --- a/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C +++ b/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2016-2022 OpenCFD Ltd. + Copyright (C) 2016-2023 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -30,6 +30,15 @@ License #include "meshTools.H" #include "edgeHashes.H" #include "unitConversion.H" +#include "OBJstream.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(pairPatchAgglomeration, 0); +} + // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -44,7 +53,8 @@ void Foam::pairPatchAgglomeration::compactLevels(const label nCreatedLevels) bool Foam::pairPatchAgglomeration::continueAgglomerating ( const label nLocal, - const label nLocalOld + const label nLocalOld, + const label nMarkedEdges ) { // Keep agglomerating @@ -54,65 +64,80 @@ bool Foam::pairPatchAgglomeration::continueAgglomerating label nGlobal = returnReduce(nLocal, sumOp