Skip to content
Snippets Groups Projects
Commit 93ca5b69 authored by franjo.juretic@c-fields.com's avatar franjo.juretic@c-fields.com
Browse files

Bug fix for MPI execution in octree load balancing

git-svn-id: https://pl5.projectlocker.com/igui/meshGeneration/svn@56 fdcce57e-7e00-11e2-b579-49867b4cea03
parent efbe9490
No related branches found
No related tags found
No related merge requests found
...@@ -353,6 +353,7 @@ void meshOctreeCube::refineMissingCube ...@@ -353,6 +353,7 @@ void meshOctreeCube::refineMissingCube
sCubes[i] = NULL; sCubes[i] = NULL;
const label subCubesLabel = slotPtr->childCubes_.size(); const label subCubesLabel = slotPtr->childCubes_.size();
slotPtr->childCubes_.appendFixedList(sCubes); slotPtr->childCubes_.appendFixedList(sCubes);
subCubesPtr_ = &slotPtr->childCubes_(subCubesLabel, 0); subCubesPtr_ = &slotPtr->childCubes_(subCubesLabel, 0);
} }
...@@ -373,7 +374,7 @@ void meshOctreeCube::refineMissingCube ...@@ -373,7 +374,7 @@ void meshOctreeCube::refineMissingCube
{ {
const VRWGraph& containedElements = const VRWGraph& containedElements =
activeSlotPtr_->containedTriangles_; activeSlotPtr_->containedTriangles_;
DynList<label> ce(containedElements.sizeOfRow(containedElementsLabel_)); DynList<label, 512> ce;
forAllRow(containedElements, containedElementsLabel_, tI) forAllRow(containedElements, containedElementsLabel_, tI)
{ {
......
...@@ -29,7 +29,10 @@ Description ...@@ -29,7 +29,10 @@ Description
#include "meshOctreeModifier.H" #include "meshOctreeModifier.H"
#include <map> #include <map>
# ifdef USE_OMP
#include <omp.h> #include <omp.h>
# endif
//#define OCTREETiming //#define OCTREETiming
//#define DEBUGBalancing //#define DEBUGBalancing
...@@ -271,12 +274,14 @@ void meshOctreeModifier::loadDistribution(const direction usedType) ...@@ -271,12 +274,14 @@ void meshOctreeModifier::loadDistribution(const direction usedType)
//- create boxes from the received coordinates //- create boxes from the received coordinates
forAll(migratedCubes, mcI) forAll(migratedCubes, mcI)
{
refineTreeForCoordinates refineTreeForCoordinates
( (
migratedCubes[mcI].coordinates(), migratedCubes[mcI].coordinates(),
Pstream::myProcNo(), Pstream::myProcNo(),
migratedCubes[mcI].cubeType() migratedCubes[mcI].cubeType()
); );
}
createListOfLeaves(); createListOfLeaves();
......
...@@ -164,20 +164,6 @@ void meshOctreeModifier::refineTreeForCoordinates ...@@ -164,20 +164,6 @@ void meshOctreeModifier::refineTreeForCoordinates
if( nei->isLeaf() ) if( nei->isLeaf() )
{ {
/* label containedTrianglesI(-1), containedEdgesI(-1);
if( containedTriangles.size() )
{
containedTrianglesI = octree_.containedTriangles_.size();
octree_.containedTriangles_.appendList(containedTriangles);
}
if( containedEdges.size() )
{
containedEdgesI = octree_.containedEdges_.size();
octree_.containedEdges_.appendList(containedEdges);
}
*/
//- refine the missing cube //- refine the missing cube
//nei->refineMissingCube(scI, containedTrianglesI, containedEdgesI); //nei->refineMissingCube(scI, containedTrianglesI, containedEdgesI);
nei->refineMissingCube nei->refineMissingCube
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment