preonly is the same as Richardson with exactly one application of the 
preconditioner so you can use either one.

   Barry

On Apr 5, 2012, at 2:38 PM, Abdul Hanan Sheikh wrote:

> 
> From: Barry Smith <bsmith at mcs.anl.gov>
> To: Abdul Hanan Sheikh <hanangul12 at yahoo.co.uk> 
> Cc: PETSc users list <petsc-users at mcs.anl.gov>; Jed Brown <jedbrown at 
> mcs.anl.gov> 
> Sent: Thursday, 5 April 2012, 21:32
> Subject: Re: [petsc-users] Implementation of Multilevel preconditioner
> 
> 
> On Apr 5, 2012, at 2:27 PM, Abdul Hanan Sheikh wrote:
> 
> > Thanks for explaining all . 
> > 
> > Purpose is to implement an adapted deflation preconditioner. 
> > Basically, it has nothing to do more with multigrid algorithm. 
> > To have PETSC codes, i was left out to use PCMG framework to implment this. 
> > 
> >  If you truly want this form exactly; then it is 0 iterations of a 
> > pre-smooth and the KSP you set for the coarse mesh is C_c while you set the 
> > M^-1 apply shell to post-smooth KSP.
> > 
> > Does C_c mean recursive action ? if so, then fine! 
> 
>   What do you mean by recursive action? As I outlined it will solve the 
> system represented by A_c (by a direct solver by default but you can change 
> that).
> Got it!  it was A_c !  ok. 
> > 
> > Setting M^-1 preconditioner in ksp_post context with what ksp_type ?  to my 
> > understanding, Richardson ?
> 
>   Yes, or if you only apply once then preonly.
> With Richardson ksp type, will not it apply once ?
> pre only will not lead to my required preconditioner, i guess. I need one 
> Richardson with M^-1 preconditioenr. 
> 
> >  Just need an endorsement this time. 
> > 
> > Thank you!
> > regards, Abdul
> > 
> > 
> > 
> > From: Barry Smith <bsmith at mcs.anl.gov>
> > To: Abdul Hanan Sheikh <hanangul12 at yahoo.co.uk>; PETSc users list 
> > <petsc-users at mcs.anl.gov> 
> > Cc: Jed Brown <jedbrown at mcs.anl.gov> 
> > Sent: Thursday, 5 April 2012, 20:27
> > Subject: Re: [petsc-users] Implementation of Multilevel preconditioner
> > 
> > 
> >    
> > On Apr 5, 2012, at 1:12 PM, Abdul Hanan Sheikh wrote:
> > 
> > > Hi,, 
> > > Thanks for more details!! 
> > > Recursive two level multigrid  (by using PCMG with my desired stuff in 
> > > it, in PCSHELL) is okay. I will do it recursively. 
> > > No Problem with recursion and nested iterations. 
> > > Coming to two level, 
> > > How can I get exactly Prec = C +  M^-1 (I - A*C) in a two level multigrid 
> > > ? 
> > > What should be specific choice of pre_smoother_ksp_context and 
> > > post_smoother_ksp_context 
> > > to get the "Prec" ? 
> > > what operators should be chosen in these two ksp contexts ? 
> > 
> >  If you truly want this form exactly; then it is 0 iterations of a 
> > pre-smooth and the KSP you set for the coarse mesh is C_c while you set the 
> > M^-1  apply shell to post-smooth KSP.
> > 
> >  I see Jed just wrote "This is just -pc_mg_type kaskade (zero pre-smoothing 
> > iterations, one post-smoothing iteration)."  This is also correct and just 
> > a different way of expressing the same thing.
> > 
> > 
> >    Barry
> > 
> > What motivates you to use this form? It is non-standard. Normal multigrid 
> > with a pre-smooth and post-smooth (both M^-1) can be written algebraically 
> > as 
> > 
> > M^-1  + (I - M^-1A)C(I- AM^-1)  which also equals M^-1 + C - CAM^-1 - M^-1A 
> > C + M^-1 A C A M^-1
> > 
> > Note that I don't view writing the operations out this way as particularly 
> > informative (for example witing it as C +  M^-1 (I - A*C)), it conceals the 
> > fact that your algorithm first projects the error onto the coarse grid 
> > space and then projects the new error onto some fine grid space. Normal 
> > multigrid with a pre and post first projects the error onto some fine grid 
> > space, then projects the new error onto the coarse grid space then projects 
> > the newest error onto the fine grid space again.
> >    
> > > 
> > > 
> > > Awiaitng, 
> > > with regards, Abdul
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > From: Jed Brown <jedbrown at mcs.anl.gov>
> > > To: PETSc users list <petsc-users at mcs.anl.gov> 
> > > Cc: Abdul Hanan Sheikh <hanangul12 at yahoo.co.uk> 
> > > Sent: Thursday, 5 April 2012, 17:56
> > > Subject: Re: [petsc-users] Implementation of Multilevel preconditioner
> > > 
> > > On Thu, Apr 5, 2012 at 08:38, Barry Smith <bsmith at mcs.anl.gov> wrote:
> > >    C +  M^-1 (I - A*C)  is exactly a multiplicative Schwarz method with 
> > > two preconditioners. Or in another way to put it it is exactly a two 
> > > level multigrid so you can use PCMG in a straightforward way.
> > > 
> > > It looks to me like he wants to do nested iteration with recursive coarse 
> > > levels rather than just iteration in a smoother.
> > > 
> > > I need the accuracy at first and somehow at second coarse level. 
> > > After these two levels, the number of iterations at each level till 
> > > coarsest is constantly one.  
> > > 
> > > Okay, but one iteration of a preconditioned Krylov method is still two 
> > > preconditioner applications, so the method would still be exponential in 
> > > the number of levels. If Richardson iteration is okay, you can use 
> > > -pc_mg_cycle_type w to do two iterations instead of 1. The code would 
> > > actually work fine with increasing this further, but it looks like you 
> > > would currently have to cheat a bit to get many recursive cycles.
> > > 
> > > PCMGSetCycleType(pc,(PCMGCycleType)5);
> > > 
> > > There is currently no interface for setting a different number of cycles 
> > > on each level, but you could include mgimpl.h and change the 
> > > levels->cycles manually.
> > > 
> > > Note that W cycles are already often considered to be too much work on 
> > > coarse levels to justify in a parallel setting, so it's somewhat unlikely 
> > > that running more coarse level iterations will really be better than a 
> > > more standard multigrid with stronger smoothers.
> > > 
> > > 
> > 
> > 
> > 
> 
> 
> 

Reply via email to