[petsc-users] How to dump the nonzero entries of matrix into a file?

hxie at umn.edu hxie at umn.edu
Wed Dec 30 11:50:07 CST 2009


Hi,

I am trying to dump the nonzero entries of matrix into a file. I did the 
following:
-----
       call 
PetscViewerBinaryOpen(PETSC_COMM_WORLD,"matrix.dat",FILE_MODE_WRITE,viewer,pterr)
        call MatView(ptMat,viewer,pterr)
-----

Is that correct? The file has a very large size.

Bests,
Hui


More information about the petsc-users mailing list