:orphan:
# PetscObjectBaseTypeCompareAny
Determines whether a PETSc object has the base type of any of a list of types. 
## Synopsis
```
#include "petscsys.h"    
PetscErrorCode PetscObjectBaseTypeCompareAny(PetscObject obj, PetscBool *match, const char type_name[], ...)
```
Not Collective


## Input Parameters

- ***obj -*** any PETSc object, for example a `Vec`, `Mat` or `KSP`.
This must be cast with a (`PetscObject`), for example, `PetscObjectBaseTypeCompareAny`((`PetscObject`)mat,...);
- ***type_name -*** array of strings containing type names, pass the empty string "" to terminate the list



## Output Parameter

- ***match -*** `PETSC_TRUE` if the type of `obj` matches any in the list, else `PETSC_FALSE`





## See Also
 `VecGetType()`, `KSPGetType()`, `PCGetType()`, `SNESGetType()`, `PetscObjectTypeCompare()`, `PetscObjectBaseTypeCompare()`, `PetscObjectTypeCompareAny()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/objects/destroy.c.html#PetscObjectBaseTypeCompareAny">src/sys/objects/destroy.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/objects/destroy.c)


[Index of all Sys routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
