[petsc-users] multigrid preconditioning and adaptivity

Lukasz Kaczmarczyk Lukasz.Kaczmarczyk at glasgow.ac.uk
Mon Mar 7 08:16:21 CST 2016


On 7 Mar 2016, at 13:50, Matthew Knepley <knepley at gmail.com<mailto:knepley at gmail.com>> wrote:

On Mon, Mar 7, 2016 at 6:58 AM, Lukasz Kaczmarczyk <Lukasz.Kaczmarczyk at glasgow.ac.uk<mailto:Lukasz.Kaczmarczyk at glasgow.ac.uk>> wrote:
Hello,

I run multi-grid solver, with adaptivity, works well, however It is some space for improving efficiency. I using hierarchical approximation basis, for which
construction of interpolation operators is simple, it is simple injection.

After each refinement level (increase of order of approximation on some element) I rebuild multigrid pre-conditioner with additional level. It is a way to add dynamically new levels without need of rebuilding whole MG pre-conditioner.

That does not currently exist, however it would not be hard to add, since the MG structure jsut consists of
arrays of pointers.

Looking at execution profile I noticed that 50%-60% of time is spent on MatPtAP function during PCSetUP stage.

Which means you are using a Galerkin projection to define the coarse operator. Do you have a direct way of defining
this operator (rediscretization)?

Matt,


Thanks for swift response. You are right, I using Galerkin projection.

Yes, I have a way to get directly coarse operator, it is some sub matrix of whole matrix. I taking advantage here form hierarchical approximation.

I could reimplement PCSetUp_MG to set the MG structure directly, but this probably not good approach, since my implementation which will work with current petsc version could be incompatible which  future changes in native MG data structures. The alternative option is to hack MatPtAP itself, and until petsc MG will use this, whatever changes you will make in MG in the future my code will work.

PS.
Current, not efficient enough implementation is here,
http://userweb.eng.gla.ac.uk/lukasz.kaczmarczyk/MoFem/html/_p_c_m_g_set_up_via_approx_orders_8cpp_source.html

Kind regards,
Lukasz

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160307/d83d62d3/attachment.html>


More information about the petsc-users mailing list