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

Matthew Knepley knepley at gmail.com
Wed Dec 30 11:52:42 CST 2009


Yes.

On Wed, Dec 30, 2009 at 11:50 AM, <hxie at umn.edu> wrote:

> 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
>



-- 
What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20091230/5b48b6ed/attachment.htm>


More information about the petsc-users mailing list