# PetscFERegister
Adds a new `PetscFEType` 
## Synopsis
```
#include "petscfe.h" 
PetscErrorCode PetscFERegister(const char sname[], PetscErrorCode (*function)(PetscFE))
```
Not Collective


## Input Parameters

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



## 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
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/dt/fe/interface/fe.c.html#PetscFERegister">src/dm/dt/fe/interface/fe.c</A>


---
[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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
