Skip to main content
`Ctrl`+`K`

# PetscFVRegister

Adds a new `PetscFV` implementation

## Synopsis

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

Not Collective, No Fortran Support

## Input Parameters

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

- function - The creation routine itself

## Example Usage

        PetscFVRegister("my_fv", MyPetscFVCreate);

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

        PetscFVCreate(MPI_Comm, PetscFV *);
        PetscFVSetType(PetscFV, "my_fv");

or at runtime via the option

        -petscfv_type my_fv

## Note

`PetscFVRegister()` may be called multiple times to add several user-defined PetscFVs

## See Also

`PetscFV`, `PetscFVType`, `PetscFVRegisterAll()`, `PetscFVRegisterDestroy()`

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