<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jul 13, 2015 at 7:12 AM, Alejandro D Otero <span dir="ltr"><<a href="mailto:aotero@fi.uba.ar" target="_blank">aotero@fi.uba.ar</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">Hi, I seems to be having problems with PETSc vector VTK viewer. The output file I get has some values which are different from what I actually have.<br><br></div><div class="gmail_extra">I have a scalar field represented by a vector. If I print it on screen I got the following output.<br><br>Vec Object: 2 MPI processes<br>  type: mpi<br>Process [0]<br>0<br>0<br>0.25<br>0.25<br>0.5<br>0.5<br>0.75<br>0.75<br>1<br>1<br>Process [1]<br>0<br>0<br>0<br>0.25<br>0.25<br>0.25<br>0.5<br>0.5<br>0.5<br>0.75<br>0.75<br>0.75<br>1<br>1<br>1<br><br></div><div class="gmail_extra">But when I set the viewer to use VTK_VTU (in this case ASCII just for make it readable, but the same in native vtk format when read with paraview) I got:<br></div><div class="gmail_extra"><br>0.000000e+00<br>0.000000e+00<br>2.500000e-01<br>2.500000e-01<br>5.000000e-01<br>5.000000e-01<br>7.155608e-01<br>7.198046e-01<br>7.892083e-01<br>1.000000e+00<br>0.000000e+00<br>2.248979e-01<br>2.439858e-01<br>2.788163e-01<br>2.500000e-01<br>2.500000e-01<br>4.997506e-01<br>5.042740e-01<br>5.003098e-01<br>7.500000e-01<br>7.500000e-01<br>7.500000e-01<br>1.000000e+00<br>1.000000e+00<br>1.000000e+00<br><br></div><div class="gmail_extra">The difference start in the 7th value on.Any clue of what could be happening?<br></div></div></blockquote><div><br></div><div>Nope. Jed wrote the VTU viewer, so I can take a look at it. However, I think the best way to output now is to use</div><div>HDF5. You can get human readable stuff using h5dump, its compact, parallel, and you can use</div><div><br></div><div>  ./bin/petsc_gem_xmdf.py</div><div><br></div><div>to make XDMF files readable by Paraview. I output like this</div><div><br></div><div>  -dm_view hdf5:sol.h5</div><div>  -vec_view hdf5:sol.h5::append</div><div><br></div><div>and include PetscObjectViewFromOptions() calls in my code.</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"></div><div class="gmail_extra">Thanks in advance,<br></div><div class="gmail_extra">Alejandro<br></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div>