# 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".
+ 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
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/viewer/impls/hdf5/hdf5v.c.html#PetscViewerHDF5PushGroup">src/sys/classes/viewer/impls/hdf5/hdf5v.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/vec/tutorials/ex19.c.html">src/vec/vec/tutorials/ex19.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex12.c.html">src/snes/tutorials/ex12.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/tutorials/ex3.c.html">src/tao/tutorials/ex3.c.html</A><BR>


---
[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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
