From 6e1eb0633ae80c1396e8c1533b9b76c86696a607 Mon Sep 17 00:00:00 2001 From: mattijs <mattijs> Date: Thu, 18 Jul 2013 13:08:46 +0100 Subject: [PATCH] ENH: autoHexMesh: added helper for stopping regionSplit across cyclics --- .../meshRefinement/meshRefinement.C | 28 +++++++++++++++++++ .../meshRefinement/meshRefinement.H | 3 ++ 2 files changed, 31 insertions(+) diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C index c32f659896f..22f2d7e3db4 100644 --- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C +++ b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C @@ -1895,6 +1895,34 @@ Foam::labelList Foam::meshRefinement::meshedPatches() const } +void Foam::meshRefinement::selectSeparatedCoupledFaces(boolList& selected) const +{ + const polyBoundaryMesh& patches = mesh_.boundaryMesh(); + + forAll(patches, patchI) + { + const polyPatch& pp = patches[patchI]; + + // Check all coupled. Avoid using .coupled() so we also pick up AMI. + if (isA<coupledPolyPatch>(patches[patchI])) + { + const coupledPolyPatch& cpp = refCast<const coupledPolyPatch> + ( + patches[patchI] + ); + + if (cpp.separated() || !cpp.parallel()) + { + forAll(pp, i) + { + selected[pp.start()+i] = true; + } + } + } + } +} + + Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::splitMeshRegions ( const point& keepPoint diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.H b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.H index 09708a3d1a9..085f096c721 100644 --- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.H +++ b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.H @@ -864,6 +864,9 @@ public: //- Get patchIDs for patches added in addMeshedPatch. labelList meshedPatches() const; + //- Select coupled faces that are not collocated + void selectSeparatedCoupledFaces(boolList&) const; + //- Split mesh. Keep part containing point. autoPtr<mapPolyMesh> splitMeshRegions(const point& keepPoint); -- GitLab