ENH: merging faces: generalise to disallow any constraints. Fixes #1352.

This commit is contained in:
mattijs
2019-08-29 10:56:06 +01:00
committed by Andrew Heather
parent a19a71c0b7
commit 3e9562f781

View File

@ -152,14 +152,20 @@ void Foam::combineFaces::regioniseFaces
// Face can be merged if // Face can be merged if
// - small angle // - small angle
// - mergeAcrossPatches=false : same non-coupled patch // - mergeAcrossPatches=false : same non-constraint patch
// - mergeAcrossPatches=true : always // - mergeAcrossPatches=true : always (if non-constraint patch)
// (this logic could be extended to e.g. merge faces on symm plane
// if they have similar normals. But there might be lots of other
// constraints which disallow merging so this decision ideally should
// be up to patch type)
if if
( (
p0 != -1 p0 != -1
&& p1 != -1 && p1 != -1
&& !patches[p0].coupled() && !(
&& !patches[p1].coupled() polyPatch::constraintType(patches[p0].type())
|| polyPatch::constraintType(patches[p1].type())
)
) )
{ {
if (!mergeAcrossPatches && (p0 != p1)) if (!mergeAcrossPatches && (p0 != p1))