# PetscObjectGetType

Gets the object type of any PetscObject.

### Synopsis

    #include "petsc.h"
    PetscErrorCode PETSC_DLLEXPORT PetscObjectGetType(PetscObject obj, const char *type[])

Not Collective

### Input Parameter

obj -any PETSc object, for example a Vec, Mat or KSP. Thus must be cast with a (PetscObject), for example, PetscObjectGetType((PetscObject)mat,&type);

### Output Parameter

type -the object type

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