<div dir="ltr">Hi,<div><br></div><div>Thank you for your reply. Yeah, as you suspected, I printed these numbers after that statement. Now it gives the expected values. </div><div><br></div><div>Regards,</div><div>Maahi Talukder </div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jan 14, 2019 at 9:33 PM Mark Adams <<a href="mailto:mfadams@lbl.gov">mfadams@lbl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">This code puts the error in x:<div><br></div><div>call VecAXPY(x,neg_one,u,ierr)<br></div><div><br></div><div>I suspect you printed these numbers after this statement.</div></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jan 14, 2019 at 8:10 PM Maahi Talukder via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hello all, <div><br></div><div>I complied and run the example <b><i>ex2f.F90</i></b> located in <b style="font-style:italic">/home/maahi/petsc/src/ksp/ksp/examples/tutorials. </b>As in the code the right hand side vector, b, was computed assuming an exact solution of a vector with all elements of 1.0, all the values of vector 'x' should have been 1.0. But after running the code as it was provided, the values of vector x that I get are the followings - </div><div> 2.72322e-07</div><div>3.81437e-07</div><div>1.58922e-07</div><div>3.81437e-07</div><div>2.38878e-07</div><div>-6.65645e-07</div><div>1.58922e-07</div><div>-6.65645e-07</div><div>-2.51219e-07</div><div><br></div><div>I am wondering what went wrong? Could you please help me with some insight into this?</div><div><br></div><div>Regards,</div><div>Maahi Talukder </div><div>Clarkson University </div></div></div></div></div>
</blockquote></div>
</blockquote></div>