Skip to main content
`Ctrl`+`K`

# DMGetOutputDM

Retrieve the `DM` associated with the layout for output

## Synopsis

    #include "petscdm.h"
    #include "petscdmlabel.h"
    #include "petscds.h"
    PetscErrorCode DMGetOutputDM(DM dm, DM *odm)

Collective

## Input Parameter

- dm - The original `DM`

## Output Parameter

- odm - The `DM` which provides the layout for output

## Note

In some situations the vector obtained with `DMCreateGlobalVector()` excludes points for degrees of freedom that are associated with fixed (Dirichelet) boundary conditions since the algebraic solver does not solve for those variables. The output `DM` includes these excluded points and its global vector contains the locations for those dof so that they can be output to a file or other viewer along with the unconstrained dof.

## See Also

DM Basics, `DM`, `VecView()`, `DMGetGlobalSection()`, `DMCreateGlobalVector()`, `PetscSectionHasConstraints()`, `DMSetGlobalSection()`

## Level

intermediate

## Location

src/dm/interface/dm.c

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