petsc4py.PETSc.Partitioner#

class petsc4py.PETSc.Partitioner#

Bases: Object

A graph partitioner.

Enumerations

Type

The partitioner types.

Methods Summary

create([comm])

Create an empty partitioner object.

destroy()

Destroy the partitioner object.

getType()

Return the partitioner type.

reset()

Reset data structures of the partitioner.

setFromOptions()

Set parameters in the partitioner from the options database.

setShellPartition(numProcs[, sizes, points])

Set a custom partition for a mesh.

setType(part_type)

Build a particular type of the partitioner.

setUp()

Construct data structures for the partitioner.

view([viewer])

View the partitioner.

Methods Documentation

create(comm=None)#

Create an empty partitioner object.

Collective.

The type can be set with setType.

Parameters:

comm (Comm | None) – MPI communicator, defaults to Sys.getDefaultComm.

Return type:

Self

Source code at petsc4py/PETSc/Partitioner.pyx:57

destroy()#

Destroy the partitioner object.

Collective.

Source code at petsc4py/PETSc/Partitioner.pyx:44

Return type:

Self

getType()#

Return the partitioner type.

Not collective.

Source code at petsc4py/PETSc/Partitioner.pyx:99

Return type:

Type

reset()#

Reset data structures of the partitioner.

Collective.

Source code at petsc4py/PETSc/Partitioner.pyx:137

Return type:

None

setFromOptions()#

Set parameters in the partitioner from the options database.

Collective.

Source code at petsc4py/PETSc/Partitioner.pyx:113

Return type:

None

setShellPartition(numProcs, sizes=None, points=None)#

Set a custom partition for a mesh.

Collective.

Parameters:
  • sizes (Sequence[int] | None) – The number of points in each partition.

  • points (Sequence[int] | None) – A permutation of the points that groups those assigned to each partition in order (i.e., partition 0 first, partition 1 next, etc.).

  • numProcs (int)

Return type:

None

Source code at petsc4py/PETSc/Partitioner.pyx:149

setType(part_type)#

Build a particular type of the partitioner.

Collective.

Parameters:

part_type (Type | str) – The kind of partitioner.

Return type:

None

Source code at petsc4py/PETSc/Partitioner.pyx:80

setUp()#

Construct data structures for the partitioner.

Collective.

Source code at petsc4py/PETSc/Partitioner.pyx:125

Return type:

None

view(viewer=None)#

View the partitioner.

Collective.

Parameters:

viewer (Viewer | None) – A Viewer to display the graph.

Return type:

None

Source code at petsc4py/PETSc/Partitioner.pyx:25