Commit 42952f56 authored by Franjo's avatar Franjo
Browse files

Minor modifications

parent ada28548
......@@ -26,7 +26,7 @@ Description
\*---------------------------------------------------------------------------*/
#include "meshOctreeModifier.H"
#include "helperFunctionsPar.H"
#include "helperFunctions.H"
#include "triSurf.H"
#include <map>
......@@ -203,8 +203,6 @@ void meshOctreeModifier::addLayerFromNeighbouringProcessors()
return;
const LongList<meshOctreeCube*>& leaves = octree_.leaves_;
const labelList& neiProcs = octree_.neiProcs_;
const List<Pair<meshOctreeCubeCoordinates> >& neiRange = octree_.neiRange_;
forAll(leaves, leafI)
if( leaves[leafI]->procNo() != Pstream::myProcNo() )
......@@ -212,6 +210,9 @@ void meshOctreeModifier::addLayerFromNeighbouringProcessors()
Info << "Adding an additional layer of cells" << endl;
const labelList& neiProcs = octree_.neiProcs_;
const List<Pair<meshOctreeCubeCoordinates> >& neiRange = octree_.neiRange_;
meshOctreeCubeCoordinates minCoord, maxCoord;
std::map<label, LongList<meshOctreeCubeBasic> > toProcs;
forAll(neiProcs, i)
......@@ -227,11 +228,14 @@ void meshOctreeModifier::addLayerFromNeighbouringProcessors()
forAll(neiProcs, procI)
{
if(
if
(
(maxCoord >= neiRange[procI].first()) &&
(minCoord <= neiRange[procI].second())
)
{
toProcs[neiProcs[procI]].append(*leaves[leafI]);
}
}
}
......@@ -240,6 +244,9 @@ void meshOctreeModifier::addLayerFromNeighbouringProcessors()
{
if( i == Pstream::myProcNo() )
{
Pout << "Neighbour processors " << neiProcs << endl;
Pout << "Neighbour range " << neiRange << endl;
std::map<label, LongList<meshOctreeCubeBasic> >::iterator it;
for(it=toProcs.begin();it!=toProcs.end();++it)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment