what's the difference between PetscViewerASCIIOpen() and PetscViewerBinaryOpen()?

Barry Smith bsmith at mcs.anl.gov
Tue Feb 12 14:29:49 CST 2008


   It is important to remember what the PETSc users manual
says

"PETSc graphics library is not intended to compete with
high-quality graphics packages.  Instead, it is intended to be
easy to use interactively with PETSc programs. We urge users
to generate their publication-quality graphics using a
professional graphics package."

   We are not graphics experts, nor do we want to be, or could be.

    Barry




On Feb 12, 2008, at 2:23 PM, Satish Balay wrote:

> On Tue, 12 Feb 2008, Yujie wrote:
>
>> On 1/23/08, Matthew Knepley <knepley at gmail.com> wrote:
>
>>>> In addition, do you have any better methods to save the sparsity
>>>> structure picture of the matrix? Now, I use "-mat_view_draw" to
>>>> do this. However, the speed is very slow and the picture is
>>>> small. I want to get a big picture and directly save it to the
>>>> disk?  could you give me some advice? thanks a lot.
>
>>> We do not have a better way to make the sparsity picture. I assume
>>> you could write something that decides how many pixels to use,
>>> calculates an average occupancy per pixel, and writes a BMP or
>>> something.
>
> Couple of notes on this.
>
> - -mat_view_draw can be slow for parallel runs [because all the data
>  is moved to proc-0, from where its displayed]. If you wish to speed
>  up, you can either:
>  * run it sequentially [depending upon your code, the matrix generated
>  could be different - so its not suitable]
>  * do a binary dump [with MatView() on a binary viewer] - and
>  then reload this matrix with a sequential code and then do mat_view
>  [check mat/examples/tests/ex33.c,ex43.c]
>
> - you can use the option '-draw_pause -1' to make the window not
>  disappear. Now you can zoom-in & zoom-out [with mouse-left or
>  mouse-right click]
>
> - Take the snapshot of this window with xv or gnome-screenshot or
> other screen-dump tool [ like 'xwd | xpr -device ps > dump.ps']
>
> - Alternatively you can dump the matrix is matlab format - and use
> Matlab visualization tools.
>
> Satish
>
>




More information about the petsc-users mailing list