# DMPlexSetAnchors
Set the layout of the local anchor (point-to-point) constraints.  Unlike boundary conditions, when a point's degrees of freedom in a section are constrained to an outside value, the anchor constraints set a point's degrees of freedom to be a linear combination of other points' degrees of freedom. 
## Synopsis
```
#include "petscdmplex.h"   
PetscErrorCode DMPlexSetAnchors(DM dm, PetscSection anchorSection, IS anchorIS)
```
Collective on dm


## Input Parameters

- ***dm -*** The `DMPLEX` object
- ***anchorSection -*** The section that describes the mapping from constrained points to the anchor points listed in anchorIS.
Must have a local communicator (`PETSC_COMM_SELF` or derivative).
- ***anchorIS -*** The list of all anchor points.  Must have a local communicator (`PETSC_COMM_SELF` or derivative).





## Notes
After specifying the layout of constraints with `DMPlexSetAnchors()`, one specifies the constraints by calling
`DMGetDefaultConstraints()` and filling in the entries in the constraint matrix.

The reference counts of anchorSection and anchorIS are incremented.


## See Also
 [](chapter_unstructured), `DM`, `DMPLEX`, `DMPlexGetAnchors()`, `DMGetDefaultConstraints()`, `DMSetDefaultConstraints()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/plex/plex.c.html#DMPlexSetAnchors">src/dm/impls/plex/plex.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/impls/plex/plex.c)


[Index of all DMPlex routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
