Commit 20f3f23f authored by mattijs's avatar mattijs Committed by Andrew Heather
Browse files

ENH: polyMesh: handle locally zero cells

parent fbb80e23
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment