Skip to content
Snippets Groups Projects
Commit d71b8393 authored by Henry's avatar Henry
Browse files

polyMesh::findCell: Call tetBasePtIs for CELL_TETS to ensure parallel consistency

Resolves additional bug-report http://www.openfoam.org/mantisbt/view.php?id=1544
parent a5b1708e
Branches
Tags
No related merge requests found
......@@ -1483,6 +1483,21 @@ Foam::label Foam::polyMesh::findCell
return -1;
}
if
(
Pstream::parRun()
&& (decompMode == FACE_DIAG_TRIS || decompMode == CELL_TETS)
)
{
// 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 (decompMode == CELL_TETS)
{
// Advanced search method utilizing an octree
......@@ -1501,15 +1516,6 @@ Foam::label Foam::polyMesh::findCell
// Approximate search avoiding the construction of an octree
// and cell decomposition
if (Pstream::parRun() && decompMode == FACE_DIAG_TRIS)
{
// 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();
}
// Find the nearest cell centre to this location
label celli = findNearestCell(p);
......
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