DMInterpolateSolution#
Interpolates a solution from a coarse mesh to a fine mesh.
Synopsis#
#include "petscdm.h"          
#include "petscdmlabel.h"     
#include "petscds.h"     
PetscErrorCode DMInterpolateSolution(DM coarse, DM fine, Mat interp, Vec coarseSol, Vec fineSol)
Collective
Input Parameters#
- coarse - coarse - DM
- fine - fine - DM
- interp - (optional) the matrix computed by - DMCreateInterpolation(). Implementations may not need this, but if it is available it can avoid some recomputation. If it is provided,- MatInterpolate()will be used if the coarse- DMdoes not have a specialized implementation.
- coarseSol - solution on the coarse mesh 
Output Parameter#
- fineSol - the interpolation of coarseSol to the fine mesh 
Note#
This function exists because the interpolation of a solution vector between meshes is not always a linear map. For example, if a boundary value problem has an inhomogeneous Dirichlet boundary condition that is compressed out of the solution vector. Or if interpolation is inherently a nonlinear operation, such as a method using slope-limiting reconstruction.
Developer Note#
This doesn’t just interpolate “solutions” so its API name is questionable.
See Also#
Level#
developer
Location#
Implementations#
DMInterpolateSolution_Plex() in src/dm/impls/plex/plex.c
Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages