mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: distributedTriSurfaceMesh: non-parallel running clip against local proc
This commit is contained in:
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user