src/parallel/ZoltanPartitioner.cpp
int ZoltanFunctions::box_getNumObj(void* data, int* ierr)
    {
      FUNCNAME("ZoltanFunctions::box_getNumObj()");

      ZoltanPartitioner* zoltan = (ZoltanPartitioner*)data;
      map<int, bool>& elInRank = zoltan->getElementInRank();

      int nObjects = 0;
      for (map<int, bool>::iterator it = elInRank.begin(); it != elInRank.end(); ++it)
        if (it->second)
          nObjects++;

      TEST_EXIT_DBG(nObjects % 6 == 0)("Should not happen!\n");

      nObjects = nObjects / 6;

      *ierr = ZOLTAN_OK;

      return nObjects;
    }
// === Zoltan query functions for box partitioning. ===
Zoltan query functions for box partitioning.
Zoltan query functions for box partitioning .
int ZoltanFunctions::box_getNumObj(void* data, int* ierr)
    {
      FUNCNAME("ZoltanFunctions::box_getNumObj()");
      ZoltanPartitioner* zoltan = (ZoltanPartitioner*)data;
      map<int, bool>& elInRank = zoltan->getElementInRank();
      int nObjects = 0;
      for (map<int, bool>::iterator it = elInRank.begin(); it != elInRank.end(); ++it)
        if (it->second)
          nObjects++;
      TEST_EXIT_DBG(nObjects % 6 == 0)("Should not happen!\n");
      nObjects = nObjects / 6;
      *ierr = ZOLTAN_OK;
      return nObjects;
    }
int ZoltanFunctions :: box_getNumObj ( void * data , int * ierr ) { FUNCNAME ( " " ) ; ZoltanPartitioner * zoltan = ( ZoltanPartitioner * ) data ; map < int , bool > & elInRank = zoltan -> getElementInRank ( ) ; int nObjects = 0 ; for ( map < int , bool > :: iterator it = elInRank . begin ( ) ; it != elInRank . end ( ) ; ++ it ) if ( it -> second ) nObjects ++ ; TEST_EXIT_DBG ( nObjects % 6 == 0 ) ( " \n " ) ; nObjects = nObjects / 6 ; * ierr = ZOLTAN_OK ; return nObjects ; }
Zoltan query functions for box partitioning.
Zoltan query functions for box partitioning .