petsc-3.5.4 2015-05-23
Report Typos and Errors

PetscObjectTypeCompare

Determines whether a PETSc object is of a particular type.

Synopsis

#include "petscsys.h"    
PetscErrorCode  PetscObjectTypeCompare(PetscObject obj,const char type_name[],PetscBool  *same)
Not Collective

Input Parameters

obj - any PETSc object, for example a Vec, Mat or KSP. This must be cast with a (PetscObject), for example, PetscObjectTypeCompare((PetscObject)mat);
type_name - string containing a type name

Output Parameter

same -PETSC_TRUE if they are the same, else PETSC_FALSE

See Also

VecGetType(), KSPGetType(), PCGetType(), SNESGetType()

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

Examples

src/vec/is/is/examples/tutorials/ex3.c.html
src/vec/is/is/examples/tutorials/ex3f90.F.html
src/ksp/ksp/examples/tutorials/ex7.c.html
src/ksp/ksp/examples/tutorials/ex8.c.html
src/ksp/ksp/examples/tutorials/ex8g.c.html
src/ksp/ksp/examples/tutorials/ex42.c.html
src/ts/examples/tutorials/ex9.c.html
src/ts/examples/tutorials/ex10.c.html