[petsc-users] PETSc turtorial example generating unexpected result

Maahi Talukder maahi.buet at gmail.com
Tue Jan 15 11:35:15 CST 2019


Hi,

Thank you for your reply. Yeah, as you suspected, I printed these numbers
after that statement. Now it gives the expected values.

Regards,
Maahi Talukder

On Mon, Jan 14, 2019 at 9:33 PM Mark Adams <mfadams at lbl.gov> wrote:

> This code puts the error in x:
>
> call VecAXPY(x,neg_one,u,ierr)
>
> I suspect you printed these numbers after this statement.
>
> On Mon, Jan 14, 2019 at 8:10 PM Maahi Talukder via petsc-users <
> petsc-users at mcs.anl.gov> wrote:
>
>> Hello all,
>>
>> I complied and run the example *ex2f.F90* located in  */home/maahi/petsc/src/ksp/ksp/examples/tutorials.
>> *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 -
>>  2.72322e-07
>> 3.81437e-07
>> 1.58922e-07
>> 3.81437e-07
>> 2.38878e-07
>> -6.65645e-07
>> 1.58922e-07
>> -6.65645e-07
>> -2.51219e-07
>>
>> I am wondering what went wrong? Could you please help me with some
>> insight into this?
>>
>> Regards,
>> Maahi Talukder
>> Clarkson University
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190115/5bcadc5c/attachment-0001.html>


More information about the petsc-users mailing list