next up previous
Next: Partition Quality Analysis Routines Up: PMDB User's Manual Previous: Visualization

Element Weighting Routines

PMDB support for non-unit weights on regions

The measure of imbalance or "cost function" that reflects the computational load on each processor is generally chosen as the number of elements on a processor with h-refinement. However, heterogeneous costs are necessary when (i) using p-refinement or spatially-dependent solution methods, (ii) using spatially-dependent time steps, (iii) enforcing boundary conditions, and (iv) using predictive load balancing. PMDB provides an element weighting scheme that can be used to address each of these needs.
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.



Jim Teresco
Tue Feb 9 12:53:44 EST 1999