:orphan: # PetscFERegister Adds a new `PetscFEType` ## Synopsis ``` #include "petscfe.h" PetscErrorCode PetscFERegister(const char sname[], PetscErrorCode (*function)(PetscFE)) ``` Not Collective ## Input Parameters - ***sname -*** The name of a new user-defined creation routine - ***function -*** The creation routine ## Sample usage ```none PetscFERegister("my_fe", MyPetscFECreate); ``` Then, your PetscFE type can be chosen with the procedural interface via ```none PetscFECreate(MPI_Comm, PetscFE *); PetscFESetType(PetscFE, "my_fe"); ``` or at runtime via the option ```none -petscfe_type my_fe ``` ## Note `PetscFERegister()` may be called multiple times to add several user-defined `PetscFE`s ## See Also `PetscFE`, `PetscFEType`, `PetscFERegisterAll()`, `PetscFERegisterDestroy()` ## Level advanced ## Location src/dm/dt/fe/interface/fe.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/dt/fe/interface/fe.c) [Index of all FE routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)