BUG: distributedTriSurfaceMesh: non-parallel running clip against local proc

This commit is contained in:
mattijs
2013-05-02 17:17:21 +01:00
parent 900d572a6e
commit 3318a2972f

View File

@ -365,9 +365,6 @@ void Foam::distributedTriSurfaceMesh::findLine
{
const indexedOctree<treeDataTriSurface>& octree = tree();
// Important:force synchronised construction of indexing
const globalIndex& triIndexer = globalTris();
// Initialise
info.setSize(start.size());
forAll(info, i)
@ -375,6 +372,25 @@ void Foam::distributedTriSurfaceMesh::findLine
info[i].setMiss();
}
if (!Pstream::parRun())
{
forAll(start, i)
{
if (nearestIntersection)
{
info[i] = octree.findLine(start[i], end[i]);
}
else
{
info[i] = octree.findLineAny(start[i], end[i]);
}
}
}
else
{
// Important:force synchronised construction of indexing
const globalIndex& triIndexer = globalTris();
// Do any local queries
// ~~~~~~~~~~~~~~~~~~~~
@ -405,15 +421,12 @@ void Foam::distributedTriSurfaceMesh::findLine
if
(
Pstream::parRun()
&& (
returnReduce(nLocal, sumOp<label>())
< returnReduce(start.size(), sumOp<label>())
)
)
{
// Not all can be resolved locally. Build segments and map, send over
// segments, do intersections, send back and merge.
// Not all can be resolved locally. Build segments and map,
// send over segments, do intersections, send back and merge.
// Construct queries (segments)
@ -518,6 +531,7 @@ void Foam::distributedTriSurfaceMesh::findLine
}
}
}
}
}