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();
|
const indexedOctree<treeDataTriSurface>& octree = tree();
|
||||||
|
|
||||||
// Important:force synchronised construction of indexing
|
|
||||||
const globalIndex& triIndexer = globalTris();
|
|
||||||
|
|
||||||
// Initialise
|
// Initialise
|
||||||
info.setSize(start.size());
|
info.setSize(start.size());
|
||||||
forAll(info, i)
|
forAll(info, i)
|
||||||
@ -375,6 +372,25 @@ void Foam::distributedTriSurfaceMesh::findLine
|
|||||||
info[i].setMiss();
|
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
|
// Do any local queries
|
||||||
// ~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~
|
||||||
@ -405,15 +421,12 @@ void Foam::distributedTriSurfaceMesh::findLine
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
Pstream::parRun()
|
|
||||||
&& (
|
|
||||||
returnReduce(nLocal, sumOp<label>())
|
returnReduce(nLocal, sumOp<label>())
|
||||||
< returnReduce(start.size(), sumOp<label>())
|
< returnReduce(start.size(), sumOp<label>())
|
||||||
)
|
)
|
||||||
)
|
|
||||||
{
|
{
|
||||||
// Not all can be resolved locally. Build segments and map, send over
|
// Not all can be resolved locally. Build segments and map,
|
||||||
// segments, do intersections, send back and merge.
|
// send over segments, do intersections, send back and merge.
|
||||||
|
|
||||||
|
|
||||||
// Construct queries (segments)
|
// Construct queries (segments)
|
||||||
@ -519,6 +532,7 @@ void Foam::distributedTriSurfaceMesh::findLine
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Exchanges indices to the processor they come from.
|
// Exchanges indices to the processor they come from.
|
||||||
|
|||||||
Reference in New Issue
Block a user