<html><body><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:10pt"><div><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: verdana,helvetica,sans-serif; background-color: transparent; font-style: normal;"><span>Yes, it sounds crazy when we look exclusively at this. But I do not do this exclusively. <br></span></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: verdana,helvetica,sans-serif; background-color: transparent; font-style: normal;"><span>Basically, this happening [ </span>P1^{-1} P2^{-1} A x = P1^{-1} P2^{-1} b ] occurs as a part of my two-level solver. <br></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: verdana,helvetica,sans-serif; background-color: transparent; font-style: normal;">Any how I have to do this. <br></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family:
verdana,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: verdana,helvetica,sans-serif; background-color: transparent; font-style: normal;">I had a realization, PCCOMPOSITE does not do exactly what I want. I read about PCCOMPOSITE in manual. :( <br></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: verdana,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: verdana,helvetica,sans-serif; background-color: transparent; font-style: normal;">Thanks, <br></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: verdana,helvetica,sans-serif; background-color: transparent; font-style: normal;">Abdul <br></div><br><div><span style="color:rgb(0, 0, 255);"><span style="font-family:verdana, helvetica, sans-serif;"><span
style="font-family:lucida console, sans-serif;"></span></span></span><span style="color:rgb(0, 0, 255);"><span style="font-family:verdana, helvetica, sans-serif;"></span></span></div><div><br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;"> <div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Matthew Knepley <knepley@gmail.com><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;">Sent:</span></b> Friday, 26 October 2012, 18:56<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [petsc-users] Two PCs on same
residual in multiplicative fashion !<br> </font> </div> <br><div id="yiv319040000">On Fri, Oct 26, 2012 at 12:45 PM, Abdul Hanan Sheikh <span dir="ltr"><<a rel="nofollow" ymailto="mailto:hanangul12@yahoo.co.uk" target="_blank" href="mailto:hanangul12@yahoo.co.uk">hanangul12@yahoo.co.uk</a>></span> wrote:<br><div class="yiv319040000gmail_quote"><blockquote class="yiv319040000gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div style="font-size:10pt;font-family:verdana, helvetica, sans-serif;"><div style=""><span>Thank you Matt, your assumption is alright. It was typo. </span></div><br style=""><div style=""><span><span style="font-family:verdana, helvetica, sans-serif;"><span style="font-family:lucida console, sans-serif;"></span></span></span><span style="font-family:verdana, helvetica, sans-serif;"></span></div>
<div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:lucida console, sans-serif;"><span><span style="font-family:verdana, helvetica, sans-serif;">I got this idea , yet if I want to invert P2 exactly by PCLU then how should I do ?? </span></span></div>
</div></div></blockquote><div><br></div><div>Read this: <a rel="nofollow" target="_blank" href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCKSP.html">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCKSP.html</a></div>
<div><br></div><div>This makes things more complicated. You can use PCOMPOSITE with multiplicative, but its not</div><div>exactly what you have written. This is never used because its not really effective, and doesn't make</div>
<div>much sense from a theory perspective. Are you sure you want to do this?</div><div><br></div><div> Matt</div><div><br></div><blockquote class="yiv319040000gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div style="font-size:10pt;font-family:verdana, helvetica, sans-serif;"><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;"><span></span></div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;">
<span>This is indeed, but I avoid to merge(matrix product) for some reasons. </span><br>
<span></span></div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;"><span><br></span></div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;">
<span>Thanks again. <br></span></div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;"><span>Abdul<br></span></div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:lucida console, sans-serif;">
<span style="font-weight:bold;"><br></span><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;margin-top:5px;padding-left:5px;"> <div style="font-family:verdana, helvetica, sans-serif;font-size:10pt;"> <div style="font-family:times new roman, new york, times, serif;font-size:12pt;">
<div dir="ltr"> <font face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Matthew Knepley <<a rel="nofollow" ymailto="mailto:knepley@gmail.com" target="_blank" href="mailto:knepley@gmail.com">knepley@gmail.com</a>><br> <b><span style="font-weight:bold;">To:</span></b> Abdul Hanan Sheikh <<a rel="nofollow" ymailto="mailto:hanangul12@yahoo.co.uk" target="_blank" href="mailto:hanangul12@yahoo.co.uk">hanangul12@yahoo.co.uk</a>>; PETSc users list <<a rel="nofollow" ymailto="mailto:petsc-users@mcs.anl.gov" target="_blank" href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> <br>
<b><span style="font-weight:bold;">Sent:</span></b> Friday, 26 October 2012, 18:22<br> <b><span style="font-weight:bold;">Subject:</span></b> Re: [petsc-users] Two PCs on same residual in multiplicative fashion !<br> </font> </div>
<br><div>On Fri, Oct 26, 2012 at 12:04 PM, Abdul Hanan Sheikh <span dir="ltr"><<a rel="nofollow" ymailto="mailto:hanangul12@yahoo.co.uk" target="_blank" href="mailto:hanangul12@yahoo.co.uk">hanangul12@yahoo.co.uk</a>></span> wrote:<br><div><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div style="font-size:10pt;font-family:verdana, helvetica, sans-serif;"><div><span><br></span></div><div><span>Dear Developers and members, <br></span></div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;">
<br><span></span></div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;"><span>I intend to solve system Ax=b with two preconditioners as follows: <br>
</span></div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;"><br><span></span></div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;">
<span>P1^{-1} P2^{-1} A x =
P^{-1} P^{-1} b</span></div></div></div></blockquote><div><br></div><div>I assume you mean P1^{-1} P2^{-1} A x = P1^{-1} P2^{-1} b</div><div><br><span style="font-weight:bold;"></span><br><br></div><div>With this setup, I think its easiest to use PCKSP with the matrix for</div>
<div>the KSP being P2. That would give you</div><div><br></div><div> P2^{-1} A x = P2^{-1} b</div><div><br></div><div>Now you can precondition that solve with another PCKSP with the matrix</div><div>for that KSP being P1, and get what you want.</div>
<div><span style="font-weight:bold;"></span><br></div><div>This seems like a strange thing since you could just merge those matrices.<span style="font-weight:bold;"></span><br><br></div><div> Matt</div><div> </div><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div style="font-size:10pt;font-family:verdana, helvetica, sans-serif;"><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;"><span></span></div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;">
<span>where P1 and P2 are exclusively available as matrices. <br></span></div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;"><span>This might be crazy to many. <br>
</span></div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;"><br><span></span></div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;">
<span>I
thought to start with PCCOMPOSITE but i do not think it does exactly what I intend. </span></div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;"><br>
<span></span></div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;"><span>Any Idea would be appreciated. <br></span></div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;">
<br><span></span></div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;"><span>A beginner!!! <br></span></div><span><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;">
<span>Abdul<br></span></div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;"><span></span></div><div><span style="font-family:verdana, helvetica, sans-serif;"><span style="font-family:lucida console, sans-serif;"></span></span><span style="font-family:verdana, helvetica, sans-serif;"></span></div>
</span></div></div></blockquote></div><br><br clear="all"><span class="yiv319040000HOEnZb"><font color="#888888"><div><br></div>-- <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>
</font></span></div><span class="yiv319040000HOEnZb"><font color="#888888"><br></font></span></div></div></blockquote></div></div></div></blockquote><div><br></div><div> </div></div><br><br clear="all"><div><br></div>-- <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><br><br> </div> </div> </blockquote></div> </div></body></html>