From 429d8d0522a2bc5e7de2cdf6c4f2d52afcbd2cb0 Mon Sep 17 00:00:00 2001 From: mattijs Date: Thu, 5 Dec 2024 13:41:18 +0000 Subject: [PATCH] ENH: reconstructParMesh: support for finite-area. Fixes #3276 --- .../reconstructParMesh/Make/options | 3 + .../reconstructParMesh/reconstructParMesh.C | 434 +++++++++++++++++- .../faReconstruct/faMeshReconstructor.C | 73 ++- .../faReconstruct/faMeshReconstructor.H | 20 +- 4 files changed, 503 insertions(+), 27 deletions(-) diff --git a/applications/utilities/parallelProcessing/reconstructParMesh/Make/options b/applications/utilities/parallelProcessing/reconstructParMesh/Make/options index 792a51bf7f..943d00d5f3 100644 --- a/applications/utilities/parallelProcessing/reconstructParMesh/Make/options +++ b/applications/utilities/parallelProcessing/reconstructParMesh/Make/options @@ -1,9 +1,12 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/finiteArea/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude EXE_LIBS = \ -lfiniteVolume \ -lmeshTools \ + -lfiniteArea \ + -lfaReconstruct \ -ldynamicMesh diff --git a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C index c77a2742a2..d5b9c2ef9c 100644 --- a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C +++ b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C @@ -73,6 +73,9 @@ Usage #include "regionProperties.H" #include "fvMeshTools.H" +#include "faMeshReconstructor.H" +#include "ignoreFaPatch.H" + using namespace Foam; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -573,6 +576,160 @@ void printWarning() } +// Used to determine the correspondence between the edges. +// See faMeshReconstructor::calcAddressing +void determineFaEdgeMapping +( + const uindirectPrimitivePatch& onePatch,// reconstructed faMesh patch + const PtrList& procFaMeshes, // individual faMeshes + const labelListList& pointProcAddressing, // procPolyMesh to reconstructed + + labelListList& faEdgeProcAddressing +) +{ + // Determines ordering from faMesh to onePatch (= recsontructed faMesh) + + // From two polyMesh points to patch-edge label + EdgeMap