[petsc-users] Outputting Petsc data to Visit

Jed Brown jedbrown at mcs.anl.gov
Mon Jul 9 17:35:49 CDT 2012


On Mon, Jul 9, 2012 at 2:11 PM, Jeff Wiens <jwiens at sfu.ca> wrote:

> I am storing a multidimensional solution to a pde in a petsc vector
> using a distributed array. I would like to output this vector at
> different time-steps so that it can visualized in VisIt. I want to
> know the recommended way of doing this in petsc 3.2-p7.
>

Please upgrade to petsc-3.3, then use VecView() and PETSCVIEWERVTK. The
file name should end in .vts.


>
> I assumed that the HDF5 viewer would be the most appropriate option.
>

HDF5 is like a file system. You can put anything there with any structure
at all, therefore packages like VisIt can't read it without extra
descriptive files (e.g. XDMF) or a custom viewer.


> However, I am running into several obstacles when using it:
>
> - I can't get
> PetscViewerHDF5SetTimestep/PetscViewerHDF5IncrementTimestep/PetscViewerHDF5PushGroup
> to work.
>

We need symptoms.


> - I can't find a way to include the spatial coordinates into the hdf5
> file (and for it to be used by visit).
>

Did you use DMDASetCoordinates? That is used by the VTK viewer.


> - It is not immediate obvious to me how a vector field should be saved
> so it is understood as a vector field in visit.
>

Make it a vector using the Expression editor in VisIt.


>
> First, I would like to know how other users are outputting petsc data
> for VisIt. Secondly, for users using HDF5, has anyone run into similar
> issues.
>
> Jeff
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120709/f3bda8ea/attachment.html>


More information about the petsc-users mailing list