# PetscObjectQuery

Gets a PETSc object associated with a given object.

### Synopsis

    #include "petsc.h"
    int PetscObjectQuery(PetscObject obj,const char name[],PetscObject *ptr)

Not Collective

### Input Parameters

| obj | - the PETSc object Thus must be cast with a (PetscObject), for example, PetscObjectCompose((PetscObject)mat,...);
| name | - name associated with child object
| ptr | - the other PETSc object associated with the PETSc object, this must also be cast with (PetscObject)

### See Also

PetscObjectQuery()

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