[petsc-users] HDF5 vec output with DMPlex

Matthew Knepley knepley at gmail.com
Thu Oct 15 22:54:54 CDT 2015

On Thu, Oct 15, 2015 at 10:51 PM, Adrian Croucher <a.croucher at auckland.ac.nz
> wrote:

> hi,
> I am wanting to output time-stepped simulation results to an HDF5 file,
> from a PETSc Vec created on a DMPlex using DMCreateGlobalVector().
> I tried doing it the way it's done in
> src/vec/vec/examples/tutorials/ex19.c, using PetscViewerHDF5Open(),
> PetscViewerHDF5PushGroup() and PetscViewerHDF5SetTimestep(), but the
> resulting HDF5 file only ever seems to have results for the last time step
> in it.
> It works OK for a Vec created simply using VecCreate(), as in the ex19
> example. Is there any reason it shouldn't work with DMPlex?

No, that should work. This is how we do it in PyLith. There must be some
setup problem. When you look at the HDF5 file. Does
it have a dimension for timestep?



> Cheers, Adrian
> --
> Dr Adrian Croucher
> Senior Research Fellow
> Department of Engineering Science
> University of Auckland, New Zealand
> email: a.croucher at auckland.ac.nz
> tel: +64 (0)9 923 84611

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/20151015/bd156052/attachment.html>

More information about the petsc-users mailing list