polyMesh::findCell: Call tetBasePtIs for CELL_TETS to ensure parallel consistency
Resolves additional bug-report http://www.openfoam.org/mantisbt/view.php?id=1544
This commit is contained in:
parent
a5b1708e63
commit
d71b839320
@ -1483,6 +1483,21 @@ Foam::label Foam::polyMesh::findCell
|
|||||||
return -1;
|
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)
|
if (decompMode == CELL_TETS)
|
||||||
{
|
{
|
||||||
// Advanced search method utilizing an octree
|
// Advanced search method utilizing an octree
|
||||||
@ -1501,15 +1516,6 @@ Foam::label Foam::polyMesh::findCell
|
|||||||
// Approximate search avoiding the construction of an octree
|
// Approximate search avoiding the construction of an octree
|
||||||
// and cell decomposition
|
// 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
|
// Find the nearest cell centre to this location
|
||||||
label celli = findNearestCell(p);
|
label celli = findNearestCell(p);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user