1: #define PETSC_DLL 3: #include petsc.h 7: /*@C 8: PetscObjectGetName - Gets a string name associated with a PETSc object. 10: Not Collective 12: Input Parameters: 13: + obj - the Petsc variable 14: Thus must be cast with a (PetscObject), for example, 15: PetscObjectGetName((PetscObject)mat,&name); 16: - name - the name associated with obj 18: Level: intermediate 20: Concepts: object name 22: .seealso: PetscObjectSetName() 23: @*/ 24: PetscErrorCode PetscObjectGetName(PetscObject obj,const char *name[]) 25: { 31: if (!obj->name) { PetscObjectName(obj); } 32: *name = obj->name; 33: return(0); 34: }