PetscViewerHDF5WriteAttribute — PETSc 3.23.0 documentation

Skip to main content
`Ctrl`+`K`

# 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

Viewers: Looking at PETSc Objects, `PETSCVIEWERHDF5`, `PetscViewerHDF5Open()`, `PetscViewerHDF5WriteObjectAttribute()`, `PetscViewerHDF5ReadAttribute()`, `PetscViewerHDF5HasAttribute()`, `PetscViewerHDF5PushGroup()`, `PetscViewerHDF5PopGroup()`, `PetscViewerHDF5GetGroup()`

## Level

advanced

## Location

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

## Examples

src/ts/tutorials/ex30.c

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