Date: 2013-07-02T14:38:10+00:00

Actual source code: petscviewerhdf5.h
petsc-3.4.2 2013-07-02

      5: #include <petscviewer.h>

      7: #if defined(PETSC_HAVE_HDF5)

      9: #include <hdf5.h>
     10: PETSC_EXTERN PetscErrorCode PetscViewerHDF5GetFileId(PetscViewer,hid_t*);
     11: PETSC_EXTERN PetscErrorCode PetscViewerHDF5OpenGroup(PetscViewer, hid_t *, hid_t *);

     13: /* On 32 bit systems HDF5 is limited by size of integer, because hsize_t is defined as size_t */
     14: #define PETSC_HDF5_INT_MAX  2147483647
     15: #define PETSC_HDF5_INT_MIN -2147483647

     19: PETSC_STATIC_INLINE PetscErrorCode PetscHDF5IntCast(PetscInt a,hsize_t *b)
     20: {
     22: #if defined(PETSC_USE_64BIT_INDICES) && (PETSC_SIZEOF_SIZE_T == 4)
     23:   if ((a) > PETSC_HDF5_INT_MAX) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,"Array too long for HDF5");
     24: #endif
     25:   *b =  (hsize_t)(a);
     26:   return(0);
     27: }

     29: #endif  /* defined(PETSC_HAVE_HDF5) */

     31: PETSC_EXTERN PetscErrorCode PetscViewerHDF5WriteSDS(PetscViewer,float *,int,int *,int);

     33: PETSC_EXTERN PetscErrorCode PetscViewerHDF5Open(MPI_Comm,const char[],PetscFileMode,PetscViewer*);
     34: PETSC_EXTERN PetscErrorCode PetscViewerHDF5PushGroup(PetscViewer,const char *);
     35: PETSC_EXTERN PetscErrorCode PetscViewerHDF5PopGroup(PetscViewer);
     36: PETSC_EXTERN PetscErrorCode PetscViewerHDF5GetGroup(PetscViewer, const char **);
     37: PETSC_EXTERN PetscErrorCode PetscViewerHDF5IncrementTimestep(PetscViewer);
     38: PETSC_EXTERN PetscErrorCode PetscViewerHDF5SetTimestep(PetscViewer,PetscInt);
     39: PETSC_EXTERN PetscErrorCode PetscViewerHDF5GetTimestep(PetscViewer,PetscInt*);

     41: /* Reset __FUNCT__ in case the user does not define it themselves */

     45: #endif