Skip to main content
`Ctrl`+`K`

# DMPlexSectionView

Saves a section associated with a `DMPLEX`

## Synopsis

    #include "petscdmplex.h"
    PetscErrorCode DMPlexSectionView(DM dm, PetscViewer viewer, DM sectiondm)

Collective

## Input Parameters

- dm - The `DM` that contains the topology on which the section to be saved is defined

- viewer - The `PetscViewer` for saving

- sectiondm - The `DM` that contains the section to be saved, can be `NULL`

## Notes

This function is a wrapper around `PetscSectionView()`; in addition to the raw section, it saves information that associates the section points to the topology (`dm`) points. When the topology (`dm`) and the section are later loaded with `DMPlexTopologyLoad()` and `DMPlexSectionLoad()`, respectively, this information is used to match section points with topology points.

In general `dm` and `sectiondm` are two different objects, the former carrying the topology and the latter carrying the section, and have been given a topology name and a section name, respectively, with `PetscObjectSetName()`. In practice, however, they can be the same object (or in case `sectiondm` is `NULL`) if it carries both topology and section; in that case the name of the object is used as both the topology name and the section name.

## See Also

DMPlex: Unstructured Grids, `DM`, `DMPLEX`, `DMView()`, `DMPlexTopologyView()`, `DMPlexCoordinatesView()`, `DMPlexLabelsView()`, `DMPlexGlobalVectorView()`, `DMPlexLocalVectorView()`, `PetscSectionView()`, `DMPlexSectionLoad()`, `PetscViewer`

## Level

advanced

## Location

src/dm/impls/plex/plex.c

## Examples

src/ts/tutorials/ex30.c

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