[petsc-users] Nodes coordinates in distributed dmplex

Matthew Knepley knepley at gmail.com
Mon Jul 13 07:29:59 CDT 2015


On Mon, Jul 13, 2015 at 7:12 AM, Alejandro D Otero <aotero at fi.uba.ar> wrote:

> 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.
>
> I have a scalar field represented by a vector. If I print it on screen I
> got the following output.
>
> Vec Object: 2 MPI processes
>   type: mpi
> Process [0]
> 0
> 0
> 0.25
> 0.25
> 0.5
> 0.5
> 0.75
> 0.75
> 1
> 1
> Process [1]
> 0
> 0
> 0
> 0.25
> 0.25
> 0.25
> 0.5
> 0.5
> 0.5
> 0.75
> 0.75
> 0.75
> 1
> 1
> 1
>
> 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:
>
> 0.000000e+00
> 0.000000e+00
> 2.500000e-01
> 2.500000e-01
> 5.000000e-01
> 5.000000e-01
> 7.155608e-01
> 7.198046e-01
> 7.892083e-01
> 1.000000e+00
> 0.000000e+00
> 2.248979e-01
> 2.439858e-01
> 2.788163e-01
> 2.500000e-01
> 2.500000e-01
> 4.997506e-01
> 5.042740e-01
> 5.003098e-01
> 7.500000e-01
> 7.500000e-01
> 7.500000e-01
> 1.000000e+00
> 1.000000e+00
> 1.000000e+00
>
> The difference start in the 7th value on.Any clue of what could be
> happening?
>

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
HDF5. You can get human readable stuff using h5dump, its compact, parallel,
and you can use

  ./bin/petsc_gem_xmdf.py

to make XDMF files readable by Paraview. I output like this

  -dm_view hdf5:sol.h5
  -vec_view hdf5:sol.h5::append

and include PetscObjectViewFromOptions() calls in my code.

  Thanks,

     Matt


> Thanks in advance,
> Alejandro
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150713/5103ed4d/attachment.html>


More information about the petsc-users mailing list