PetscObjectBaseTypeCompare — PETSc 3.25.4 documentation

Skip to main content
`Ctrl`+`K`

# PetscObjectBaseTypeCompare

Determines whether a `PetscObject` is of a given base type. For example the base type of `MATSEQAIJPERM` is `MATSEQAIJ`

## Synopsis

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

Not Collective

## Input Parameters

- obj - the object

- type_name - string containing a type name

## Output Parameter

- same - `PETSC_TRUE` if the object is of the same base type identified by `type_name` or both `NULL`, `PETSC_FALSE` otherwise

## See Also

`PetscObject`, `PetscObjectTypeCompare()`, `PetscObjectTypeCompareAny()`, `PetscObjectBaseTypeCompareAny()`

## Level

intermediate

## Location

src/sys/objects/destroy.c

## Examples

src/mat/tutorials/ex18.c
src/ksp/ksp/tutorials/ex19.c

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