[petsc-users] Wrong answers from KSPSolve

NAN ZHAO zhaonanavril at gmail.com
Tue Nov 6 11:38:49 CST 2012


Dear all,

I tried to solve a 18 by 18 linear system with KSPsolve, the right hand
vector and matrix can be found in the file in the attachment. The right
hand vector has several zeros and the corresponding row in the matrix only
have values in diagonal, I expected zero at this element but got -1 for the
answer. I am using the tutorial code
in  petsc-3.2-p6/src/ksp/ksp/examples/tutorials/ex1.c as an example to
assemble the matrix and vector and to solve the system. I also include the
code in the attachment. I am working on a solution now but have run out of
ideas.

If you have any hint on the potential solution to this problems let me know.

Thanks,
Nan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20121106/b76eaf7b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: J_p64.m
Type: application/octet-stream
Size: 7414 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20121106/b76eaf7b/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: R_p64.m
Type: application/octet-stream
Size: 440 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20121106/b76eaf7b/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ex1.c
Type: text/x-csrc
Size: 13007 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20121106/b76eaf7b/attachment-0001.c>


More information about the petsc-users mailing list