I will also note that a good intro for implementing your own might be the ML PC<div>in Petsc. It puts the ML AMG package into the PCMG framework.</div><div><br></div><div> Matt<br><br><div class="gmail_quote">On Fri, Dec 3, 2010 at 3:44 AM, Dave May <span dir="ltr"><<a href="mailto:dave.mayhem23@gmail.com">dave.mayhem23@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hey Vijay,<br>
PCMG is generic. If you provide the operators for each level, along<br>
with the restriction and prolongation,<br>
you can use PCMG. It doesn't need to know about the mesh.<br>
<br>
You don't actually need to provide the coarse grid operators.<br>
Given the fine grid operator and R and optionally P, you can use<br>
Galerkin coarsening by calling<br>
PCMGSetGalerkin() or via the command line arg -pc_mg_galerkin<br>
Also, if you don't specify the prolongation, petsc will use P = R^T.<br>
<br>
<br>
Cheers,<br>
<font color="#888888"> Dave<br>
</font><div><div></div><div class="h5"><br>
<br>
On 3 December 2010 06:02, Vijay S. Mahadevan <<a href="mailto:vijay.m@gmail.com">vijay.m@gmail.com</a>> wrote:<br>
> Hi all,<br>
><br>
> I was wondering whether the MG preconditioner object is generic enough<br>
> to work out of the box like say ILU or SOR. To elaborate on this, if<br>
> I can provide the number of levels, restriction and prolongation<br>
> operators for each level and the system operators along with vectors<br>
> allocated for solution and rhs, would it work as a preconditioner for<br>
> my given problem and a prescribed rhs at the finest level of PCMG. Or<br>
> does it need some knowledge of the fine and coarser meshes to perform<br>
> the MG operations correctly ?<br>
><br>
> All the examples I've seen using MG in petsc involve the DA and DMMG<br>
> objects and since I use my own mesh and corresponding discretization<br>
> code for an elliptic system, I'm curious about this usage. It would<br>
> not be terribly difficult to write my own framework to do a simple<br>
> V-cycle with my existing framework but since petsc already provides<br>
> this functionality along with different types of MG solves (with<br>
> verified code!), I really want to use it for my system. Any help<br>
> and/or pointers are welcome.<br>
><br>
> Thanks,<br>
> vijay<br>
><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>
</div>