[petsc-users] Multiple output using one viewer

Jed Brown jedbrown at mcs.anl.gov
Fri Jan 6 06:45:42 CST 2012


On Fri, Jan 6, 2012 at 03:09, Alexander Grayver <agrayver at gfz-potsdam.de>wrote:

> This is not always convinient to store everything in one file, but in some
> cases I do want to use it. I haven't found any examples on that. Do I have
> to use FILE_MODE_APPEND and then write? What happens if file doesn't exist?


You just create a viewer and then call MatView(), VecView(), etc,
repeatedly for each object you want to put in the file (e.g. once per time
step). No need for FILE_MODE_APPEND and unless you want to append to an
existing file.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120106/7fb85cab/attachment.htm>


More information about the petsc-users mailing list