DMCheckInterpolator#

Check that an interpolation matrix 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 DMCheckInterpolator(DM dmf, Mat In, Mat MC, Mat MF, PetscReal tol)

Collective

Input Parameters#

  • dmf - the fine DM

  • In - the interpolation matrix from a coarse DM to dmf

  • MC - a dense matrix whose columns are coarse-grid sample vectors

  • MF - a dense matrix whose columns are the corresponding fine-grid sample vectors

  • tol - tolerance on the maximum 2-norm of \(v_f - I v_c\) across all sample vectors

Options Database Key#

  • -dm_interpolator_adapt_error view - view the coarse, fine, and error vectors for each sample

Note#

For each column k, the residual \(v_f^k - I v_c^k\) is computed and its infinity and 2 norms are printed. An error is raised if the maximum 2-norm exceeds tol. Typically used with DMAdaptInterpolator() to validate the adapted operator.

See Also#

KSP: Linear System Solvers, DM, Mat, DMAdaptInterpolator(), 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