petsc-3.7.1 2016-05-15
Report Typos and Errors

# PetscObjectQuery

Gets a PETSc object associated with a given object.

### Synopsis

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

Not Collective Many br

### Input Parameters

| obj | - the PETSc object Many brThus must be cast with a (PetscObject), for example, Many brPetscObjectCompose((PetscObject)mat,...); Many br
| name | - name associated with child object Many br
| ptr | - the other PETSc object associated with the PETSc object, this must be Many brcast with (PetscObject*) Many br

Many br

The reference count of neither object is increased in this call Many br

### See Also

PetscObjectCompose()

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

### Examples

src/snes/examples/tutorials/ex48.c.html