DMGetDS — PETSc 3.25.1 documentation

Skip to main content
`Ctrl`+`K`

# DMGetDS

Get the default `PetscDS`

## Synopsis

    #include "petscdm.h"
    #include "petscdmlabel.h"
    #include "petscds.h"
    PetscErrorCode DMGetDS(DM dm, PetscDS *ds)

Not Collective

## Input Parameter

- dm - The `DM`

## Output Parameter

- ds - The default `PetscDS`

## Note

The `ds` is owned by the `dm` and should not be destroyed directly.

## See Also

DM Basics, `DM`, `DMGetCellDS()`, `DMGetRegionDS()`

## Level

intermediate

## Location

src/dm/interface/dm.c

## Examples

src/snes/tutorials/ex27.c
src/snes/tutorials/ex64.c
src/snes/tutorials/ex17.c
src/snes/tutorials/ex26.c
src/snes/tutorials/ex13.c
src/snes/tutorials/ex11.c
src/snes/tutorials/ex24.c
src/dm/impls/plex/tutorials/ex4f90.F90
src/snes/tutorials/ex12.c
src/snes/tutorials/ex20.c

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