petsc-3.6.2 2015-10-02
Report Typos and Errors

# DMCreateInterpolation

Gets interpolation matrix between two DMDA or DMComposite objects

### Synopsis

    #include "petscdm.h"
    PetscErrorCode  DMCreateInterpolation(DM dm1,DM dm2,Mat *mat,Vec *vec)

Collective on DM

### Input Parameter

| dm1 | - the DM object
| dm2 | - the second, finer DM object

### Output Parameter

| mat | - the interpolation
| vec | - the scaling (optional)

Notes: For DMDA objects this only works for "uniform refinement", that is the refined mesh was obtained DMRefine() or the coarse mesh was obtained by DMCoarsen(). The coordinates set into the DMDA are completely ignored in computing the interpolation.

For DMDA objects you can use this interpolation (more precisely the interpolation from the DMGetCoordinateDM()) to interpolate the mesh coordinate vectors EXCEPT in the periodic case where it does not make sense since the coordinate vectors are not periodic.

### See Also

DMDestroy(), DMView(), DMCreateGlobalVector(), DMCreateColoring(), DMCreateMatrix(), DMRefine(), DMCoarsen()

Level:developer
Location: src/dm/interface/dm.c
Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/dm/examples/tutorials/ex3.c.html
src/dm/examples/tutorials/ex65dm.c.html
src/ksp/ksp/examples/tutorials/ex42.c.html
src/snes/examples/tutorials/ex48.c.html