Documentation Index
Fetch the complete documentation index at: https://mintlify.com/KarypisLab/ParMETIS/llms.txt
Use this file to discover all available pages before exploring further.
ParMETIS_V3_PartMeshKway partitions a distributed finite element mesh without requiring an explicit dual graph construction step. Internally it builds the dual graph and applies the multilevel k-way algorithm in a single call, making it more convenient than calling ParMETIS_V3_Mesh2Dual followed by ParMETIS_V3_PartKway. Element adjacency is determined by the same ncommonnodes criterion used in Mesh2Dual. The resulting part array assigns each local element to a partition.
Parameters
Distribution of elements across processes.
elmdist[i] is the global index of the first element on process i. Size npes + 1; must be identical on all processes.Element connectivity row pointers.
eptr[i] is the index into eind where the node list of local element i begins. Size local_nelems + 1.Element connectivity node indices. Contains the global mesh node indices for each local element. Size
eptr[local_nelems].Element weights.
ncon values per element in interleaved order, analogous to vwgt for graphs. May be NULL when bit 1 of wgtflag is 0.Bitmask controlling which weights are used.
0 = no weights, 2 = element weights only. Edge weights on the dual graph are not supported; bit 0 should be 0.Indexing convention.
0 for C-style 0-based indexing; 1 for Fortran-style 1-based indexing.Number of balancing constraints per element.
Minimum number of shared mesh nodes required for two elements to be considered adjacent. Use
2 for edge adjacency in 2D and 3 for face adjacency in 3D.Desired number of partitions.
Target partition weights. Array of
nparts * ncon values. Values for each constraint must sum to 1.0. Pass NULL for equal-weight partitions.Per-constraint imbalance tolerance. Array of
ncon values greater than 1.0.Algorithm options. If
options[0] = 0, all defaults are used. If options[0] = 1, options[1] sets the debug level and options[2] sets the random seed.Output. Total weight of edges in the dual graph that cross partition boundaries.
Output. Partition assignment for each local element.
part[i] is the partition ID of local element i. Caller must allocate at least local_nelems elements.Pointer to the MPI communicator covering all participating processes.
Return value
ReturnsMETIS_OK (1) on success. Any other value indicates an error.