DMSetLocalSection — PETSc 3.21.4 documentation

Skip to main content
`Ctrl`+`K`

# DMSetLocalSection

Set the `PetscSection` encoding the local data layout for the `DM`.

## Synopsis

    #include "petscdm.h"
    #include "petscdmlabel.h"
    #include "petscds.h"
    PetscErrorCode DMSetLocalSection(DM dm, PetscSection section)

## Input Parameters

- dm - The `DM`

- section - The `PetscSection`

## Note

Any existing Section will be destroyed

## See Also

DM Basics, `DM`, `PetscSection`, `DMGetLocalSection()`, `DMSetGlobalSection()`

## Level

intermediate

## Location

src/dm/interface/dm.c

## Examples

src/ts/tutorials/ex11_sa.c
src/dm/impls/plex/tutorials/ex6.c
src/snes/tutorials/ex7.c
src/dm/impls/plex/tutorials/ex1.c
src/dm/impls/plex/tutorials/ex1f90.F90
src/dm/tutorials/ex21.c
src/ts/tutorials/ex52.c
src/dm/impls/plex/tutorials/ex14.c
src/dm/impls/plex/tutorials/ex7.c
src/dm/tutorials/ex20.c

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