I'm trying to modify my code to use the DMMG routines to solve my system
by multi-grid, instead of the usual krylov solver. In my previous code,
I would set up a DA for my finite difference grid, set the matrix
preallocation using MATCreateMPIAIJ, then fill the matrix, etc.

In the code I've modified to use DMMG, here is my sequence of routines
so far:

        call DMMGCreate(...)
        call DACreate3D(....) ! to set the DA on the finest level
        call DMMGSetDM(...)


        call DMMGSETKSP(...)


Questions:

1) I want to set the DA on the finest level and use Galerkin to get
the coarser matrices. So, is the DACreate above the way to do this?

2) How do I set the matrix preallocation here for use in the DMMG routines?
Would I use the same MATCreateMPIAIJ as before, and if so, where do I
put that? In the routine that fills the Jacobian, or in the main program
someplace?


Thanks, Randy

Reply via email to