ENH: faMesh: decompose zero-sized patches. Fixes #1090.

This commit is contained in:
mattijs
2018-11-21 16:38:33 +00:00
parent fa2971c17a
commit 9bfc010e64
2 changed files with 15 additions and 9 deletions

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | \\ / A nd |
\\/ M anipulation | \\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
| Copyright (C) 2016-2017 Wikki Ltd | Copyright (C) 2016-2017 Wikki Ltd
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
@ -345,7 +345,11 @@ void Foam::faMeshDecomposition::decomposeMesh()
for(int eI=0; eI<size; eI++) for(int eI=0; eI<size; eI++)
{ {
edgesHash.insert(patch.edges()[boundary()[patchI][eI]], ++edgeI); edgesHash.insert
(
patch.edges()[boundary()[patchI][eI]],
++edgeI
);
} }
} }
@ -952,7 +956,9 @@ void Foam::faMeshDecomposition::decomposeMesh()
forAll(oldPatchSizes, patchI) forAll(oldPatchSizes, patchI)
{ {
if (oldPatchSizes[patchI] > 0) //- Do not suppress zero sized patches since make parallel
// actions inside patches near impossible.
//if (oldPatchSizes[patchI] > 0)
{ {
curBoundaryAddressing[nPatches] = patchI; curBoundaryAddressing[nPatches] = patchI;

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | \\ / A nd |
\\/ M anipulation | \\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
| Copyright (C) 2016-2017 Wikki Ltd | Copyright (C) 2016-2017 Wikki Ltd
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
@ -1065,7 +1065,7 @@ void Foam::faMesh::calcPointAreaNormals() const
// Processor patch points correction // Processor patch points correction
for (const faPatch& fap : boundary()) for (const faPatch& fap : boundary())
{ {
if (isA<processorFaPatch>(fap)) if (Pstream::parRun() && isA<processorFaPatch>(fap))
{ {
const processorFaPatch& procPatch = const processorFaPatch& procPatch =
refCast<const processorFaPatch>(fap); refCast<const processorFaPatch>(fap);
@ -1347,7 +1347,7 @@ void Foam::faMesh::calcPointAreaNormalsByQuadricsFit() const
{ {
const faPatch& fap = boundary()[patchI]; const faPatch& fap = boundary()[patchI];
if (isA<processorFaPatch>(fap)) if (Pstream::parRun() && isA<processorFaPatch>(fap))
{ {
const processorFaPatch& procPatch = const processorFaPatch& procPatch =
refCast<const processorFaPatch>(boundary()[patchI]); refCast<const processorFaPatch>(boundary()[patchI]);
@ -1415,7 +1415,7 @@ void Foam::faMesh::calcPointAreaNormalsByQuadricsFit() const
for (const faPatch& fap : boundary()) for (const faPatch& fap : boundary())
{ {
if (isA<processorFaPatch>(fap)) if (Pstream::parRun() && isA<processorFaPatch>(fap))
{ {
const processorFaPatch& procPatch = const processorFaPatch& procPatch =
refCast<const processorFaPatch>(fap); refCast<const processorFaPatch>(fap);