HDF5File.h¶
Note
The documentation on this page was automatically extracted from the DOLFIN C++ code and may need to be edited or expanded.
-
class
HDF5File
¶ Parent class(es)
-
HDF5File
(MPI_Comm comm, const std::string filename, const std::string file_mode)¶ Constructor. file_mode should “a” (append), “w” (write) or “r” (read).
-
void
close
()¶ Close file
-
void
write
(const std::vector<double> &values, const std::string name)¶ Write simple vector of double to file
-
void
write
(const GenericVector &x, const std::string name)¶ Write Vector to file in a format suitable for re-reading
-
void
read
(GenericVector &x, const std::string dataset_name, const bool use_partition_from_file) const¶ Read vector from file and optionally re-use any partitioning that is available in the file
-
void
write
(const Mesh &mesh, const std::string name)¶ Write Mesh to file in a format suitable for re-reading
-
void
write
(const Mesh &mesh, const std::size_t cell_dim, const std::string name)¶ Write Mesh of given cell dimension to file in a format suitable for re-reading
-
void
write
(const Function &u, const std::string name)¶ Write Function to file in a format suitable for re-reading
-
void
write
(const Function &u, const std::string name, double timestamp)¶ Write Function to file with a timestamp
-
void
read
(Function &u, const std::string name)¶ Read Function from file and distribute data according to the Mesh and dofmap associated with the Function. If the ‘name’ refers to a HDF5 group, then it is assumed that the Function data is stored in the datasets within that group. If the ‘name’ refers to a HDF5 dataset within a group, then it is assumed that it is a Vector, and the Function will be filled from that Vector
-
void
read
(Mesh &mesh, const std::string name, bool use_partition_from_file) const¶ Read Mesh from file and optionally re-use any partition data in the file
-
void
write
(const MeshFunction<std::size_t> &meshfunction, const std::string name)¶ Write MeshFunction to file in a format suitable for re-reading
-
void
write
(const MeshFunction<int> &meshfunction, const std::string name)¶ Write MeshFunction to file in a format suitable for re-reading
-
void
write
(const MeshFunction<double> &meshfunction, const std::string name)¶ Write MeshFunction to file in a format suitable for re-reading
-
void
write
(const MeshFunction<bool> &meshfunction, const std::string name)¶ Write MeshFunction to file in a format suitable for re-reading
-
void
read
(MeshFunction<std::size_t> &meshfunction, const std::string name) const¶ Read MeshFunction from file
-
void
read
(MeshFunction<int> &meshfunction, const std::string name) const¶ Read MeshFunction from file
-
void
read
(MeshFunction<double> &meshfunction, const std::string name) const¶ Read MeshFunction from file
-
void
read
(MeshFunction<bool> &meshfunction, const std::string name) const¶ Read MeshFunction from file
-
void
write
(const MeshValueCollection<std::size_t> &mesh_values, const std::string name)¶ Write MeshValueCollection to file
-
void
write
(const MeshValueCollection<double> &mesh_values, const std::string name)¶ Write MeshValueCollection to file
-
void
write
(const MeshValueCollection<bool> &mesh_values, const std::string name)¶ Write MeshValueCollection to file
-
void
read
(MeshValueCollection<std::size_t> &mesh_values, const std::string name) const¶ Read MeshValueCollection from file
-
void
read
(MeshValueCollection<double> &mesh_values, const std::string name) const¶ Read MeshValueCollection from file
-
void
read
(MeshValueCollection<bool> &mesh_values, const std::string name) const¶ Read MeshValueCollection from file
-
bool
has_dataset
(const std::string dataset_name) const¶ Check if dataset exists in HDF5 file
-
void
flush
()¶ Flush buffered I/O to disk
-