Reference documentation for deal.II version Git e7c9a24 2019-02-08 08:26:19 +0100
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
Public Types | Public Member Functions | Private Member Functions | List of all members
HDF5::File Class Reference

#include <deal.II/base/hdf5.h>

Inheritance diagram for HDF5::File:
[legend]

Public Types

enum  FileAccessMode { FileAccessMode::open, FileAccessMode::create }
 

Public Member Functions

 File (const std::string &name, const FileAccessMode mode)
 
 File (const std::string &name, const FileAccessMode mode, const MPI_Comm mpi_communicator)
 
- Public Member Functions inherited from HDF5::Group
Group open_group (const std::string &name) const
 
Group create_group (const std::string &name) const
 
DataSet open_dataset (const std::string &name) const
 
template<typename number >
DataSet create_dataset (const std::string &name, const std::vector< hsize_t > &dimensions) const
 
template<typename Container >
void write_dataset (const std::string &name, const Container &data) const
 
- Public Member Functions inherited from HDF5::HDF5Object
template<typename T >
get_attribute (const std::string &attr_name) const
 
template<typename T >
void set_attribute (const std::string &attr_name, const T value)
 
std::string get_name () const
 

Private Member Functions

 File (const std::string &name, const FileAccessMode mode, const bool mpi, const MPI_Comm mpi_communicator)
 

Additional Inherited Members

- Protected Types inherited from HDF5::Group
enum  GroupAccessMode { GroupAccessMode::open, GroupAccessMode::create }
 
- Protected Member Functions inherited from HDF5::Group
 Group (const std::string &name, const Group &parent_group, const bool mpi, const GroupAccessMode mode)
 
 Group (const std::string &name, const bool mpi)
 
- Protected Member Functions inherited from HDF5::HDF5Object
 HDF5Object (const std::string &name, const bool mpi)
 
- Protected Attributes inherited from HDF5::HDF5Object
const std::string name
 
std::shared_ptr< hid_t > hdf5_reference
 
const bool mpi
 

Detailed Description

This class implements an HDF5 File

Author
Daniel Garcia-Sanchez, 2018, 2019.

Definition at line 1037 of file hdf5.h.

Member Enumeration Documentation

File access mode

Enumerator
open 

Read/write, file must exist

create 

Create file, truncate if exists

Definition at line 1043 of file hdf5.h.

Constructor & Destructor Documentation

HDF5::File::File ( const std::string &  name,
const FileAccessMode  mode 
)

Creates or opens an HDF5 file for serial operations. This call does not require MPI support. It creates or opens an HDF5 file depending on the value of mode.

Definition at line 1356 of file hdf5.cc.

HDF5::File::File ( const std::string &  name,
const FileAccessMode  mode,
const MPI_Comm  mpi_communicator 
)

Creates or opens an HDF5 file in parallel using MPI. This requires that deal.II and HDF5 were compiled with MPI support. It creates or opens a HDF5 file depending on the value of mode. mpi_communicator defines the processes that participate in this call; MPI_COMM_WORLD is a common value for the MPI communicator.

Definition at line 1362 of file hdf5.cc.

HDF5::File::File ( const std::string &  name,
const FileAccessMode  mode,
const bool  mpi,
const MPI_Comm  mpi_communicator 
)
private

Delegation internal constructor. File(const std::string &, const MPI_Comm, const Mode); and File(const std::string &, const Mode) should be used to open or create HDF5 files.

Definition at line 1370 of file hdf5.cc.


The documentation for this class was generated from the following files: