:orphan: # PetscViewerHDF5WriteAttribute Write an attribute ## Synopsis ``` #include "petscviewerhdf5.h" PetscErrorCode PetscViewerHDF5WriteAttribute(PetscViewer viewer, const char parent[], const char name[], PetscDataType datatype, const void *value) ``` Collective ## Input Parameters - ***viewer -*** The `PETSCVIEWERHDF5` viewer - ***parent -*** The parent dataset/group name - ***name -*** The attribute name - ***datatype -*** The attribute type - ***value -*** The attribute value ## Note If parent starts with '/', it is taken as an absolute path overriding currently pushed group, else parent is relative to the current pushed group. NULL means the current pushed group. ## See Also [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5Open()`, `PetscViewerHDF5WriteObjectAttribute()`, `PetscViewerHDF5ReadAttribute()`, `PetscViewerHDF5HasAttribute()`, `PetscViewerHDF5PushGroup()`, `PetscViewerHDF5PopGroup()`, `PetscViewerHDF5GetGroup()` ## Level advanced ## Location src/sys/classes/viewer/impls/hdf5/hdf5v.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)