From fd25d2a6e0ba63c7350f3850e84a16d9cd20b81f Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Wed, 30 May 2018 14:00:23 +0100 Subject: [PATCH] splitMeshRegions: Improved region naming Changed the default region name from "domain" to "region" for consistency with the rest of OpenFOAM. Changed the multiple default region numbering to start from 1 rather than 0 because the top-level mesh in the case directory is always named "region0". Changed the default region numbering to only relate to the default named regions and does not increment for explicitly named regions. This avoids a naming dependency on the default and named region order. Added new option "-defaultRegionName " to specify the base name of the unspecified regions, defaults to "region" --- .../splitMeshRegions/splitMeshRegions.C | 214 +++++++++++------- 1 file changed, 130 insertions(+), 84 deletions(-) diff --git a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C index cccad42508..0d948e67ab 100644 --- a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C +++ b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C @@ -109,6 +109,10 @@ using namespace Foam; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// Standard default region base name +const word standardRegionName("region"); + + // Prepend prefix to selected patches. void renamePatches ( @@ -249,12 +253,12 @@ void subsetSurfaceFields } // Select all cells not in the region -labelList getNonRegionCells(const labelList& cellRegion, const label regionI) +labelList getNonRegionCells(const labelList& cellRegion, const label regioni) { DynamicList