DMAdaptInterpolator#
Adapts a grid interpolator so that it accurately reproduces a set of sample fine-grid vectors
Synopsis#
#include "petscdm.h"
#include "petscdmda.h"
#include "petscdmplex.h"
#include "petscdmswarm.h"
#include "petscksp.h"
PetscErrorCode DMAdaptInterpolator(DM dmc, DM dmf, Mat In, KSP smoother, Mat MF, Mat MC, Mat *InAdapt, void *user)
Collective
Input Parameters#
dmc - the coarse
DMdmf - the fine
DMIn - the input (unadapted) interpolation matrix from
dmctodmfsmoother - a
KSPwhose operator provides the fine-grid matrix used to weight modes by their Rayleigh quotientMF - a dense matrix whose columns are fine-grid sample vectors
MC - a dense matrix whose columns are the corresponding coarse-grid sample vectors (may be
NULL, in which case \(I_n^T M_F\) is used)user - unused application context
Output Parameter#
InAdapt - the adapted interpolation matrix (created inside the routine)
Options Database Key#
-dm_interpolator_adapt_debug flag - print diagnostic information about the least-squares systems solved for each row
Note#
For each row of In a small weighted least-squares problem is solved (using LAPACK GELSS) so that the adapted
interpolation reproduces the fine-grid samples as accurately as possible; see the discussion of adaptive interpolation
in manual/high_level_mg.rst.
See Also#
KSP: Linear System Solvers, DM, Mat, KSP, DMCheckInterpolator(), DMCreateInterpolation(), PCMG
Level#
developer
Location#
src/ksp/ksp/utils/dm/dmproject.c
Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages