<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:99.25pt 85.05pt 85.05pt 85.05pt;}
div.WordSection1
        {page:WordSection1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=WordSection1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>The default solver is GMRES, which can solve indefinite systems.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>================================<br>
 Keita Teranishi<br>
 Scientific Library Group<br>
 Cray, Inc.<br>
 keita@cray.com<br>
================================</span><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
petsc-dev-bounces@mcs.anl.gov [mailto:petsc-dev-bounces@mcs.anl.gov] <b>On
Behalf Of </b>Anush Krishnan<br>
<b>Sent:</b> Thursday, August 26, 2010 12:08 PM<br>
<b>To:</b> petsc-dev@mcs.anl.gov<br>
<b>Subject:</b> Re: [petsc-dev] Problem with conjugate gradient solver<o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<div>

<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;
margin-left:4.8pt;margin-right:0in'>

<p class=MsoNormal>Message: 2<br>
Date: Tue, 24 Aug 2010 10:56:53 -0500<br>
From: Barry Smith <<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>><br>
Subject: Re: [petsc-dev] Problem with conjugate gradient solver<br>
To: For users of the development version of PETSc<br>
       <<a href="mailto:petsc-dev@mcs.anl.gov">petsc-dev@mcs.anl.gov</a>>,
       Victor Eijkhout <<a
href="mailto:eijkhout@tacc.utexas.edu">eijkhout@tacc.utexas.edu</a>><br>
Message-ID: <<a
href="mailto:A4C6A1ED-CDE7-4653-8046-C2797AD5AF31@mcs.anl.gov">A4C6A1ED-CDE7-4653-8046-C2797AD5AF31@mcs.anl.gov</a>><br>
Content-Type: text/plain; charset="us-ascii"<br>
<br>
<br>
  Well you are doing nothing wrong. When I run the code I get the same
results as you. I dump the matrix into Matlab and it has a negative eigenvalue
so the example is wrong. The code is handling it correctly.<br>
<br>
>> eig(full(Mat_0))<br>
<br>
ans =<br>
<br>
  -0.8042<br>
   0.1716<br>
   0.6489<br>
   1.0000<br>
   1.0000<br>
   1.0000<br>
   1.0000<o:p></o:p></p>

</blockquote>

<div>

<p class=MsoNormal><br>
So are you saying that trying to solve the system of equations in the example
will always result in divergence? I tried the same program with a different
system that I know has a solution, and even that diverges. I get a proper
solution if I use the default KSP solver.<br>
<br>
Anush<br>
 <o:p></o:p></p>

</div>

<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;
margin-left:4.8pt;margin-right:0in'>

<p class=MsoNormal><br>
  I am cc:iing Victor who supposedly wrote the original example.  <o:p></o:p></p>

</blockquote>

<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;
margin-left:4.8pt;margin-right:0in'>

<p class=MsoNormal><br>
  Barry<br>
<br>
Attached is the matrix saved with -mat_view_matlab<o:p></o:p></p>

</blockquote>

</div>

</div>

</body>

</html>