<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 06.01.2012 13:45, Jed Brown wrote:
<blockquote
cite="mid:CAM9tzSndwOrL7Tbuy+tFyNrjvLpWsnwx8yNaFTGsYNyf59_VeQ@mail.gmail.com"
type="cite">
<div class="gmail_quote">On Fri, Jan 6, 2012 at 03:09, Alexander
Grayver <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:agrayver@gfz-potsdam.de">agrayver@gfz-potsdam.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
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?</blockquote>
</div>
<br>
<div>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.</div>
</blockquote>
<br>
Ok, that was my meaning to use PetscViewerFileSetName from the
beginning since if you have let's say ten different objects (Mat and
Vec) and you need to output them at each iteration (time step or
frequency for multi-freqs modeling) you need ten viewer objects
which is not cool I guess, that is why I started to use one viewer
and change just a name of the file. <br>
And to be honest I don't see any reason why having ten viewers is
better than calling PetscViewerFileSetName ten times. <br>
<br>
Regards,<br>
Alexander<br>
</body>
</html>