# PetscObjectGetName

Gets a string name associated with a PETSc object.

### Synopsis

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

Not Collective

### Input Parameters

| obj | - the Petsc variable Thus must be cast with a (PetscObject), for example, PetscObjectGetName((PetscObject)mat,&name);
| name | - the name associated with obj

### 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