On Fri, Oct 26, 2012 at 12:45 PM, Abdul Hanan Sheikh <span dir="ltr"><<a href="mailto:hanangul12@yahoo.co.uk" target="_blank">hanangul12@yahoo.co.uk</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_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 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="gmail_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 href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>><br> <b><span style="font-weight:bold">To:</span></b> Abdul Hanan Sheikh <<a href="mailto:hanangul12@yahoo.co.uk" target="_blank">hanangul12@yahoo.co.uk</a>>; PETSc users list <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">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" href="mailto:hanangul12@yahoo.co.uk" target="_blank">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="HOEnZb"><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="HOEnZb"><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>