Read an attribute from the dataset matching the given PetscObject by name


#include "petscviewerhdf5.h"   
PetscErrorCode PetscViewerHDF5ReadObjectAttribute(PetscViewer viewer, PetscObject obj, const char name[], PetscDataType datatype, void *value)

Input Parameters

viewer - The HDF5 viewer
obj - The object whose name is used to lookup the parent dataset, relative to the current group.
name - The attribute name
datatype - The attribute type

Output Parameter

value - The attribute value


This fails if current_group/object_name doesn't resolve to a dataset (the path doesn't exist or is not a dataset). You might want to check first if it does using PetscViewerHDF5HasObject().

Level: advanced

See Also

PetscViewerHDF5Open(), PetscViewerHDF5ReadAttribute() PetscViewerHDF5WriteObjectAttribute(), PetscViewerHDF5HasObjectAttribute(), PetscViewerHDF5PushGroup(),PetscViewerHDF5PopGroup(),PetscViewerHDF5GetGroup()