PetscViewerHDF5PushGroup — PETSc 3.23.0 documentation

Skip to main content
`Ctrl`+`K`

# PetscViewerHDF5PushGroup

Set the current HDF5 group for output

## Synopsis

    #include "petscviewerhdf5.h"
    PetscErrorCode PetscViewerHDF5PushGroup(PetscViewer viewer, const char name[])

Not Collective

## Input Parameters

- viewer - the `PetscViewer` of type `PETSCVIEWERHDF5`

- name - The group name

## Notes

This is designed to mnemonically resemble the Unix cd command.

      If name begins with '/', it is interpreted as an absolute path fully replacing current group, otherwise it is taken as relative to the current group.
      `NULL`, empty string, or any sequence of all slashes (e.g. "///") is interpreted as the root group "/".
      "." means the current group is pushed again.

## Example

Suppose the current group is “/a”.

      If name is `NULL`, empty string, or a sequence of all slashes (e.g. "///"), then the new group will be "/".
      If name is ".", then the new group will be "/a".
      If name is "b", then the new group will be "/a/b".
      If name is "/b", then the new group will be "/b".

## Developer Notes

The root group “/” is internally stored as `NULL`.

## See Also

Viewers: Looking at PETSc Objects, `PETSCVIEWERHDF5`, `PetscViewerHDF5Open()`, `PetscViewerHDF5PopGroup()`, `PetscViewerHDF5GetGroup()`, `PetscViewerHDF5OpenGroup()`, `PetscViewerHDF5WriteGroup()`

## Level

intermediate

## Location

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

## Examples

src/ts/tutorials/ex30.c
src/vec/vec/tutorials/ex19.c
src/tao/tutorials/ex3.c
src/snes/tutorials/ex12.c

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