[petsc-users] Save matrix view to postscript?

Barry Smith bsmith at mcs.anl.gov
Tue Jul 31 18:20:17 CDT 2012


On Jul 31, 2012, at 6:13 PM, "Ronald M. Caplan" <caplanr at predsci.com> wrote:

> Thanks!
> 
> I can't seem to get it to work though.  
> When I configure --with-afterimage it says that I need to download it.  When I use --download-afterimage it says:
> "External package afterimage does not support --download-afterimage"

http://www.afterstep.org/afterimage/getcode.php

Also I forgot to mention you need to install  http://ffmpeg.org/download.html

both of these are "./configure ; make; make install" packages and should install quickly and cleanly. Good luck otherwise.

> 
> I am using a MAC with OS X.   Where can I download afterimage?
> 
> Also, in general, if I want to add a configure to petsc with ./configure, do I have to run ./configure with ALL my options, or just with the new ones I want to add/change?  Will it save my previous configure?

python   ${PETSC_ARCH}/conf/reconfigure-${PETSC_ARCH}.py --with-afterimage

   It will use the old options plus anything new you add. It will only rebuild libraries that it has to rebuild.

   Barry


> 
>  Thanks again for your rapid responses!
> 
>  - Ron C
> 
> On Tue, Jul 31, 2012 at 3:23 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
> 
>   Sorry the postscript never really worked and then the world went PDF.
> 
>   You can do what you want in PETSc 3.3 with
> 
>     ierr = PetscOptionsBool("-draw_save_movie","Make a movie from the images saved","PetscDrawSetSave",movie,&movie,PETSC_NULL);CHKERRQ(ierr);
>     ierr = PetscOptionsString("-draw_save","Save graphics to file","PetscDrawSetSave",filename,filename,PETSC_MAX_PATH_LEN,&save);CHKERRQ(ierr);
> 
> /*@C
>    PetscDrawSave - Saves images produced in a PetscDraw into a file as a Gif file using AfterImage
> 
>    Collective on PetscDraw
> 
>    Input Parameter:
> +  draw      - the graphics context
> .  filename  - name of the file, if PETSC_NULL uses name of draw object
> -  movie - produce a movie of all the images
> 
>    Options Database Command:
> +  -draw_save  <filename>
> -  -draw_save_movie
> 
>    Level: intermediate
> 
>    Concepts: X windows^graphics
>    Concepts: drawing^postscript
>    Concepts: postscript^graphics
>    Concepts: drawing^Microsoft Windows
> 
>    Notes: Requires that PETSc be configured with the option --with-afterimage
> 
> 
> .seealso: PetscDrawSetFromOptions(), PetscDrawCreate(), PetscDrawDestroy(), PetscDrawSave()
> 
>   Please report any problems to petsc-maint at mcs.anl.gov
> 
>   Note that you must make sure the windows being saved are not covered by other windows.
> 
>    Barry
> 
> 
> On Jul 31, 2012, at 3:17 PM, "Ronald M. Caplan" <caplanr at predsci.com> wrote:
> 
> > Hi,
> >
> > I saw online that back in 2006 there was a way to tell PETSc to save the image in -mat_view_draw into a postscript file.  Is there anyway to still do this?  Or to same the image into any format?  Or to save a movie of the residual images in ksp?
> >
> > Thanks,
> >
> > Ron C.
> 
> 



More information about the petsc-users mailing list