PMDB_CBPROC pmdb_register_weight_func( pMeshPB pmeshpb, PMDB_CBPROC func);This function registers a weight function. When PMDB need to determine the weight assigned to an element. The type PMDB_CBPROC is defined as:
typedef PMDB_ELT_WT (*PMDB_CBPROC)(pEntity, PMDB_ELT_WT);Currently, PMDB_ELT_WT is a float, and below PMDB_PART_WT is a double.
PMDB_ELT_WT pmdb_element_weight( pMeshPB pmeshpb, pEntity pentity);This function returns the current weight of the given entity.
PMDB_PART_WT pmdb_partition_load( pMeshPB pmeshpb);This function returns total weight of the local partition.
void pmdb_weight_change( pMeshPB pmeshpb, pEntity entity, PMDB_ELT_WT old_weight);This function informs PMDB that the weight of the given entity has been changed. The old weight is sent as the third argument and the new weight is computed by a call to the registered weight function. This is necessary to maintain the correct partition load. Alternately, after changing weights, the function pmdb_weight_recompute_load, described next, may be called instead to recompute all weights.
void pmdb_weight_recompute_load( pMeshPB pmeshpb);This function recomputes the current partition load by querying each element and summing the weights.
int pmdb_using_weights( pMeshPB pmeshpb);This function returns whether or not weighting is in use, that is, if any weight function is currently registered.