PetscCtx#
indicates an argument that can be a pointer to any C struct (or Fortran derived type).
Notes#
This should not be used for arrays of unknown type.
Fortran Notes#
A Fortran code that calls a function with a PetscCtx argument would declare the variable ctx with
type(AppType) :: ctx
where AppType is a Fortran derived type. Or the argument can be a PetscObject.
Developer Note#
PetscCtx is used instead of void * in PETSc code to enhance the clarity of the PETSc source code since void * serves so many different roles.
The getAPI() code processor also uses the variable type to generate correct bindings for other languages.
See Also#
Setting Routines and Contexts, PetscCtxRt, PetscCtxDestroyFn(), PeOp, PeNS, PetscInitialize(), DMGetApplicationContext(), DMSetApplicationContextDestroy()`
Level#
developer
Location#
Examples#
src/snes/tutorials/ex12.c
src/snes/tutorials/ex23.c
src/snes/tutorials/ex35.c
src/snes/tutorials/ex1.c
src/snes/tutorials/ex17.c
src/snes/tutorials/ex18.c
src/snes/tutorials/ex99.c
src/snes/tutorials/ex15.c
src/snes/tutorials/ex28.c
src/snes/tutorials/ex8.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages