Skip to main content
`Ctrl`+`K`

# PetscFortranCallbackType

Indicates if a Fortran callback stored in a `PetscObject` is associated with the class or the current particular type of the object

## Synopsis

    typedef enum {
      PETSC_FORTRAN_CALLBACK_CLASS,
      PETSC_FORTRAN_CALLBACK_SUBTYPE,
      PETSC_FORTRAN_CALLBACK_MAXTYPE
    } PetscFortranCallbackType;

## Values

- `PETSC_FORTRAN_CALLBACK_CLASS` - the callback is associated with the class

- `PETSC_FORTRAN_CALLBACK_SUBTYPE` - the callback is associated with the current particular subtype

## Developer Note

The two sets of callbacks are stored in different arrays in the `PetscObject` because the `PETSC_FORTRAN_CALLBACK_SUBTYPE` callbacks must be removed whenever the type of the object is changed (because they are not appropriate for other types). The removal is done in `PetscObjectChangeTypeName()`.

## See Also

`PetscFortranCallbackFn`, `PetscObjectSetFortranCallback()`, `PetscObjectGetFortranCallback()`, `PetscObjectChangeTypeName()`

## Level

developer

## Location

include/petsc/private/petscimpl.h

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