Checking my assumptions on the use of DMMG in SNES ex19.c
aja2111 at columbia.edu
Sat Mar 8 16:01:17 CST 2008
I'm preparing a multigrid lecture for Tuesday that will be motivated
by a demonstration of PETSc using Multigrid to solve the thermally and
lid-driven cavity flow problem using the DMMG solver framework.
Since only about 20-30 minutes of time will be spent to describing
this, I want to make sure my descriptions are both succinct and
I'd like to describe how DMMG allows a user to rapidly solve (some)
non-linear problems using multigrid if she's willing to use finite
differencing to automatically generate her Jacobian matrix at each
Is the following statement correct? If not, how would you fix it,
particularly in terms of describing the techniques used in ex19.c
"To use DMMG to solve a given non-linear PDE using multigrid and
finite-differencing to automatically generate the Jacobian operator,
the user is responsible for specifying the coarsest grid that the
problem will be solved on as well as the number of levels of multigrid
which will be applied, with the resolution doubling for each level of
For example, to solve a non-linear problem on a 2-D grid with a
fine-grid resolution of 256x256 and 3 levels of multigrid, the user
creates a DMMG object with 3 levels, then calls DMMGSetDM with a DA
object of resolution 64x64.
The user is also responsible for providing SNESLocal, a programmatic
function that evalutes the mathematical function F(u) locally using
field values from the stencil specified in the DMMG creation routine.
When DMMGSolve is called, PETSc will use its default non-linear solver
to attempt to solve F(u) = 0.
More information about the petsc-users