Nalu
Nalu: a generalized unstructured massively parallel low Mach flow code designed to support a variety of energy applications of interest (most notably Wind ECP) built on the Sierra Toolkit and Trilinos solver Tpetra/Epetra stack. The open source BSD, clause 3 license model has been chosen for the code base. See LICENSE for more information. http://NaluCFD.org
HDF5FilePtr.h
Go to the documentation of this file.
1 #ifndef HDF5FILEPTR_H
2 #define HDF5FILEPTR_H
3 
4 #include <vector>
5 #include <map>
6 #include <string>
7 
8 namespace sierra {
9 namespace nalu {
10 
11 // Forward declarations
12 class H5IO;
13 
23 class HDF5FilePtr {
24 
25  public:
26 
31  explicit HDF5FilePtr( const std::string & fileName = "" );
32 
33  ~HDF5FilePtr();
34 
36  bool has_entry( const std::string & name ) const;
37 
39  std::vector<std::string> property_names() const;
40 
41  const std::string & filename() { return fileName_; }
42 
47  void read_hdf5();
48 
50  H5IO* get_H5IO();
51 
58  private:
59 
60  HDF5FilePtr( const HDF5FilePtr & ); // no copying
61  HDF5FilePtr operator=( const HDF5FilePtr & ); // no assignment
62 
64  std::vector<std::string> propertyNames_;
65 
67  std::string fileName_;
68 
71 
74 
75 };
76 
77 } // end nalu namespace
78 } // end sierra namespace
79 
80 #endif
~HDF5FilePtr()
Definition: HDF5FilePtr.C:36
HDF5FilePtr(const std::string &fileName="")
Construct an empty HDF5FilePtr.
Definition: HDF5FilePtr.C:15
Definition: ABLForcingAlgorithm.C:26
bool has_entry(const std::string &name) const
Query if the given property exists in the library.
Definition: HDF5FilePtr.C:43
Simple wrapper around the HDF5 library to make usage easier.
Definition: H5IO.h:57
H5IO * get_H5IO()
returns the pointer to an opened HDF5 file
Definition: HDF5FilePtr.C:67
HDF5FilePtr operator=(const HDF5FilePtr &)
std::vector< std::string > property_names() const
Get a list of all contained properties.
Definition: HDF5FilePtr.C:54
std::string fileName_
Name of the file that the library is tied to.
Definition: HDF5FilePtr.h:67
std::vector< std::string > propertyNames_
list of properties contained in the file
Definition: HDF5FilePtr.h:64
void read_hdf5()
Read the entire library from an HDF5 file with the name set in the constructor.
Definition: HDF5FilePtr.C:60
H5IO * fileIO_
Pointer to table of properties.
Definition: HDF5FilePtr.h:73
const std::string & filename()
Definition: HDF5FilePtr.h:41
Provides a HDF5 formatted file pointer.
Definition: HDF5FilePtr.h:23
int exportFileVersion_
File version to write.
Definition: HDF5FilePtr.h:70