ENH: polyMesh: handle locally zero cells

This commit is contained in:
mattijs
2014-04-04 11:07:50 +01:00
committed by Andrew Heather
parent fbb80e2373
commit 20f3f23f6b

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -1448,6 +1448,15 @@ Foam::label Foam::polyMesh::findCell
const cellRepresentation decompMode
) const
{
if (Pstream::parRun() && decompMode == FACEDIAGTETS)
{
// Force construction of face-diagonal decomposition before testing
// for zero cells. If parallel running a local domain might have zero
// cells so never construct the face-diagonal decomposition (which
// uses parallel transfers)
(void)tetBasePtIs();
}
if (nCells() == 0)
{
return -1;