:orphan:
# DMGetOptionsPrefix
Gets the prefix used for searching for all DM options in the options database. 
## Synopsis
```
#include "petscdm.h"          
#include "petscdmlabel.h"     
#include "petscds.h"     
PetscErrorCode DMGetOptionsPrefix(DM dm, const char *prefix[])
```
Not Collective


## Input Parameter

- ***dm -*** the `DM` context



## Output Parameter

- ***prefix -*** pointer to the prefix string used is returned





## Fortran Note
Pass in a string 'prefix' of
sufficient length to hold the prefix.


## See Also
 [](ch_dmbase), `DM`, `DMSetOptionsPrefix()`, `DMAppendOptionsPrefix()`, `DMSetFromOptions()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/interface/dm.c.html#DMGetOptionsPrefix">src/dm/interface/dm.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/interface/dm.c)


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