PetscTypeCompare

Determines whether a PETSc object is of a particular type.

Synopsis

#include "petsc.h"    
int PetscTypeCompare(PetscObject obj,char *type_name,PetscTruth *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, PetscObjectDestroy((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()

Keywords

comparing types

Examples

src/sles/examples/tutorials/ex19.c
src/snes/examples/tutorials/ex16.c

Level:intermediate
Location:src/sys/src/objects/destroy.c
System Index
Table of Contents