# DMInterpolationSetUp
Compute spatial indices for point location during interpolation 
## Synopsis
```
#include "petscdmplex.h" 
#include "petscsnes.h"   
PetscErrorCode DMInterpolationSetUp(DMInterpolationInfo ctx, DM dm, PetscBool redundantPoints, PetscBool ignoreOutsideDomain)
```
Collective


## Input Parameters

- ***ctx -*** the context
- ***dm  -*** the `DM` for the function space used for interpolation
- ***redundantPoints -*** If `PETSC_TRUE`, all processes are passing in the same array of points. Otherwise, points need to be communicated among processes.
- ***ignoreOutsideDomain -*** If `PETSC_TRUE`, ignore points outside the domain, otherwise return an error





## See Also
 DMInterpolationInfo, `DMInterpolationEvaluate()`, `DMInterpolationAddPoints()`, `DMInterpolationCreate()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/utils/dmplexsnes.c.html#DMInterpolationSetUp">src/snes/utils/dmplexsnes.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex63.c.html">src/snes/tutorials/ex63.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex77.c.html">src/ts/tutorials/ex77.c.html</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/snes/utils/dmplexsnes.c)


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