#include "petscdm.h" #include "petscdmlabel.h" #include "petscds.h" PetscErrorCode DMInterpolateSolution(DM coarse, DM fine, Mat interp, Vec coarseSol, Vec fineSol)Collective on DM
|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 DM does not have a specialized implementation.|
|coarseSol||- solution on the coarse mesh|
|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.