Skip to main content
`Ctrl`+`K`

# petsc4py.PETSc.ViewerHDF5

class petsc4py.PETSc.ViewerHDF5

  Bases: `Viewer`

  Viewer object for HDF5 file formats.

  Viewer is described in the `PETSc manual`.

  See also

  `Viewer`

  Methods Summary

  `create`(name[, mode, comm]) | Create a viewer of type `Type.HDF5`.
  `getGroup`() | Return the current group.
  `getTimestep`() | Return the current time step.
  `incrementTimestep`() | Increment the time step.
  `popGroup`() | Pop the current group from the stack.
  `popTimestepping`() | Deactivate the timestepping mode.
  `pushGroup`(group) | Set the current group.
  `pushTimestepping`() | Activate the timestepping mode.
  `setTimestep`(timestep) | Set the current time step.

  Methods Documentation

  create(name, mode=None, comm=None)

    Create a viewer of type `Type.HDF5`.

    Collective.

    Parameters:

      - name (str) – The filename associated with the viewer.

      - mode (FileMode | str | None) – The mode type.

      - comm (Comm | None) – MPI communicator, defaults to `Sys.getDefaultComm`.

    Return type:

      Self

    See also

    `Viewer.createHDF5`

    Source code at petsc4py/PETSc/Viewer.pyx:1044

  getGroup()

    Return the current group.

    Not collective.

    See also

    `pushGroup`, `popGroup`, `PetscViewerHDF5GetGroup`

    Source code at petsc4py/PETSc/Viewer.pyx:1171

    Return type:

      str

  getTimestep()

    Return the current time step.

    Not collective.

    See also

    `pushTimestepping`, `setTimestep`, `incrementTimestep`, `PetscViewerHDF5GetTimestep`

    Source code at petsc4py/PETSc/Viewer.pyx:1104

    Return type:

      int

  incrementTimestep()

    Increment the time step.

    Logically collective.

    See also

    `pushTimestepping`, `setTimestep`, `getTimestep`, `PetscViewerHDF5IncrementTimestep`

    Source code at petsc4py/PETSc/Viewer.pyx:1132

    Return type:

      None

  popGroup()

    Pop the current group from the stack.

    Logically collective.

    See also

    `pushGroup`, `getGroup`, `PetscViewerHDF5PopGroup`

    Source code at petsc4py/PETSc/Viewer.pyx:1159

    Return type:

      None

  popTimestepping()

    Deactivate the timestepping mode.

    Logically collective.

    See also

    `pushTimestepping`, `PetscViewerHDF5PopTimestepping`

    Source code at petsc4py/PETSc/Viewer.pyx:1092

    Return type:

      None

  pushGroup(group)

    Set the current group.

    Logically collective.

    See also

    `popGroup`, `getGroup`, `PetscViewerHDF5PushGroup`

    Source code at petsc4py/PETSc/Viewer.pyx:1145

    Parameters:

      group (str)

    Return type:

      None

  pushTimestepping()

    Activate the timestepping mode.

    Logically collective.

    See also

    `popTimestepping`, `PetscViewerHDF5PushTimestepping`

    Source code at petsc4py/PETSc/Viewer.pyx:1080

    Return type:

      None

  setTimestep(timestep)

    Set the current time step.

    Logically collective.

    See also

    `pushTimestepping`, `getTimestep`, `incrementTimestep`, `PetscViewerHDF5SetTimestep`

    Source code at petsc4py/PETSc/Viewer.pyx:1119

    Parameters:

      timestep (int)

    Return type:

      None

  __init__()
  classmethod __new__(*args, **kwargs)