PetscViewerHDF5PushTimestepping#

Activate timestepping mode for subsequent HDF5 reading and writing.

Synopsis#

#include "petscviewerhdf5.h" 
PetscErrorCode PetscViewerHDF5PushTimestepping(PetscViewer viewer)

Not Collective

Input Parameter#

Notes#

On first PetscViewerHDF5PushTimestepping(), the initial time step is set to 0. Next timesteps can then be set using PetscViewerHDF5IncrementTimestep() or PetscViewerHDF5SetTimestep(). Current timestep value determines which timestep is read from or written to any dataset on the next HDF5 I/O operation [e.g. VecView()]. Use PetscViewerHDF5PopTimestepping() to deactivate timestepping mode; calling it by the end of the program is NOT mandatory. Current timestep is remembered between PetscViewerHDF5PopTimestepping() and the next PetscViewerHDF5PushTimestepping().

If a dataset was stored with timestepping, it can be loaded only in the timestepping mode again. Loading a timestepped dataset with timestepping disabled, or vice-versa results in an error.

Developer Notes#

Timestepped HDF5 dataset has an extra dimension and attribute “timestepping” set to true.

See Also#

Viewers: Looking at PETSc Objects, PETSCVIEWERHDF5, PetscViewerHDF5Open(), PetscViewerHDF5PopTimestepping(), PetscViewerHDF5IsTimestepping(), PetscViewerHDF5SetTimestep(), PetscViewerHDF5IncrementTimestep(), PetscViewerHDF5GetTimestep()

Level#

intermediate

Location#

src/sys/classes/viewer/impls/hdf5/hdf5v.c

Examples#

src/vec/vec/tutorials/ex19.c


Index of all Viewer routines
Table of Contents for all manual pages
Index of all manual pages