CharacteristicRegister — PETSc 3.25.0 documentation

Skip to main content
`Ctrl`+`K`

# CharacteristicRegister

Adds an approarch to the method of characteristics package.

## Synopsis

    #include "petsccharacteristic.h"
    PetscErrorCode CharacteristicRegister(const char sname[], PetscErrorCode (*function)(Characteristic))

Not Collective, No Fortran Support

## Input Parameters

- sname - name of a new approach

- function - routine to create method context

## Example Usage

        CharacteristicRegister("my_char", MyCharCreate);

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

        CharacteristicCreate(MPI_Comm, Characteristic* &char);
        CharacteristicSetType(char,"my_char");

or at runtime via the option

        -characteristic_type my_char

## Notes

`CharacteristicRegister()` may be called multiple times to add several approaches.

## See Also

TS: Scalable ODE and DAE Solvers, `CharacteristicRegisterAll()`, `CharacteristicRegisterDestroy()`

## Level

advanced

## Location

src/ts/characteristic/interface/characteristic.c

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