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/ksp/ksp/tutorials/ex32.c
src/ksp/ksp/tutorials/ex36.cxx
src/ksp/ksp/tutorials/ex35.cxx
src/ksp/ksp/tutorials/ex45.c
src/ksp/ksp/tutorials/ex65.c
src/ksp/ksp/tutorials/ex50.c
src/ksp/ksp/tutorials/ex28.c
src/ksp/ksp/tutorials/ex25.c
src/ksp/ksp/tutorials/ex73.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages