PetscObjectQueryFunction#

Retrieve a function pointer that was previously composed onto a PetscObject with PetscObjectComposeFunction()

Synopsis#

#include <petscsys.h>
PetscErrorCode PetscObjectQueryFunction(PetscObject obj, const char name[], void (**fptr)(void))

Logically Collective

Input Parameters#

  • obj - the PetscObject

  • name - the string under which the function was composed

Output Parameter#

  • fptr - the address into which the function pointer is written; set to NULL if no function of this name is composed onto obj

Note#

The macro casts fptr to the internal PetscErrorCodeFn ** representation before calling PetscObjectQueryFunction_Private() so that any function-pointer type can be supplied without an explicit cast.

See Also#

PetscObjectComposeFunction(), PetscObjectHasFunction(), PetscObject

Level#

advanced

Location#

include/petscsys.h

Examples#

src/mat/tutorials/ex8.c


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