diff --git a/CMakeLists.txt b/CMakeLists.txt index 90cc06a524c392acc56519b086c7e7efa6f0187d..a4fd554101f6b5aa5b08279b9ce48d1577de10e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,6 +120,7 @@ if(USE_PARTITIONER_ZOLTAN) set(USE_PARTITIONER_ZOLTAN OFF) message("ZOLTAN NOT FOUND") else() + include_directories(${ZOLTAN_INCLUDE_DIR}) include_directories(${ZOLTAN_INCLUDE_DIRS}) set(USE_PARTITIONER_ZOLTAN ON) message("ZOLTAN FOUND") diff --git a/mesh.cpp b/mesh.cpp index 789a654ef0d762733646e4e4c7b0ae19a19e52ce..610e716366521a1be8b10046724c207fd3ff108e 100644 --- a/mesh.cpp +++ b/mesh.cpp @@ -154,6 +154,7 @@ namespace INMOST if( !sparse_data[etypenum].empty() ) ret += sizeof(sparse_sub_type); //size needed to support sparse data } //Any additional impact of supporting huge structures over all elements may be added later + return ret; } else return 0; } diff --git a/partitioner.cpp b/partitioner.cpp index 4cd594395176fa2872f3b1143b8aa831bec77917..ddd081cd44a2e2a62263588481d09f972a465274 100644 --- a/partitioner.cpp +++ b/partitioner.cpp @@ -58,7 +58,7 @@ namespace INMOST globalID[i] = it->GlobalID(); localID[i] = i; for(int j = 0; j < wgt_dim; j++) - obj_wgts[i] = it->RealArray(p->GetWeight())[j]; + obj_wgts[i] = static_cast(it->RealArray(p->GetWeight())[j]); i++; } } @@ -120,11 +120,11 @@ namespace INMOST if( it->GetStatus() != Element::Ghost ) { numEdges[i] = 0; - adjacent faces = it->getFaces(); - for(adjacent::iterator jt = faces.begin(); jt != faces.end(); jt++) + ElementArray faces = it->getFaces(); + for(ElementArray::iterator jt = faces.begin(); jt != faces.end(); jt++) { - Cell * n = it->Neighbour(&*jt); - if( n != NULL ) numEdges[i]++; + Cell n = it->Neighbour(jt->self()); + if( n.isValid() ) numEdges[i]++; } i++; } @@ -161,16 +161,16 @@ namespace INMOST for(Mesh::iteratorCell it = m->BeginCell(); it != m->EndCell(); it++) if( it->GetStatus() != Element::Ghost ) { - adjacent faces = it->getFaces(); - for(adjacent::iterator jt = faces.begin(); jt != faces.end(); jt++) + ElementArray faces = it->getFaces(); + for(ElementArray::iterator jt = faces.begin(); jt != faces.end(); jt++) { - Cell * n = it->Neighbour(&*jt); - if( n != NULL ) + Cell n = it->Neighbour(jt->self()); + if( n.isValid() ) { *nextNbor++ = n->GlobalID(); *nextProc++ = n->Integer(m->OwnerTag()); for(int j = 0; j < wgt_dim; j++) - *nextWgt++ = jt->RealArray(p->GetWeight())[j]; + *nextWgt++ = static_cast(jt->RealArray(p->GetWeight())[j]); } } i++; @@ -380,7 +380,7 @@ namespace INMOST ZOLTAN_ID_PTR importGlobalGids, importLocalGids, exportGlobalGids, exportLocalGids; int *importProcs, *importToPart, *exportProcs, *exportToPart; int rc; - if( m->Integer(m->LayersTag()) == 0 ) m->ExchangeGhost(1,FACE); + if( m->Integer(m->GetHandle(),m->LayersTag()) == 0 ) m->ExchangeGhost(1,FACE); rc = Zoltan_LB_Partition(static_cast(pzz), /* input (all remaining fields are output) */ &changes, /* 1 if partitioning was changed, 0 otherwise */