<div class="gmail_quote">On Thu, Mar 8, 2012 at 13:10, Max Rudolph <span dir="ltr"><<a href="mailto:maxwellr@gmail.com">maxwellr@gmail.com</a>></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 'DMDAVTKWriteAll'</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>That is a developer-level function that you should not be calling, it's declared in private/daimpl.h. I didn't hack together some funky new API when I added the VTK viewer. You use it like any other viewer, by calling VecView(). Here's some sample code.</div>
<div><br></div><div><div> ierr = PetscOptionsGetString(((PetscObject)snes)->prefix,"-snes_view_solution_vtk",filename,PETSC_MAX_PATH_LEN,&flg);CHKERRQ(ierr);</div><div> if (flg) {</div><div> PetscViewer viewer;</div>
<div> ierr = PetscViewerCreate(((PetscObject)snes)->comm,&viewer);CHKERRQ(ierr);</div><div> ierr = PetscViewerSetType(viewer,PETSCVIEWERVTK);CHKERRQ(ierr);</div><div> ierr = PetscViewerFileSetName(viewer,filename);CHKERRQ(ierr);</div>
<div> ierr = VecView(snes->vec_sol,viewer);CHKERRQ(ierr);</div><div> ierr = PetscViewerDestroy(&viewer);CHKERRQ(ierr);</div><div> }</div></div><div><br></div>