From df35ecc3e3e5674fb2561c79427747aff1bb130c Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 27 Oct 2010 17:37:31 +0100 Subject: [PATCH] ENH: splitMeshRegions: -useFaceZones option to patch according to faceZone instead of single patch for inter-region faces --- .../splitMeshRegions/splitMeshRegions.C | 503 ++++++++++++------ 1 file changed, 346 insertions(+), 157 deletions(-) diff --git a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C index 66a1f0357a..e56cecd6f5 100644 --- a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C +++ b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C @@ -34,8 +34,12 @@ Description - any face inbetween differing cellZones (-cellZones) Output is: - - volScalarField with regions as different scalars (-detectOnly) or - - mesh with multiple regions or + - volScalarField with regions as different scalars (-detectOnly) + or + - mesh with multiple regions and directMapped patches. These patches + either cover the whole interface between two region (default) or + only part according to faceZones (-useFaceZones) + or - mesh with cells put into cellZones (-makeCellZones) Note: @@ -495,18 +499,70 @@ labelList getNonRegionCells(const labelList& cellRegion, const label regionI) } -// Get per region-region interface the sizes. If sumParallel sums sizes. +void addToInterface +( + const polyMesh& mesh, + const label zoneID, + const label ownRegion, + const label neiRegion, + EdgeMap >& regionsToSize +) +{ + edge interface + ( + min(ownRegion, neiRegion), + max(ownRegion, neiRegion) + ); + + EdgeMap >::iterator iter = regionsToSize.find + ( + interface + ); + + if (iter != regionsToSize.end()) + { + // Check if zone present + Map