petsc-3.7.1 2016-05-15
Report Typos and Errors

# PetscViewerHDF5Open

Opens a file for HDF5 input/output.

### Synopsis

    #include "petscsys.h"
    #include "petscviewerhdf5.h"
    PetscErrorCode  PetscViewerHDF5Open(MPI_Comm comm, const char name[], PetscFileMode type, PetscViewer *hdf5v)

Collective on MPI_Comm Many br

### Input Parameters

| comm | - MPI communicator Many br
| name | - name of file Many br
| type | - type of file Many br

       FILE_MODE_WRITE - create new file for binary output

       FILE_MODE_READ - open existing file for binary input

       FILE_MODE_APPEND - open existing file for binary output

### Output Parameter

hdf5v -PetscViewer for HDF5 input/output to use with the specified file Many br

### Options Database

-viewer_hdf5_base_dimension2 -turns on (true) or off (false) using a dimension of 2 in the HDF5 file even if the bs/dof of the vector is 1 Many br
-viewer_hdf5_sp_output -forces (if true) the viewer to write data in single precision independent on the precision of PetscReal Many br

Many br

### Note

This PetscViewer should be destroyed with PetscViewerDestroy(). Many br

### See Also

PetscViewerASCIIOpen(), PetscViewerPushFormat(), PetscViewerDestroy(), PetscViewerHDF5SetBaseDimension2(),
PetscViewerHDF5SetSPOutput(), PetscViewerHDF5GetBaseDimension2(), VecView(), MatView(), VecLoad(), Many brMatLoad(), PetscFileMode, PetscViewer Many br

Level:beginner
Location:src/sys/classes/viewer/impls/hdf5/hdf5v.c
Index of all Viewer routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/vec/vec/examples/tutorials/ex10.c.html
src/vec/vec/examples/tutorials/ex19.c.html
src/dm/examples/tutorials/ex9.c.html
src/dm/examples/tutorials/ex10.c.html
src/snes/examples/tutorials/ex12.c.html