:orphan:
# CharacteristicRegister
Adds a solver to the method of characteristics package. 
## Synopsis
```
#include "petsccharacteristic.h" 
PetscErrorCode CharacteristicRegister(const char sname[], PetscErrorCode (*function)(Characteristic))
```
Not Collective


## Input Parameters

- ***sname -*** name of a new user-defined solver
- ***function -*** routine to create method context





## Sample usage
```none
    CharacteristicRegister("my_char", MyCharCreate);
```


Then, your Characteristic type can be chosen with the procedural interface via
```none
    CharacteristicCreate(MPI_Comm, Characteristic* &char);
    CharacteristicSetType(char,"my_char");
```

or at runtime via the option
```none
    -characteristic_type my_char
```



## Notes
CharacteristicRegister() may be called multiple times to add several user-defined solvers.


## See Also
 [](ch_ts), `CharacteristicRegisterAll()`, `CharacteristicRegisterDestroy()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/characteristic/interface/characteristic.c.html#CharacteristicRegister">src/ts/characteristic/interface/characteristic.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ts/characteristic/interface/characteristic.c)


[Index of all Characteristic routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
