int ZoltanSpace::PartitionerFactory_JR::SetZoltanQueriesEntityInfoPort( struct Zoltan_Struct *zz) { if ( pEntityInfo == 0 ) return (-1) ; ::ZoltanSpace::Globals::pEntityInfo = pEntityInfo ; Zoltan_Set_Num_Obj_Fn(zz, &(ZC_JR_Num_Obj_Fn), NULL) ; if ( pIterate->value == false ) Zoltan_Set_Obj_List_Fn(zz, &(ZC_JR_Obj_List_Fn), NULL) ; else { Zoltan_Set_First_Obj_Fn(zz, &(ZC_JR_First_Obj_Fn), NULL) ; Zoltan_Set_Next_Obj_Fn(zz, &(ZC_JR_Next_Obj_Fn), NULL) ; } return(0) ; }
int Zoltan_Set_Fn(ZZ *zz, ZOLTAN_FN_TYPE fn_type, ZOLTAN_VOID_FN *fn, void *data) { /* * Function to initialize a given LB interface function. * Input: * zz -- Pointer to a Zoltan structure. * fn_type -- Enum type indicating the function to be set. * fn -- Pointer to the function to be used in the * assignment. * data -- Pointer to data that the LB library will * pass as an argument to fn(). May be NULL. * Output: * zz -- Appropriate field set to value in void *(). */ char *yo = "Zoltan_Set_Fn"; char msg[256]; int ierr; switch (fn_type) { case ZOLTAN_PART_FN_TYPE: ierr = Zoltan_Set_Part_Fn(zz, (ZOLTAN_PART_FN *) fn, data); break; case ZOLTAN_PART_MULTI_FN_TYPE: ierr = Zoltan_Set_Part_Multi_Fn(zz, (ZOLTAN_PART_MULTI_FN *) fn, data); break; case ZOLTAN_NUM_EDGES_FN_TYPE: ierr = Zoltan_Set_Num_Edges_Fn(zz, (ZOLTAN_NUM_EDGES_FN *) fn, data); break; case ZOLTAN_NUM_EDGES_MULTI_FN_TYPE: ierr = Zoltan_Set_Num_Edges_Multi_Fn(zz, (ZOLTAN_NUM_EDGES_MULTI_FN *) fn, data); break; case ZOLTAN_EDGE_LIST_FN_TYPE: ierr = Zoltan_Set_Edge_List_Fn(zz, (ZOLTAN_EDGE_LIST_FN *) fn, data); break; case ZOLTAN_EDGE_LIST_MULTI_FN_TYPE: ierr = Zoltan_Set_Edge_List_Multi_Fn(zz, (ZOLTAN_EDGE_LIST_MULTI_FN *) fn, data); break; case ZOLTAN_NUM_GEOM_FN_TYPE: ierr = Zoltan_Set_Num_Geom_Fn(zz, (ZOLTAN_NUM_GEOM_FN *) fn, data); break; case ZOLTAN_GEOM_MULTI_FN_TYPE: ierr = Zoltan_Set_Geom_Multi_Fn(zz, (ZOLTAN_GEOM_MULTI_FN *) fn, data); break; case ZOLTAN_GEOM_FN_TYPE: ierr = Zoltan_Set_Geom_Fn(zz, (ZOLTAN_GEOM_FN *) fn, data); break; case ZOLTAN_NUM_OBJ_FN_TYPE: ierr = Zoltan_Set_Num_Obj_Fn(zz, (ZOLTAN_NUM_OBJ_FN *) fn, data); break; case ZOLTAN_OBJ_LIST_FN_TYPE: ierr = Zoltan_Set_Obj_List_Fn(zz, (ZOLTAN_OBJ_LIST_FN *) fn, data); break; case ZOLTAN_FIRST_OBJ_FN_TYPE: ierr = Zoltan_Set_First_Obj_Fn(zz, (ZOLTAN_FIRST_OBJ_FN *) fn, data); break; case ZOLTAN_NEXT_OBJ_FN_TYPE: ierr = Zoltan_Set_Next_Obj_Fn(zz, (ZOLTAN_NEXT_OBJ_FN *) fn, data); break; case ZOLTAN_NUM_BORDER_OBJ_FN_TYPE: ierr = Zoltan_Set_Num_Border_Obj_Fn(zz, (ZOLTAN_NUM_BORDER_OBJ_FN *) fn, data); break; case ZOLTAN_BORDER_OBJ_LIST_FN_TYPE: ierr = Zoltan_Set_Border_Obj_List_Fn(zz, (ZOLTAN_BORDER_OBJ_LIST_FN *) fn, data); break; case ZOLTAN_FIRST_BORDER_OBJ_FN_TYPE: ierr = Zoltan_Set_First_Border_Obj_Fn(zz, (ZOLTAN_FIRST_BORDER_OBJ_FN *) fn, data); break; case ZOLTAN_NEXT_BORDER_OBJ_FN_TYPE: ierr = Zoltan_Set_Next_Border_Obj_Fn(zz, (ZOLTAN_NEXT_BORDER_OBJ_FN *) fn, data); break; case ZOLTAN_PRE_MIGRATE_PP_FN_TYPE: ierr = Zoltan_Set_Pre_Migrate_PP_Fn(zz, (ZOLTAN_PRE_MIGRATE_PP_FN *) fn, data); break; case ZOLTAN_MID_MIGRATE_PP_FN_TYPE: ierr = Zoltan_Set_Mid_Migrate_PP_Fn(zz, (ZOLTAN_MID_MIGRATE_PP_FN *) fn, data); break; case ZOLTAN_POST_MIGRATE_PP_FN_TYPE: ierr = Zoltan_Set_Post_Migrate_PP_Fn(zz, (ZOLTAN_POST_MIGRATE_PP_FN *) fn, data); break; case ZOLTAN_PRE_MIGRATE_FN_TYPE: ierr = Zoltan_Set_Pre_Migrate_Fn(zz, (ZOLTAN_PRE_MIGRATE_FN *) fn, data); break; case ZOLTAN_MID_MIGRATE_FN_TYPE: ierr = Zoltan_Set_Mid_Migrate_Fn(zz, (ZOLTAN_MID_MIGRATE_FN *) fn, data); break; case ZOLTAN_POST_MIGRATE_FN_TYPE: ierr = Zoltan_Set_Post_Migrate_Fn(zz, (ZOLTAN_POST_MIGRATE_FN *) fn, data); break; case ZOLTAN_OBJ_SIZE_FN_TYPE: ierr = Zoltan_Set_Obj_Size_Fn(zz, (ZOLTAN_OBJ_SIZE_FN *) fn, data); break; case ZOLTAN_OBJ_SIZE_MULTI_FN_TYPE: ierr = Zoltan_Set_Obj_Size_Multi_Fn(zz, (ZOLTAN_OBJ_SIZE_MULTI_FN *) fn, data); break; case ZOLTAN_PACK_OBJ_FN_TYPE: ierr = Zoltan_Set_Pack_Obj_Fn(zz, (ZOLTAN_PACK_OBJ_FN *) fn, data); break; case ZOLTAN_PACK_OBJ_MULTI_FN_TYPE: ierr = Zoltan_Set_Pack_Obj_Multi_Fn(zz, (ZOLTAN_PACK_OBJ_MULTI_FN *) fn, data); break; case ZOLTAN_UNPACK_OBJ_FN_TYPE: ierr = Zoltan_Set_Unpack_Obj_Fn(zz, (ZOLTAN_UNPACK_OBJ_FN *) fn, data); break; case ZOLTAN_UNPACK_OBJ_MULTI_FN_TYPE: ierr = Zoltan_Set_Unpack_Obj_Multi_Fn(zz, (ZOLTAN_UNPACK_OBJ_MULTI_FN *) fn, data); break; case ZOLTAN_NUM_COARSE_OBJ_FN_TYPE: ierr = Zoltan_Set_Num_Coarse_Obj_Fn(zz, (ZOLTAN_NUM_COARSE_OBJ_FN *) fn, data); break; case ZOLTAN_COARSE_OBJ_LIST_FN_TYPE: ierr = Zoltan_Set_Coarse_Obj_List_Fn(zz, (ZOLTAN_COARSE_OBJ_LIST_FN *) fn, data); break; case ZOLTAN_FIRST_COARSE_OBJ_FN_TYPE: ierr = Zoltan_Set_First_Coarse_Obj_Fn(zz, (ZOLTAN_FIRST_COARSE_OBJ_FN *) fn, data); break; case ZOLTAN_NEXT_COARSE_OBJ_FN_TYPE: ierr = Zoltan_Set_Next_Coarse_Obj_Fn(zz, (ZOLTAN_NEXT_COARSE_OBJ_FN *) fn, data); break; case ZOLTAN_NUM_CHILD_FN_TYPE: ierr = Zoltan_Set_Num_Child_Fn(zz, (ZOLTAN_NUM_CHILD_FN *) fn, data); break; case ZOLTAN_CHILD_LIST_FN_TYPE: ierr = Zoltan_Set_Child_List_Fn(zz, (ZOLTAN_CHILD_LIST_FN *) fn, data); break; case ZOLTAN_CHILD_WEIGHT_FN_TYPE: ierr = Zoltan_Set_Child_Weight_Fn(zz, (ZOLTAN_CHILD_WEIGHT_FN *) fn, data); break; case ZOLTAN_HG_SIZE_CS_FN_TYPE: ierr = Zoltan_Set_HG_Size_CS_Fn(zz, (ZOLTAN_HG_SIZE_CS_FN *) fn, data); break; case ZOLTAN_HG_CS_FN_TYPE: ierr = Zoltan_Set_HG_CS_Fn(zz, (ZOLTAN_HG_CS_FN *) fn, data); break; case ZOLTAN_HG_SIZE_EDGE_WTS_FN_TYPE: ierr = Zoltan_Set_HG_Size_Edge_Wts_Fn(zz, (ZOLTAN_HG_SIZE_EDGE_WTS_FN *) fn, data); break; case ZOLTAN_HG_EDGE_WTS_FN_TYPE: ierr = Zoltan_Set_HG_Edge_Wts_Fn(zz, (ZOLTAN_HG_EDGE_WTS_FN *) fn, data); break; case ZOLTAN_NUM_FIXED_OBJ_FN_TYPE: ierr = Zoltan_Set_Num_Fixed_Obj_Fn(zz, (ZOLTAN_NUM_FIXED_OBJ_FN *) fn, data); break; case ZOLTAN_FIXED_OBJ_LIST_FN_TYPE: ierr = Zoltan_Set_Fixed_Obj_List_Fn(zz, (ZOLTAN_FIXED_OBJ_LIST_FN *) fn, data); break; case ZOLTAN_HIER_NUM_LEVELS_FN_TYPE: ierr = Zoltan_Set_Hier_Num_Levels_Fn(zz, (ZOLTAN_HIER_NUM_LEVELS_FN *) fn, data); break; case ZOLTAN_HIER_PART_FN_TYPE: ierr = Zoltan_Set_Hier_Part_Fn(zz, (ZOLTAN_HIER_PART_FN *) fn, data); break; case ZOLTAN_HIER_METHOD_FN_TYPE: ierr = Zoltan_Set_Hier_Method_Fn(zz, (ZOLTAN_HIER_METHOD_FN *) fn, data); break; default: sprintf(msg, "ZOLTAN_FN_TYPE %d is invalid.\n" "Value must be in range 0 to %d.", fn_type, ZOLTAN_MAX_FN_TYPES); ZOLTAN_PRINT_ERROR(zz->Proc, yo, msg); ierr = ZOLTAN_WARN; } return (ierr); }