Beispiel #1
0
/*
 * void Zoltan_Oct_costs_free(pOctant octant)
 *
 * deletes the cost associated with the octant
 */
void Zoltan_Oct_costs_free(OCT_Global_Info *OCT_info,pOctant octant) {
    pOctant children[8];                       /* children of the octant */
    int i;                                     /* index counter */

    Zoltan_Oct_modify_cost(octant, 0);

    if (!Zoltan_Oct_isTerminal(octant)) {
        Zoltan_Oct_children(octant,children);
        for (i=0; i<8; i++)
            if(Zoltan_Oct_POct_local(OCT_info, octant, i))
                Zoltan_Oct_costs_free(OCT_info,children[i]);
    }
}
Beispiel #2
0
/*
 * void Zoltan_Oct_visit_all_subtrees()
 *
 * visits each of the subtrees that are on the local processor
 */
static void Zoltan_Oct_visit_all_subtrees(ZZ *zz, float *part_sizes) {
  pRList  RootList;                           /* list of all local roots */
  pOctant RootOct;
  OCT_Global_Info *OCT_info = (OCT_Global_Info *)(zz->LB.Data_Structure);

  /* get the list of all the local roots */
  /* iterate through each root in localroot list */ 
  /* mark each subtree as being Zoltan_Oct_visited */
  /* and free the costs */
  RootList = Zoltan_Oct_POct_localroots(OCT_info);
  while ((RootOct = RL_nextRootOctant(&RootList))) {
    Zoltan_Oct_visit(zz, RootOct, part_sizes);  
    Zoltan_Oct_costs_free(OCT_info, RootOct);
  }
}