42 #ifndef EPETRAEXT_HDF5_H 
   43 #define EPETRAEXT_HDF5_H 
   46 #ifdef HAVE_EPETRAEXT_HDF5 
  345     void Create(
const std::string FileName);
 
  348     void Open(
const std::string FileName, 
int AccessType = H5F_ACC_RDWR);
 
  360       H5Fflush(
file_id_, H5F_SCOPE_GLOBAL);
 
  372       hid_t group_id = H5Gcreate(
file_id_, GroupName.c_str(), H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
 
  377     bool IsContained(std::string Name, std::string GroupName = 
"");
 
  383     void Write(
const std::string& GroupName, 
const std::string& DataSetName, 
int data);
 
  386     void Read(
const std::string& GroupName, 
const std::string& DataSetName, 
int& data);
 
  389     void Write(
const std::string& GroupName, 
const std::string& DataSetName, 
double data);
 
  392     void Read(
const std::string& GroupName, 
const std::string& DataSetName, 
double& data);
 
  395     void Write(
const std::string& GroupName, 
const std::string& DataSetName, 
const std::string& data);
 
  398     void Read(
const std::string& GroupName, 
const std::string& DataSetName, std::string& data);
 
  401     void Read(
const std::string& GroupName, 
const std::string& DataSetName,
 
  402               const hid_t type, 
const int Length, 
void* data);
 
  405     void Write(
const std::string& GroupName, 
const std::string& DataSetName,
 
  406                          const hid_t type, 
const int Length, 
 
  412       H5Gset_comment(
file_id_, GroupName.c_str(), Comment.c_str());
 
  416     void ReadComment(
const std::string& GroupName, std::string& Comment)
 
  419       H5Gget_comment(
file_id_, GroupName.c_str(), 128, comment);
 
  427     void Write(
const std::string& GroupName, 
const std::string& DataSetName, 
int MySize, 
int GlobalSize, hid_t type, 
const void* data);
 
  430     void Read(
const std::string& GroupName, 
const std::string& DataSetName,
 
  431               int MySize, 
int GlobalSize,
 
  432               const hid_t type, 
void* data);
 
  445                            int& NumGlobalElements,
 
  457                                 int& NumGlobalElements,
 
  458                                 int& NumGlobalPoints,
 
  469     void Read(
const std::string& GroupName, 
const Epetra_Map& DomainMap, 
 
  479                                 int& NumGlobalNonzeros,
 
  480                                 int& NumGlobalDiagonals,
 
  511               bool writeTranspose = 
false, 
const int& indexBase = 0);
 
  517               bool writeTranspose = 
false);
 
  534     void Read(
const std::string& GroupName, 
 
  544                                  int& NumGlobalDiagonals,
 
  596     void Write(
const std::string& GroupName, 
const Handle& List);
 
  599     void Read(
const std::string& GroupName, 
Handle& List);
 
  604                               int& NumGlobalElements);
 
void ReadDoubleDistArrayProperties(const std::string &GroupName, int &GlobalLength, int &RowSize)
Read the global number of elements and type for a generic handle object. 
void Write(const std::string &GroupName, const std::string &DataSetName, int data)
Write an integer in group GroupName using the given DataSetName. 
void ReadHandleProperties(const std::string &GroupName, std::string &Type, int &NumGlobalElements)
Read the global number of elements and type for a generic handle object. 
void ReadComment(const std::string &GroupName, std::string &Comment)
Read the string associated with group GroupName. 
void ReadMapProperties(const std::string &GroupName, int &NumGlobalElements, int &IndexBase, int &NumProc)
Read basic properties of specified Epetra_Map. 
void CreateGroup(const std::string &GroupName)
Create group GroupName. 
bool IsContained(std::string Name, std::string GroupName="")
Return true if Name is contained in the database. 
bool IsOpen() const 
Return true if a file has already been opened using Open()/Create() 
void Read(const std::string &GroupName, const std::string &DataSetName, int &data)
Read an integer from group /GroupName/DataSetName. 
void WriteComment(const std::string &GroupName, std::string Comment)
Associate string Comment with group GroupName. 
const Epetra_Comm & Comm() const 
Returns a reference to this object's communicator. 
const Epetra_Comm & Comm_
This object's communicator. 
void ReadBlockMapProperties(const std::string &GroupName, int &NumGlobalElements, int &NumGlobalPoints, int &IndexBase, int &NumProc)
Read basic properties of specified Epetra_BlockMap. 
void Flush()
Flush the content to the file. 
void ReadIntVectorProperties(const std::string &GroupName, int &GlobalLength)
Read basic properties of specified Epetra_IntVector. 
void ReadCrsGraphProperties(const std::string &GroupName, int &NumGlobalRows, int &NumGlobalCols, int &NumGlobalNonzeros, int &NumGlobalDiagonals, int &MaxNumIndices)
Read basic properties of specified Epetra_CrsGraph. 
std::string FileName_
FileName currently open. 
bool IsOpen_
If true, a file is currently open. 
void Open(const std::string FileName, int AccessType=H5F_ACC_RDWR)
Open specified file with given access type. 
class HDF5: A class for storing Epetra objects in parallel binary files 
HDF5(const Epetra_Comm &Comm)
Constructor. 
hid_t file_id_
file ID for HDF5. 
void Close()
Close the file. 
void Create(const std::string FileName)
Create a new file. 
void ReadIntDistArrayProperties(const std::string &GroupName, int &GlobalLength, int &RowSize)
Read the global number of elements and type for a generic handle object. 
void ReadCrsMatrixProperties(const std::string &GroupName, int &NumGlobalRows, int &NumGlobalCols, int &NumNonzeros, int &NumGlobalDiagonals, int &MaxNumEntries, double &NormOne, double &NormInf)
Read basic properties of specified Epetra_CrsMatrix. 
void ReadMultiVectorProperties(const std::string &GroupName, int &GlobalLength, int &NumVectors)
Read basic properties of specified Epetra_MultiVector. 
DistArray<T>: A class to store row-oriented multivectors of type T.