<div class="gmail_quote">On Thu, Mar 8, 2012 at 16:19, Max Rudolph <span dir="ltr">&lt;<a href="mailto:maxwellr@gmail.com">maxwellr@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Is it expected behavior for field names not to be included in the .vts file produced using this viewer?</blockquote><div><br></div><div>Did you use DMDASetFieldNames()?</div><div><br></div><div>$ mpiexec -n 2 ./ex50 -da_refine 4 -snes_monitor -snes_view_solution_vtk foo.vts</div>
<div><br></div><div>now foo.vts contains</div><div><br></div><div><div>&lt;?xml version=&quot;1.0&quot;?&gt;</div><div>&lt;VTKFile type=&quot;StructuredGrid&quot; version=&quot;0.1&quot; byte_order=&quot;LittleEndian&quot;&gt;</div>
<div>  &lt;StructuredGrid WholeExtent=&quot;0 48 0 48 0 0&quot;&gt;</div><div>    &lt;Piece Extent=&quot;0 48 0 24 0 0&quot;&gt;</div><div>      &lt;Points&gt;</div><div>        &lt;DataArray type=&quot;Float64&quot; Name=&quot;Position&quot; NumberOfComponents=&quot;3&quot; format=&quot;appended&quot; offset=&quot;0&quot; /&gt;</div>
<div>      &lt;/Points&gt;</div><div>      &lt;PointData Scalars=&quot;ScalarPointData&quot;&gt;</div><div>        &lt;DataArray type=&quot;Float64&quot; Name=&quot;x-velocity&quot; NumberOfComponents=&quot;1&quot; format=&quot;appended&quot; offset=&quot;29404&quot; /&gt;</div>
<div>        &lt;DataArray type=&quot;Float64&quot; Name=&quot;y-velocity&quot; NumberOfComponents=&quot;1&quot; format=&quot;appended&quot; offset=&quot;39208&quot; /&gt;</div><div>        &lt;DataArray type=&quot;Float64&quot; Name=&quot;Omega&quot; NumberOfComponents=&quot;1&quot; format=&quot;appended&quot; offset=&quot;49012&quot; /&gt;</div>
<div>        &lt;DataArray type=&quot;Float64&quot; Name=&quot;temperature&quot; NumberOfComponents=&quot;1&quot; format=&quot;appended&quot; offset=&quot;58816&quot; /&gt;</div><div>      &lt;/PointData&gt;</div><div>    &lt;/Piece&gt;</div>
<div>    &lt;Piece Extent=&quot;0 48 25 48 0 0&quot;&gt;</div><div>      &lt;Points&gt;</div><div>        &lt;DataArray type=&quot;Float64&quot; Name=&quot;Position&quot; NumberOfComponents=&quot;3&quot; format=&quot;appended&quot; offset=&quot;68620&quot; /&gt;</div>
<div>      &lt;/Points&gt;</div><div>      &lt;PointData Scalars=&quot;ScalarPointData&quot;&gt;</div><div>        &lt;DataArray type=&quot;Float64&quot; Name=&quot;x-velocity&quot; NumberOfComponents=&quot;1&quot; format=&quot;appended&quot; offset=&quot;96848&quot; /&gt;</div>
<div>        &lt;DataArray type=&quot;Float64&quot; Name=&quot;y-velocity&quot; NumberOfComponents=&quot;1&quot; format=&quot;appended&quot; offset=&quot;106260&quot; /&gt;</div><div>        &lt;DataArray type=&quot;Float64&quot; Name=&quot;Omega&quot; NumberOfComponents=&quot;1&quot; format=&quot;appended&quot; offset=&quot;115672&quot; /&gt;</div>
<div>        &lt;DataArray type=&quot;Float64&quot; Name=&quot;temperature&quot; NumberOfComponents=&quot;1&quot; format=&quot;appended&quot; offset=&quot;125084&quot; /&gt;</div><div>      &lt;/PointData&gt;</div><div>    &lt;/Piece&gt;</div>
<div>  &lt;/StructuredGrid&gt;</div><div>  &lt;AppendedData encoding=&quot;raw&quot;&gt;</div></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br></div><div><font color="#888888">Max<br><br></font><div class="gmail_quote"><div class="im">On Thu, Mar 8, 2012 at 11:21 AM, Jed Brown <span dir="ltr">&lt;<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>&gt;</span> wrote:<br>

</div><div><div></div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="gmail_quote">On Thu, Mar 8, 2012 at 13:10, Max Rudolph <span dir="ltr">&lt;<a href="mailto:maxwellr@gmail.com" target="_blank">maxwellr@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>I get an implicit declaration warning when compiling with a call to DMDAVTKWriteAll:<div><br></div><div><div>io.c:209: warning: implicit declaration of function &#39;DMDAVTKWriteAll&#39;</div><div><br></div><div>Should the prototype be in petscdmda.h ? I do not see it there. Code still compiles successfully.</div>



<div></div></div></div></blockquote></div><br></div><div>That is a developer-level function that you should not be calling, it&#39;s declared in private/daimpl.h. I didn&#39;t hack together some funky new API when I added the VTK viewer. You use it like any other viewer, by calling VecView(). Here&#39;s some sample code.</div>


<div><br></div><div><div>    ierr = PetscOptionsGetString(((PetscObject)snes)-&gt;prefix,&quot;-snes_view_solution_vtk&quot;,filename,PETSC_MAX_PATH_LEN,&amp;flg);CHKERRQ(ierr);</div><div>    if (flg) {</div><div>      PetscViewer viewer;</div>


<div>      ierr = PetscViewerCreate(((PetscObject)snes)-&gt;comm,&amp;viewer);CHKERRQ(ierr);</div><div>      ierr = PetscViewerSetType(viewer,PETSCVIEWERVTK);CHKERRQ(ierr);</div><div>      ierr = PetscViewerFileSetName(viewer,filename);CHKERRQ(ierr);</div>


<div>      ierr = VecView(snes-&gt;vec_sol,viewer);CHKERRQ(ierr);</div><div>      ierr = PetscViewerDestroy(&amp;viewer);CHKERRQ(ierr);</div><div>    }</div></div><div><br></div>
</blockquote></div></div></div><br></div>
</blockquote></div><br>