The MatMatSolve mystery

Nicolas Tardieu niko.karin at gmail.com
Wed Sep 10 15:39:14 CDT 2008


Dear PETSc users,

The attached file is a naive test of MatMatSolve : I create a matrix,say A,
I duplicate it, say BB, and I would like to compute A^{-1}*BB.
Since A is the identity matrix, I would like to get the identity matrix. But
I don't!
Here is what I obtain by doing "./niko1f -n 3" :

===========================================================================
 A before MatMatSolve
row 0: (0, 1)
row 1: (1, 1)
row 2: (2, 1)
 BB before MatMatSolve
row 0: (0, 1)
row 1: (1, 1)
row 2: (2, 1)
 XX before MatMatSolve
0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
 XX after MatMatSolve
1.0000000000000000e+00 1.9966503766457982e-314 7.9050503334599447e-323
1.0000000000000000e+00 0.0000000000000000e+00 6.4996731077266291e-311
1.0000000000000000e+00 2.6136072665001942e-321 9.6616869034104132e-317
===========================================================================


Can you tell me what I am doing wrong?

Thanks,

Nicolas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20080910/03753036/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: niko1f.F
Type: text/x-fortran
Size: 3753 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20080910/03753036/attachment.bin>


More information about the petsc-users mailing list