diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C index c32f659896f2bdc3d9092fee76f77b4951503f2b..22f2d7e3db40587249aa4fe19cc16089b8550b84 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 09708a3d1a981672e7357f308c28d13a1d6c5cbf..085f096c721cf72a3f2bf0a9fe8bb10961692e18 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);