[petsc-users] Save matrix view to postscript?

Barry Smith bsmith at mcs.anl.gov
Tue Jul 31 17:23:58 CDT 2012


  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