Date: 2016-07-24T16:47:48+00:00

Actual source code: pgname.c
petsc-3.7.3 2016-07-24
Report Typos and Errors

      2: #include <petsc/private/petscimpl.h>        /*I    "petscsys.h"   I*/

      6: /*@C
      7:    PetscObjectGetName - Gets a string name associated with a PETSc object.

      9:    Not Collective unless object has not been named yet

     11:    Input Parameters:
     12: +  obj - the Petsc variable
     13:          Thus must be cast with a (PetscObject), for example,
     14:          PetscObjectGetName((PetscObject)mat,&name);
     15: -  name - the name associated with obj

     17:    Level: intermediate

     19:    Concepts: object name

     21: .seealso: PetscObjectSetName()
     22: @*/
     23: PetscErrorCode  PetscObjectGetName(PetscObject obj,const char *name[])
     24: {

     30:   PetscObjectName(obj);
     31:   *name = obj->name;
     32:   return(0);
     33: }