:orphan:
# 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.
```none
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".
```none
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 Note
The root group "/" is internally stored as `NULL`.
## See Also
[](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5Open()`, `PetscViewerHDF5PopGroup()`, `PetscViewerHDF5GetGroup()`, `PetscViewerHDF5OpenGroup()`, `PetscViewerHDF5WriteGroup()`
## Level
intermediate
## Location
src/sys/classes/viewer/impls/hdf5/hdf5v.c
## Examples
src/snes/tutorials/ex12.c
src/tao/tutorials/ex3.c
src/vec/vec/tutorials/ex19.c
---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/classes/viewer/impls/hdf5/hdf5v.c)
[Index of all Viewer routines](index.md)
[Table of Contents for all manual pages](/manualpages/index.md)
[Index of all manual pages](/manualpages/singleindex.md)