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

# PetscObjectGetName

Gets a string name associated with a PETSc object.

### Synopsis

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

Not Collective unless object has not been named yet Many br

### Input Parameters

| obj | - the Petsc variable Many brThus must be cast with a (PetscObject), for example, Many brPetscObjectGetName((PetscObject)mat,&name); Many br
| name | - the name associated with obj Many br

Many br

### See Also

PetscObjectSetName()

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

### Examples

src/dm/examples/tutorials/ex10.c.html
src/snes/examples/tutorials/ex12.c.html