DMSetOptionsPrefix — PETSc 3.25.4 documentation

Skip to main content
`Ctrl`+`K`

# DMSetOptionsPrefix

Sets the prefix prepended to all option names when searching through the options database

## Synopsis

    #include "petscdm.h"
    #include "petscdmlabel.h"
    #include "petscds.h"
    PetscErrorCode DMSetOptionsPrefix(DM dm, const char prefix[])

Logically Collective

## Input Parameters

- dm - the `DM` context

- prefix - the prefix to prepend

## Note

A hyphen (-) must NOT be given at the beginning of the prefix name. The first character of all runtime options is AUTOMATICALLY the hyphen.

## See Also

DM Basics, `DM`, `PetscObjectSetOptionsPrefix()`, `DMSetFromOptions()`

## Level

advanced

## Location

src/dm/interface/dm.c

## Examples

src/dm/impls/plex/tutorials/ex16.c
src/dm/tutorials/ex19.c
src/ts/tutorials/ex14.c
src/snes/tutorials/ex73f90t.F90
src/snes/tutorials/ex11.c
src/snes/tutorials/ex28.c
src/dm/impls/plex/tutorials/ex15.c
src/snes/tutorials/ex22.c
src/dm/impls/plex/tutorials/ex5.c

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