[petsc-users] HDF5 time step count

Matthew Knepley knepley at gmail.com
Sun Oct 10 17:59:55 CDT 2021


On Sun, Oct 10, 2021 at 6:51 PM Adrian Croucher <a.croucher at auckland.ac.nz>
wrote:

> hi
>
> Is there any way to query the PETSc HDF5 viewer to find the number of
> time steps in the file?
>
> A common use case I have is that an HDF5 file from a previous simulation
> is used to get initial conditions for a subsequent run. The most common
> thing you want to do is restart from the last set of results in the
> previous output. To do that you need to know how many time steps there
> are, so you can set the output index to be the last one.
>
> I thought maybe I could just query the size of the "time" dataset, but I
> can't even see any obvious way to do that using the viewer functions.
>

There is nothing in there that does it right now. Do you know how to do it
in HDF5?
If so, I can put it in. Otherwise, I will have to learn more HDF5 :)

  Thanks,

     Matt


> Regards, 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 4611
>
>

-- 
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

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20211010/c113916e/attachment.html>


More information about the petsc-users mailing list