# PetscObjectQueryFunction

Gets a function associated with a given object.

### Synopsis

    #include "petsc.h"
    PetscErrorCode  PetscObjectQueryFunction(PetscObject obj,const char name[],void (**ptr)(void))

Collective on PetscObject

### Input Parameters

| obj | - the PETSc object; this must be cast with (PetscObject), for example, PetscObjectQueryFunction((PetscObject)ksp,...);
| name | - name associated with the child function

### Output Parameter

ptr -function pointer

### See Also

PetscObjectComposeFunctionDynamic()

Level:advanced
Location:src/sys/objects/inherit.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages