mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
polyMesh: Ensure parallel consistency in findCell
by ensuring tetBasePtIs is called on all processors, even for those with 0 cells. Also use unique communicator for globalMeshData to avoid data transfer interference. Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1792
This commit is contained in:
@ -2748,7 +2748,12 @@ void Foam::globalMeshData::updateMesh()
|
||||
|
||||
// *** Temporary hack to avoid problems with overlapping communication
|
||||
// *** between these reductions and the calculation of deltaCoeffs
|
||||
label comm = UPstream::worldComm + 1;
|
||||
label comm = UPstream::allocateCommunicator
|
||||
(
|
||||
UPstream::worldComm,
|
||||
identity(UPstream::nProcs()),
|
||||
true
|
||||
);
|
||||
|
||||
// Total number of faces.
|
||||
nTotalFaces_ = returnReduce
|
||||
@ -2785,6 +2790,8 @@ void Foam::globalMeshData::updateMesh()
|
||||
comm
|
||||
);
|
||||
|
||||
UPstream::freeCommunicator(comm);
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Pout<< "globalMeshData : nTotalPoints_:" << nTotalPoints_ << endl;
|
||||
|
||||
@ -1478,12 +1478,11 @@ Foam::label Foam::polyMesh::findCell
|
||||
const cellDecomposition decompMode
|
||||
) const
|
||||
{
|
||||
if (nCells() == 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (Pstream::parRun() && decompMode == FACE_DIAG_TRIS)
|
||||
if
|
||||
(
|
||||
Pstream::parRun()
|
||||
&& (decompMode == FACE_DIAG_TRIS || decompMode == CELL_TETS)
|
||||
)
|
||||
{
|
||||
// Force construction of face-diagonal decomposition before testing
|
||||
// for zero cells.
|
||||
@ -1494,6 +1493,11 @@ Foam::label Foam::polyMesh::findCell
|
||||
(void)tetBasePtIs();
|
||||
}
|
||||
|
||||
if (nCells() == 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (decompMode == CELL_TETS)
|
||||
{
|
||||
// Advanced search method utilizing an octree
|
||||
|
||||
Reference in New Issue
Block a user