MatPartitioningRegister — PETSc 3.22.5 documentation

Skip to main content
`Ctrl`+`K`

# MatPartitioningRegister

Adds a new sparse matrix partitioning to the matrix package.

## Synopsis

    #include "petscmat.h"
    PetscErrorCode MatPartitioningRegister(const char sname[], PetscErrorCode (*function)(MatPartitioning))

Not Collective, No Fortran Support

## Input Parameters

- sname - name of partitioning (for example `MATPARTITIONINGCURRENT`) or `MATPARTITIONINGPARMETIS`

- function - function pointer that creates the partitioning type

## Example Usage

       MatPartitioningRegister("my_part", MyPartCreate);

Then, your partitioner can be chosen with the procedural interface via `MatPartitioningSetType(part, "my_part")` or at runtime via the option `-mat_partitioning_type my_part`

## See Also

Matrices, `Mat`, `MatPartitioning`, `MatPartitioningType`, `MatPartitioningCreate()`, `MatPartitioningRegisterDestroy()`, `MatPartitioningRegisterAll()`

## Level

developer

## Location

src/mat/graphops/partition/partition.c

Index of all MatGraphOperations routines
Table of Contents for all manual pages
Index of all manual pages