firedrakeproject/firedrake — pull request #352 by wence- (2014-07-22 17:38:24+00:00)
Title: Basic multi grid support

This is probably not ready to be merged quite yet. But proposed here for comments and discussion. In particular, what should the interface to using this in building solvers be like? I've sketched a Poisson problem solution in demos/multigrid_sketches/poisson_mg.py.

Building the weak form is a bit icky right now, one has to do it by hand on every level, I guess one could, in the solver, figure out if the pc type is MG and set up the appropriate things there, but that feels a bit fragile, in particular if we want to use a GMG preconditioner for a field split block. Unfortunately, I think I can't get the DMs to provide all this information, but I'll have another go.

I've also sketched out hooking up to FAS (i.e. nonlinear multigrid) as opposed to PCMG, but I think that currently doesn't work properly.

If you want to give the poisson_mg.py demo a go, you'll need the expose-PCMG petsc4py branch from mapdes/petsc4py.git

Still todo:

- Restriction and prolongation for lowest order Hdiv and Hcurl
- Tets
- Prisms
- ...