Jed and Dave, thanks for the explanation. Now I do understand that the MG PC is generic if I have restriction/prolongation operators for every level. But I do not have the fine grid operator on hand explicitly (only a shell matrix with MatMult) and technically all my coarser grid operators will also be matrix-free. I was originally planning to hand these shell matrices to petsc as the coarse operators but can petsc do this by itself with only access to the fine grid operator ?
Basically my problem is that I cannot afford to create a matrix until the coarsest level and I plan to use HYPRE BoomerAMG on the coarsest level. With this hierarchy, would MatMult enabled shell matrices provide enough leeway to get the optimal performance from MG ? Matt, I will look into the ML framework also. Thanks. Vijay On Fri, Dec 3, 2010 at 11:02 AM, Matthew Knepley <knepley at gmail.com> wrote: > I will also note that a good intro for implementing your own might be the ML > PC > in Petsc. It puts the ML AMG package into the PCMG framework. > ?? Matt > > On Fri, Dec 3, 2010 at 3:44 AM, Dave May <dave.mayhem23 at gmail.com> wrote: >> >> Hey Vijay, >> ?PCMG is generic. If you provide the operators for each level, along >> with the restriction and prolongation, >> you can use PCMG. It doesn't need to know about the mesh. >> >> You don't actually need to provide the coarse grid operators. >> Given the fine grid operator and R and optionally P, you can use >> Galerkin coarsening by calling >> PCMGSetGalerkin() or via the command line arg -pc_mg_galerkin >> Also, if you don't specify the prolongation, petsc will use P = R^T. >> >> >> Cheers, >> ?Dave >> >> >> On 3 December 2010 06:02, Vijay S. Mahadevan <vijay.m at gmail.com> wrote: >> > Hi all, >> > >> > I was wondering whether the MG preconditioner object is generic enough >> > to work out of the box like say ILU or SOR. ?To elaborate on this, if >> > I can provide the number of levels, restriction and prolongation >> > operators for each level and the system operators along with vectors >> > allocated for solution and rhs, would it work as a preconditioner for >> > my given problem and a prescribed rhs at the finest level of PCMG. Or >> > does it need some knowledge of the fine and coarser meshes to perform >> > the MG operations correctly ? >> > >> > All the examples I've seen using MG in petsc involve the DA and DMMG >> > objects and since I use my own mesh and corresponding discretization >> > code for an elliptic system, I'm curious about this usage. It would >> > not be terribly difficult to write my own framework to do a simple >> > V-cycle with my existing framework but since petsc already provides >> > this functionality along with different types of MG solves (with >> > verified code!), I really want to use it for my system. Any help >> > and/or pointers are welcome. >> > >> > Thanks, >> > vijay >> > > > > > -- > What most experimenters take for granted before they begin their experiments > is infinitely more interesting than any results to which their experiments > lead. > -- Norbert Wiener >
