<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">CG is a better method than GMRES for symmetric positive definite problems. <div><br></div><div>You want to use a better preconditioner. Try '-pc_type gamg -pc_gamg_agg_nsmooths 1'</div><div><br></div><div><br><div><div>On Feb 19, 2013, at 11:36 AM, Marcelo Xavier Guterres <<a href="mailto:m.guterres@gmail.com">m.guterres@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span id="result_box" class="short_text" lang="en">Esteemed colleagues,<br><br><br></span><br>My problem is:<br><br>Div ( Grad ( phi ) ) = 0 <br><br>mesh:<br><br>0 < x < 1;<br>0 < y < 1;<br>
<br>with boundary conditions:<br><br>phi ( x , 0 ) = x;<br>phi ( 0 ,y ) = x;<br>phi ( x , 1 ) = x;<br>phi ( 1 ,y ) = x;<br><br><span id="result_box" class="short_text" lang="en">with serial processing</span>.<br>
<br>
<br><span lang="en">solved</span> with ( KSPCG x PCJACOBI ) and (KSPGMRS x PCJACOBI). <span id="result_box" class="short_text" lang="en"><span class="hps">I</span> <span class="hps">have a question</span><span class="">, </span></span><span id="result_box" class="" lang="en"><span class="hps alt-edited">why the "<i><b>norm error</b></i></span><i><b> </b></i><span class="hps"><i><b>of the solution</b></i>" of</span> <span class="hps">GMRES</span> <span class="hps">is high</span><span class="">, </span></span><span id="result_box" class="" lang="en"><span class="hps">when the mesh</span> <span class="hps">is large.</span></span> <span id="result_box" class="short_text" lang="en"><span class="hps">It is</span> <span class="hps">a problem in</span> <span class="hps">methods or</span> <span class="hps">truncation error</span><span class="">?<br>
<br></span></span><br><span id="result_box" class="short_text" lang="en">the results were:</span><br><br><br>
<style type="text/css">
tt {
font-family: courier;
}
td {
font-family: helvetica, sans-serif;
}
caption {
font-family: helvetica, sans-serif;
font-size: 14pt;
text-align: left;
}
</style>
<table cellpadding="3" cellspacing="0">
<tbody><tr>
<td style="background:#ccffcc;font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="center" bgcolor="#CCFFCC" valign="bottom"><i>m</i></td>
<td style="background:#ccffcc;font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="center" bgcolor="#CCFFCC" valign="bottom"><i>n</i></td>
<td style="background:#ccffcc;font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="center" bgcolor="#CCFFCC" valign="bottom"><i>m x n</i></td>
<td style="background:#ccffcc;font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="center" bgcolor="#CCFFCC" valign="bottom"><i>error ( KSPCG x PCJACOBI )</i></td>
<td colspan="3" style="background:#ccffcc;font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000;border-right:thin solid #000000" align="center" bgcolor="#CCFFCC" valign="bottom"><i>error ( KSPGMRS x PCJACOBI )</i></td>
</tr>
<tr>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">3</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">3</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">9</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">1,92E−16</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000;border-right:thin solid #000000" align="right" valign="bottom">4,42E−16</td>
<td style=""><br></td>
<td style=""><br></td>
</tr>
<tr>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">4</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">4</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">16</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">2,08E−16</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000;border-right:thin solid #000000" align="right" valign="bottom">6,46E−16</td>
<td style=""><br></td>
<td style=""><br></td>
</tr>
<tr>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">5</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">5</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">25</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">4,41E−16</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000;border-right:thin solid #000000" align="right" valign="bottom">9,63E−16</td>
<td style=""><br></td>
<td style=""><br></td>
</tr>
<tr>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">6</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">6</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">36</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">8,77E−16</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000;border-right:thin solid #000000" align="right" valign="bottom">8,26E−16</td>
<td style=""><br></td>
<td style=""><br></td>
</tr>
<tr>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">7</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">7</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">49</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">2,37E−06</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000;border-right:thin solid #000000" align="right" valign="bottom">2,52E−06</td>
<td style=""><br></td>
<td style=""><br></td>
</tr>
<tr>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">8</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">8</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">64</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">1,17E−05</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000;border-right:thin solid #000000" align="right" valign="bottom">1,33E−05</td>
<td style=""><br></td>
<td style=""><br></td>
</tr>
<tr>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">9</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">9</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">81</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">9,32E−06</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000;border-right:thin solid #000000" align="right" valign="bottom">1,26E−05</td>
<td style=""><br></td>
<td style=""><br></td>
</tr>
<tr>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">10</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">10</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">100</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">7,33E−06</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000;border-right:thin solid #000000" align="right" valign="bottom">9,93E−06</td>
<td style=""><br></td>
<td style=""><br></td>
</tr>
<tr>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">20</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">20</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">400</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">4,22E−05</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000;border-right:thin solid #000000" align="right" valign="bottom">3,16E−04</td>
<td style=""><br></td>
<td style=""><br></td>
</tr>
<tr>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">30</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">30</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">900</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">1,06E−04</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000;border-right:thin solid #000000" align="right" valign="bottom">2,37E−02</td>
<td style=""><br></td>
<td style=""><br></td>
</tr>
<tr>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">40</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">40</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">1600</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">2,14E−04</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000;border-right:thin solid #000000" align="right" valign="bottom">3,77E−02</td>
<td style=""><br></td>
<td style=""><br></td>
</tr>
<tr>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">50</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">50</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">2500</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">3,37E−04</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000;border-right:thin solid #000000" align="right" valign="bottom">9,36E−03</td>
<td style=""><br></td>
<td style=""><br></td>
</tr>
<tr>
<td style="background:#ccffcc;font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" bgcolor="#CCFFCC" valign="bottom">100</td>
<td style="background:#ccffcc;font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" bgcolor="#CCFFCC" valign="bottom">100</td>
<td style="background:#ccffcc;font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" bgcolor="#CCFFCC" valign="bottom">10000</td>
<td style="background:#ccffcc;font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" bgcolor="#CCFFCC" valign="bottom">1,27E−03</td>
<td style="background:#ccffcc;font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000;border-right:thin solid #000000" align="right" bgcolor="#CCFFCC" valign="bottom">6,53E−02</td>
<td style=""><br></td>
<td style=""><br></td>
</tr>
<tr>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">200</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">200</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">40000</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">4,32E−03</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000;border-right:thin solid #000000" align="right" valign="bottom">3,67E−01</td>
<td style=""><br></td>
<td style=""><br></td>
</tr>
<tr>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">300</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">300</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">90000</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">9,53E−02</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000;border-right:thin solid #000000" align="right" valign="bottom">1,02E+00</td>
<td style=""><br></td>
<td style=""><br></td>
</tr>
<tr>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">400</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">400</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">160000</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">1,68E−02</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-left:thin solid #000000;border-right:thin solid #000000" align="right" valign="bottom">2,10E+00</td>
<td style=""><br></td>
<td style=""><br></td>
</tr>
<tr>
<td style="font-size:10pt;border-top:thin solid #000000;border-bottom:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">500</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-bottom:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">500</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-bottom:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">250000</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-bottom:thin solid #000000;border-left:thin solid #000000" align="right" valign="bottom">2,61E−02</td>
<td style="font-size:10pt;border-top:thin solid #000000;border-bottom:thin solid #000000;border-left:thin solid #000000;border-right:thin solid #000000" align="right" valign="bottom">3,66E+00</td>
<td style=""><br></td>
<td style=""><br></td>
</tr>
</tbody></table>
<br><span id="result_box" class="short_text" lang="en"><span class="hps">how can I</span> <span class="hps">improve the performance of</span> <span class="hps">GMRES</span><span class="">?<br><br></span></span><br><span id="result_box" class="short_text" lang="en"><span class="hps">a good week</span> <span class="hps">for all.</span></span><br>
<br><br>-- <br>Ph.d student Marcelo Xavier Guterres<br>Rio de Janeiro , Brazil.<br>
</blockquote></div><br></div></body></html>