petsc4py.PETSc.MatPartitioning¶
- class petsc4py.PETSc.MatPartitioning¶
Bases:
Object
Object for managing the partitioning of a matrix or graph.
Enumerations
Methods Summary
apply
(partitioning)Return a partitioning for the graph represented by a sparse matrix.
create
([comm])Create a partitioning context.
destroy
()Destroy the partitioning context.
getType
()Return the partitioning method.
setAdjacency
(adj)Set the adjacency graph (matrix) of the thing to be partitioned.
Set parameters in the partitioner from the options database.
setType
(matpartitioning_type)Set the type of the partitioner to use.
view
([viewer])View the partitioning data structure.
Methods Documentation
- apply(partitioning)¶
Return a partitioning for the graph represented by a sparse matrix.
Collective.
For each local node this tells the processor number that that node is assigned to.
See also
petsc.MatPartitioningApply
- create(comm=None)¶
Create a partitioning context.
Collective.
- Parameters:
comm (Comm | None) – MPI communicator, defaults to
Sys.getDefaultComm
.- Return type:
See also
destroy
,petsc.MatPartitioningCreate
- destroy()¶
Destroy the partitioning context.
Collective.
See also
create
,petsc.MatPartitioningDestroy
Source code at petsc4py/PETSc/MatPartitioning.pyx:47
- Return type:
- getType()¶
Return the partitioning method.
Not collective.
See also
setType
,petsc.MatPartitioningGetType
Source code at petsc4py/PETSc/MatPartitioning.pyx:98
- Return type:
- setAdjacency(adj)¶
Set the adjacency graph (matrix) of the thing to be partitioned.
Collective.
- Parameters:
adj (Mat) – The adjacency matrix, this can be any
Mat.Type
but the natural representation isMat.Type.MPIADJ
.- Return type:
See also
petsc.MatPartitioningSetAdjacency
- setFromOptions()¶
Set parameters in the partitioner from the options database.
Collective.
See also
Working with PETSc options (TODO),
petsc.MatPartitioningSetFromOptions
Source code at petsc4py/PETSc/MatPartitioning.pyx:112
- Return type: