From 8d0154ba32de5951a414b7ef941987a03c7bca20 Mon Sep 17 00:00:00 2001 From: mattijs Date: Thu, 26 Nov 2015 16:52:18 +0000 Subject: [PATCH] ENH: regionSplit: improve algorithm order The old version of regionSplit would hand out regions one by one. This is a big problem when there are lots of regions - the extreme being in the decompositionMethods, where it is used to cluster cells and most clusters being only one cell. This rewrite uses a mesh wave to determine disconnected regions in one go. This produced non-compact numbering which is then compacted in a second phase. On a 14M cell case with cyclic constraints this reduced decompose time from 40 mins down to 5. --- src/meshTools/regionSplit/regionSplit.C | 663 +++++++----------------- src/meshTools/regionSplit/regionSplit.H | 31 +- 2 files changed, 197 insertions(+), 497 deletions(-) diff --git a/src/meshTools/regionSplit/regionSplit.C b/src/meshTools/regionSplit/regionSplit.C index 2583c2ddfe..1a8de0fa15 100644 --- a/src/meshTools/regionSplit/regionSplit.C +++ b/src/meshTools/regionSplit/regionSplit.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -28,6 +28,8 @@ License #include "processorPolyPatch.H" #include "globalIndex.H" #include "syncTools.H" +#include "FaceCellWave.H" +#include "minData.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -40,340 +42,93 @@ defineTypeNameAndDebug(regionSplit, 0); // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -// Handle (non-processor) coupled faces. -void Foam::regionSplit::transferCoupledFaceRegion -( - const label faceI, - const label otherFaceI, - - labelList& faceRegion, - DynamicList