PetscPartitionerPartition#
Partition a graph
Synopsis#
#include "petscpartitioner.h"
PetscErrorCode PetscPartitionerPartition(PetscPartitioner part, PetscInt nparts, PetscInt numVertices, PetscInt start[], PetscInt adjacency[], PetscSection vertexSection, PetscSection edgeSection, PetscSection targetSection, PetscSection partSection, IS *partition)
Collective
Input Parameters#
part - the
PetscPartitionernparts - the number of partitions requested
numVertices - the number of vertices in the local part of the graph
start - row pointers for the local part of the graph (CSR style)
adjacency - adjacency list (CSR style)
vertexSection - the absolute weight of each local vertex (can be
NULL)edgeSection - the absolute weight of each local edge (can be
NULL)targetSection - the absolute weight of each partition (can be
NULL)
Output Parameters#
partSection - the
PetscSectiongiving the division of points by the partitionerpartition - the list of points by partition
Options Database Keys#
-petscpartitioner_view viewer_specification - view the partitioner information. See
PetscOptionsCreateViewer()for the format ofviewer_specification-petscpartitioner_view_graph viewer_specification - view the graph we are partitioning. See
PetscOptionsCreateViewer()for the format ofviewer_specification
Notes#
The chart of the vertexSection (if present) must contain [0,numVertices), with the number of dofs in the section specifying the absolute weight for each vertex.
The chart of the targetSection (if present) must contain [0,nparts), with the number of dofs in the section specifying the absolute weight for each partition.
This information must be the same across processes, PETSc does not check it.
See Also#
PetscPartitionerCreate(), PetscPartitionerSetType(), PetscSectionCreate(), PetscSectionSetChart(), PetscSectionSetDof(),
PetscOptionsCreateViewer(), PetscIntCSRView()
Level#
developer
Location#
Examples#
Implementations#
PetscPartitionerPartition_Chaco() in src/dm/partitioner/impls/chaco/partchaco.c
PetscPartitionerPartition_Gather() in src/dm/partitioner/impls/gather/partgather.c
PetscPartitionerPartition_MatPartitioning() in src/dm/partitioner/impls/matpart/partmatpart.c
PetscPartitionerPartition_Multistage() in src/dm/partitioner/impls/multistage/mspart.c
PetscPartitionerPartition_ParMETIS() in src/dm/partitioner/impls/parmetis/partparmetis.c
PetscPartitionerPartition_PTScotch() in src/dm/partitioner/impls/ptscotch/partptscotch.c
PetscPartitionerPartition_Shell() in src/dm/partitioner/impls/shell/partshell.c
PetscPartitionerPartition_Simple() in src/dm/partitioner/impls/simple/partsimple.c
Index of all MatGraphOperations routines
Table of Contents for all manual pages
Index of all manual pages