From 64d13d8b38a858cb18e7dbeebcd28659065253c0 Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 27 Oct 2010 16:06:22 +0100 Subject: [PATCH 01/14] STYLE: streamLineParticle : indentation --- .../functionObjects/field/streamLine/streamLineParticle.C | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.C b/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.C index 7230a21345..1fe0b2c2f8 100644 --- a/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.C +++ b/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.C @@ -51,9 +51,10 @@ Foam::scalar Foam::streamLineParticle::calcSubCycleDeltaT td.keepParticle = oldKeepParticle; td.switchProcessor = oldSwitchProcessor; // Adapt the dt to subdivide the trajectory into 4 substeps. - return dt *fraction/td.nSubCycle_; + return dt*fraction/td.nSubCycle_; } + Foam::vector Foam::streamLineParticle::interpolateFields ( const streamLineParticle::trackData& td, From 47390ae99a8818e2f840d9df0a83a1f06c3121dd Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 27 Oct 2010 16:07:29 +0100 Subject: [PATCH 02/14] STYLE: tutorials comment --- .../incompressible/simpleFoam/motorBike/system/controlDict | 2 +- .../incompressible/simpleFoam/pitzDaily/system/controlDict | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/controlDict b/tutorials/incompressible/simpleFoam/motorBike/system/controlDict index eed783b8a9..35dc084c0e 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/system/controlDict +++ b/tutorials/incompressible/simpleFoam/motorBike/system/controlDict @@ -82,7 +82,7 @@ functions // Names of fields to sample. Should contain above velocity field! fields (p U k); - // Cells particles can travel before being removed + // Steps particles can travel before being removed lifeTime 10000; // Number of steps per cell (estimate). Set to 1 to disable subcycling. diff --git a/tutorials/incompressible/simpleFoam/pitzDaily/system/controlDict b/tutorials/incompressible/simpleFoam/pitzDaily/system/controlDict index e608ae6e77..04c95c8f90 100644 --- a/tutorials/incompressible/simpleFoam/pitzDaily/system/controlDict +++ b/tutorials/incompressible/simpleFoam/pitzDaily/system/controlDict @@ -84,7 +84,7 @@ functions // Names of fields to sample. Should contain above velocity field! fields (p k U); - // Cells particles can travel before being removed + // Steps particles can travel before being removed lifeTime 10000; // Number of steps per cell (estimate). Set to 1 to disable subcycling. From df35ecc3e3e5674fb2561c79427747aff1bb130c Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 27 Oct 2010 17:37:31 +0100 Subject: [PATCH 03/14] 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