PetscClassId — PETSc 3.21.4 documentation

Skip to main content
`Ctrl`+`K`

# PetscClassId

A unique id used to identify each PETSc class.

## Note

Use `PetscClassIdRegister()` to obtain a new value for a new class being created. Usually XXXInitializePackage() calls it for each class it defines.

## Developer Note

Internal integer stored in the `_p_PetscObject` data structure. These are all computed by an offset from the lowest one, `PETSC_SMALLEST_CLASSID`.

## See Also

`PetscClassIdRegister()`, `PetscLogEventRegister()`, `PetscHeaderCreate()`

## Level

developer

## Location

include/petscsystypes.h

## Examples

src/sys/tutorials/ex3f90.F90
src/sys/tutorials/ex3f.F90
src/vec/vec/tutorials/ex5f.F90
src/snes/tutorials/ex48.c
src/mat/tutorials/ex7.c
src/sys/tutorials/ex7.c
src/ts/tutorials/ex14.c

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