# PetscObjectGetOptions
Gets the options database used by the object that has been set with `PetscObjectSetOptions()` 
## Synopsis
```
#include "petscsys.h"    
PetscErrorCode PetscObjectGetOptions(PetscObject obj, PetscOptions *options)
```
Collective


## Input Parameter

- ***obj -*** any PETSc object, for example a `Vec`, `Mat` or `KSP`.



## Output Parameter

- ***options -*** the options database



## Note
If this is not called the object will use the default options database


## Developer Note
This functionality is not used in PETSc and should, perhaps, be removed




## See Also
 `PetscOptionsCreate()`, `PetscOptionsDestroy()`, `PetscObjectSetOptionsPrefix()`, `PetscObjectAppendOptionsPrefix()`, `PetscObjectPrependOptionsPrefix()`,
`PetscObjectGetOptionsPrefix()`, `PetscObjectSetOptions()`

## Level
advanced

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

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex36.c.html">src/snes/tutorials/ex36.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex53.c.html">src/ts/tutorials/ex53.c.html</A><BR>


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


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