petsc-3.13.6 2020-09-29
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(), PetscObjectBaseTypeCompare(), PetscObjectTypeCompareAny(), PetscObjectBaseTypeCompareAny()

Level

intermediate

Location

src/sys/objects/destroy.c

Examples

src/vec/vec/utils/tagger/tutorials/ex1.c.html
src/vec/is/is/tutorials/ex3.c.html
src/vec/is/is/tutorials/ex3f90.F90.html
src/ksp/ksp/tutorials/ex7.c.html
src/ksp/ksp/tutorials/ex8.c.html
src/ksp/ksp/tutorials/ex27.c.html
src/ksp/ksp/tutorials/ex42.c.html
src/ksp/ksp/tutorials/ex43.c.html
src/ksp/ksp/tutorials/ex62.c.html
src/ksp/ksp/tutorials/ex70.c.html
src/ksp/ksp/tutorials/ex71.c.html

Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages