PetscLimiterRegister — PETSc 3.22.5 documentation

Skip to main content
`Ctrl`+`K`

# PetscLimiterRegister

Adds a new `PetscLimiter` implementation

## Synopsis

    #include "petscfv.h"
    PetscErrorCode PetscLimiterRegister(const char sname[], PetscErrorCode (*function)(PetscLimiter))

Not Collective, No Fortran Support

## Input Parameters

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

- function - The creation routine

## Example Usage

        PetscLimiterRegister("my_lim", MyPetscLimiterCreate);

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

        PetscLimiterCreate(MPI_Comm, PetscLimiter *);
        PetscLimiterSetType(PetscLimiter, "my_lim");

or at runtime via the option

        -petsclimiter_type my_lim

## Note

`PetscLimiterRegister()` may be called multiple times to add several user-defined PetscLimiters

## See Also

`PetscLimiter`, `PetscLimiterType`, `PetscLimiterRegisterAll()`, `PetscLimiterRegisterDestroy()`

## Level

advanced

## Location

src/dm/dt/fv/interface/fv.c

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