Skip to main content
`Ctrl`+`K`

# PetscPartitionerRegister

Adds a new PetscPartitioner implementation

## Synopsis

    #include "petscpartitioner.h"
    PetscErrorCode PetscPartitionerRegister(const char sname[], PetscErrorCode (*function)(PetscPartitioner))

Not Collective, No Fortran Support

## Input Parameters

- sname - The name of a new user-defined creation routine

- function - The creation routine

## Notes

PetscPartitionerRegister() may be called multiple times to add several user-defined PetscPartitioners

## Example Usage

        PetscPartitionerRegister("my_part", MyPetscPartitionerCreate);

Then, your PetscPartitioner type can be chosen with the procedural interface via

        PetscPartitionerCreate(MPI_Comm, PetscPartitioner *);
        PetscPartitionerSetType(PetscPartitioner, "my_part");

or at runtime via the option

        -petscpartitioner_type my_part

## See Also

`PetscPartitionerRegisterAll()`

## Level

advanced

## Location

src/dm/partitioner/interface/partitionerreg.c

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