丁老师 <[email protected]> writes:

> thank you very much! could you please tell which examples demonstrate the 
> binary viewer.

http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Viewer/PetscViewerBinaryOpen.html

Or automatic, e.g., src/ksp/ksp/examples/tutorials/ex2.c (or any other
example that solves something)

./ex2 -ksp_view_mat binary:my-file-name -ksp_view_rhs 
binary:my-file-name::append

Then load it up:
$ octave -q
octave:1> [A,b] = PetscBinaryRead('foo');
octave:2> [size(A); size(b)]                                                    
                                                                                
             
ans =

   56   56
   56    1

Reply via email to