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 - a PETSc object, for example a
Vec
,Mat
orKSP
. It must be cast with a (PetscObject
), for example,PetscObjectTypeCompare
((PetscObject
)mat);type_name - string containing a type name
Output Parameter#
same -
PETSC_TRUE
if the type ofobj
andtype_name
are the same or bothNULL
, elsePETSC_FALSE
See Also#
PetscObject
, VecGetType()
, KSPGetType()
, PCGetType()
, SNESGetType()
, PetscObjectBaseTypeCompare()
, PetscObjectTypeCompareAny()
, PetscObjectBaseTypeCompareAny()
, PetscObjectObjectTypeCompare()
Level#
intermediate
Location#
Examples#
src/ksp/ksp/tutorials/ex79.c
src/vec/is/is/tutorials/ex3.c
src/ksp/ksp/tutorials/ex77f.F90
src/vec/is/is/tutorials/ex3f90.F90
src/ts/tutorials/ex30.c
src/ts/tutorials/ex9.c
src/ts/tutorials/ex10.c
src/vec/vec/utils/tagger/tutorials/ex1.c
src/ksp/ksp/tutorials/ex77.c
src/ksp/ksp/tutorials/ex72.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages