petsc-3.10.5 2019-03-28
Report Typos and Errors

DMCreateInterpolation

Gets interpolation matrix between two DM objects

Synopsis

#include "petscdm.h"          
#include "petscdmlabel.h"     
#include "petscds.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(), DMCreateRestriction()

Level

developer

Location

src/dm/interface/dm.c

Examples

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

Implementations

DMCreateInterpolation_Composite in src/dm/impls/composite/pack.c
DMCreateInterpolation_DA_1D_Q1 in src/dm/impls/da/dainterp.c
DMCreateInterpolation_DA_1D_Q0 in src/dm/impls/da/dainterp.c
DMCreateInterpolation_DA_2D_Q1 in src/dm/impls/da/dainterp.c
DMCreateInterpolation_DA_2D_Q0 in src/dm/impls/da/dainterp.c
DMCreateInterpolation_DA_3D_Q0 in src/dm/impls/da/dainterp.c
DMCreateInterpolation_DA_3D_Q1 in src/dm/impls/da/dainterp.c
DMCreateInterpolation_DA in src/dm/impls/da/dainterp.c
DMCreateInterpolation_pforest in src/dm/impls/forest/p4est/pforest.c
DMCreateInterpolation_Moab in src/dm/impls/moab/dmmbmg.cxx
DMCreateInterpolation_Plex in src/dm/impls/plex/plex.c
DMCreateInterpolation_Redundant in src/dm/impls/redundant/dmredundant.c
DMCreateInterpolation_SNESVI in src/snes/impls/vi/rs/virs.c

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