<div dir="ltr">None of that crazy "developer" nonsense is need for users. Just do this:<div><br></div><div><div> PetscViewer viewer;</div><div style> /* file name extension sets format by default, see also PetscViewerSetFormat(viewer,PETSC_VIEWER_VTK_VTS) */</div>
<div> ierr = PetscViewerVTKOpen(comm,"yourfile.vts",FILE_MODE_WRITE,&viewer);CHKERRQ(ierr);</div><div> ierr = VecView(X,viewer);CHKERRQ(ierr);</div><div> ierr = PetscViewerDestroy(&viewer);CHKERRQ(ierr);</div>
</div><div><br></div><div style>When using TS, you can do -ts_monitor_draw_solution_vtk 'filename-%03D.vts' to save each time step to a numbered binary file (ready to animate in paraview or visit).</div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Jan 9, 2013 at 9:37 AM, Blaise A Bourdin <span dir="ltr"><<a href="mailto:bourdin@lsu.edu" target="_blank">bourdin@lsu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I am looking at the documentation and the examples looking for a simple illustration of how to use the new vtk binary viewers for structured data defined by a DMDA, but can't find any straightforward example. Is there a simple example that I am missing?<br>
<br>
When I try<br>
PetscViewerVTKAddField(VTKviewer,(PetscObject) dmda1,DMDAVTKWriteAll,PETSC_VTK_POINT_FIELD,(PetscObject) p);CHKERRQ(ierr);<br>
I get a compilation time error:<br>
TestVTK.c:53: error: ‘DMDAVTKWriteAll’ was not declared in this scope<br>
indeed, DMDAVTKWriteAll is defined in a private header. Is this the way it is supposed to be?<br>
<br>
Is the xml file describing the content of the binary files generated automatically or do I need to take care of it by myself?<br>
<br>
I am using petsc-3.3, latest changeset.<br>
<br>
Regards,<br>
Blaise<br>
<span class="HOEnZb"><font color="#888888">--<br>
Department of Mathematics and Center for Computation & Technology<br>
Louisiana State University, Baton Rouge, LA 70803, USA<br>
Tel. <a href="tel:%2B1%20%28225%29%20578%201612" value="+12255781612">+1 (225) 578 1612</a>, Fax <a href="tel:%2B1%20%28225%29%20578%204276" value="+12255784276">+1 (225) 578 4276</a> <a href="http://www.math.lsu.edu/~bourdin" target="_blank">http://www.math.lsu.edu/~bourdin</a><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</font></span></blockquote></div><br></div></div>