PETSc version 3.16.5
Fix/Edit manual page

# PetscPartitionerRegister

Adds a new PetscPartitioner implementation

### Synopsis

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

Not Collective

### Input Parameters

| name | - The name of a new user-defined creation routine
| create_func | - The creation routine itself

### Notes

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

### Sample 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