Skip to main content
`Ctrl`+`K`

# PetscViewerHDF5ReadSizes

Read block size and global size of a `Vec` or `IS` stored in an HDF5 file.

## Synopsis

    #include "petsclayoutdf5.h"
    #include "petscis.h"
    PetscErrorCode PetscViewerHDF5ReadSizes(PetscViewer viewer, const char name[], PetscInt *bs, PetscInt *N)

## Input Parameters

- viewer - The `PETSCVIEWERHDF5` viewer

- name - The dataset name

## Output Parameters

- bs - block size

- N - global size

## Notes

The dataset is stored as an HDF5 dataspace with 1-4 dimensions in the order

1. # timesteps (optional), 2) # blocks, 3) # elements per block (optional), 4) real and imaginary part (only for complex).

The dataset can be stored as a 2D dataspace even if its blocksize is 1; see `PetscViewerHDF5SetBaseDimension2()`.

## See Also

`PetscViewer`, `PETSCVIEWERHDF5`, `PetscViewerHDF5Open()`, `VecLoad()`, `ISLoad()`, `VecGetSize()`, `ISGetSize()`, `PetscViewerHDF5SetBaseDimension2()`

## Level

advanced

## Location

src/vec/is/utils/hdf5/hdf5io.c

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