:orphan:
# PetscViewerHDF5SetBaseDimension2
Vectors of 1 dimension (i.e. bs/dof is 1) will be saved in the HDF5 file with a dimension of 2. 
## Synopsis
```
#include "petscviewerhdf5.h" 
PetscErrorCode PetscViewerHDF5SetBaseDimension2(PetscViewer viewer, PetscBool flg)
```
Logically Collective


## Input Parameters

- ***viewer -*** the `PetscViewer`; if it is a `PETSCVIEWERHDF5` then this command is ignored
- ***flg -*** if `PETSC_TRUE` the vector will always have at least a dimension of 2 even if that first dimension is of size 1



## Options Database Key

- ***-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





## Note
Setting this option allegedly makes code that reads the HDF5 in easier since they do not have a "special case" of a bs/dof
of one when the dimension is lower. Others think the option is crazy.


## See Also
 [](sec_viewers), `PETSCVIEWERHDF5`, PetscViewerFileSetMode()`, `PetscViewerCreate()`, `PetscViewerSetType()`, `PetscViewerBinaryOpen()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/viewer/impls/hdf5/hdf5v.c.html#PetscViewerHDF5SetBaseDimension2">src/sys/classes/viewer/impls/hdf5/hdf5v.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/tutorials/ex9.c.html">src/dm/tutorials/ex9.c</A><BR>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/viewer/impls/hdf5/hdf5v.c.html#PetscViewerHDF5SetBaseDimension2_HDF5">PetscViewerHDF5SetBaseDimension2_HDF5 in src/sys/classes/viewer/impls/hdf5/hdf5v.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/classes/viewer/impls/hdf5/hdf5v.c)


[Index of all Viewer routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
