DMAdaptorAdapt#
Creates a new DM that is adapted to the problem
Synopsis#
#include "petscdmadaptor.h"
PetscErrorCode DMAdaptorAdapt(DMAdaptor adaptor, Vec x, DMAdaptationStrategy strategy, DM *adm, Vec *ax)
Not Collective
Input Parameters#
adaptor - The
DMAdaptorobjectx - The global approximate solution
strategy - The adaptation strategy, see
DMAdaptationStrategy
Output Parameters#
adm - The adapted
DMax - The adapted solution
Options Database Keys#
-snes_adapt (initial|sequential|multigrid) - adaption strategy, see
DMAdaptationStrategy-adapt_gradient_view - View the Clement interpolant of the solution gradient
-adapt_hessian_view - View the Clement interpolant of the solution Hessian
-adapt_metric_view - View the metric tensor for adaptive mesh refinement
Note#
When the mesh is adapted, one reference to x and one reference to the DM of the solver are
consumed, matching the use in SNESSolve() grid sequencing where those objects are replaced by
the adapted ones. A caller that keeps using the input objects must take an additional reference
to each of them before calling this function.
See Also#
DM Basics, DMAdaptor, DMAdaptationStrategy, DMAdaptorSetSolver(), DMAdaptorCreate()
Level#
intermediate
Location#
Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages