<html><body><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:10pt"><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><span>Thanks for explaining all . </span></div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><span><br></span></div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><span>Purpose is to implement an adapted deflation preconditioner. </span></div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><span>Basically, it has nothing to do more with multigrid algorithm. </span></div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; ">To have PETSC codes, i was left out to use PCMG framework to implment this. </div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><br></div><div><div><font size="2" style="font-weight:
bold;"> 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.</font></div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; ">Does C_c mean recursive action ? if so, then fine! </div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; ">Setting M^-1 preconditioner in ksp_post context with what ksp_type ? to my understanding, Richardson ?</div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "> Just need an endorsement this time. </div></div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="font-family: verdana,
helvetica, sans-serif; font-size: 10pt; ">Thank you!</div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; ">regards, Abdul</div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><span><br></span></div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;"> <div style="font-size: 10pt; font-family: verdana, helvetica, sans-serif; "> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Barry Smith <bsmith@mcs.anl.gov><br> <b><span
style="font-weight: bold;">To:</span></b> Abdul Hanan Sheikh <hanangul12@yahoo.co.uk>; PETSc users list <petsc-users@mcs.anl.gov> <br><b><span style="font-weight: bold;">Cc:</span></b> Jed Brown <jedbrown@mcs.anl.gov> <br> <b><span style="font-weight: bold;">Sent:</span></b> Thursday, 5 April 2012, 20:27<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [petsc-users] Implementation of Multilevel preconditioner<br> </font> </div> <br><br> <br>On Apr 5, 2012, at 1:12 PM, Abdul Hanan Sheikh wrote:<br><br>> Hi,, <br>> Thanks for more details!! <br>> Recursive two level multigrid (by using PCMG with my desired stuff in it, in PCSHELL) is okay. I will do it recursively. <br>> No Problem with recursion and nested iterations. <br>> Coming to two level, <br>> How can I get exactly Prec = C + M^-1 (I - A*C) in a two level multigrid ? <br>> What should be specific choice of
pre_smoother_ksp_context and post_smoother_ksp_context <br>> to get the "Prec" ? <br>> what operators should be chosen in these two ksp contexts ? <br><br> 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.<br><br> 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.<br><br><br> Barry<br><br>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 <br><br>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<br><br>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.<br> <br>> <br>> <br>> Awiaitng, <br>> with regards, Abdul<br>> <br>> <br>> <br>> <br>> <br>> <br>> <br>> <br>> From: Jed Brown <<a ymailto="mailto:jedbrown@mcs.anl.gov" href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a>><br>> To: PETSc users list <<a ymailto="mailto:petsc-users@mcs.anl.gov" href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> <br>> Cc: Abdul Hanan Sheikh <<a ymailto="mailto:hanangul12@yahoo.co.uk"
href="mailto:hanangul12@yahoo.co.uk">hanangul12@yahoo.co.uk</a>> <br>> Sent: Thursday, 5 April 2012, 17:56<br>> Subject: Re: [petsc-users] Implementation of Multilevel preconditioner<br>> <br>> On Thu, Apr 5, 2012 at 08:38, Barry Smith <<a ymailto="mailto:bsmith@mcs.anl.gov" href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>> wrote:<br>> 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.<br>> <br>> It looks to me like he wants to do nested iteration with recursive coarse levels rather than just iteration in a smoother.<br>> <br>> I need the accuracy at first and somehow at second coarse level. <br>> After these two levels, the number of iterations at each level till coarsest is constantly one. <br>> <br>> 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.<br>> <br>> PCMGSetCycleType(pc,(PCMGCycleType)5);<br>> <br>> 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.<br>> <br>> 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.<br>> <br>> <br><br><br><br> </div> </div>
</blockquote></div> </div></body></html>