42 #ifndef EPETRAEXT_HDF5_H
43 #define EPETRAEXT_HDF5_H
45 #if defined(EpetraExt_SHOW_DEPRECATED_WARNINGS)
47 #warning "The EpetraExt package is deprecated"
52 #ifdef HAVE_EPETRAEXT_HDF5
351 void Create(
const std::string FileName);
354 void Open(
const std::string FileName,
int AccessType = H5F_ACC_RDWR);
366 H5Fflush(file_id_, H5F_SCOPE_GLOBAL);
378 hid_t group_id = H5Gcreate(file_id_, GroupName.c_str(), H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
383 bool IsContained(std::string Name, std::string GroupName =
"");
389 void Write(
const std::string& GroupName,
const std::string& DataSetName,
int data);
392 void Read(
const std::string& GroupName,
const std::string& DataSetName,
int& data);
395 void Write(
const std::string& GroupName,
const std::string& DataSetName,
double data);
398 void Read(
const std::string& GroupName,
const std::string& DataSetName,
double& data);
401 void Write(
const std::string& GroupName,
const std::string& DataSetName,
const std::string& data);
404 void Read(
const std::string& GroupName,
const std::string& DataSetName, std::string& data);
407 void Read(
const std::string& GroupName,
const std::string& DataSetName,
408 const hid_t type,
const int Length,
void* data);
411 void Write(
const std::string& GroupName,
const std::string& DataSetName,
412 const hid_t type,
const int Length,
418 H5Gset_comment(file_id_, GroupName.c_str(), Comment.c_str());
422 void ReadComment(
const std::string& GroupName, std::string& Comment)
425 H5Gget_comment(file_id_, GroupName.c_str(), 128, comment);
433 void Write(
const std::string& GroupName,
const std::string& DataSetName,
int MySize,
int GlobalSize, hid_t type,
const void* data);
436 void Read(
const std::string& GroupName,
const std::string& DataSetName,
437 int MySize,
int GlobalSize,
438 const hid_t type,
void* data);
451 int& NumGlobalElements,
463 int& NumGlobalElements,
464 int& NumGlobalPoints,
475 void Read(
const std::string& GroupName,
const Epetra_Map& DomainMap,
485 int& NumGlobalNonzeros,
486 int& NumGlobalDiagonals,
517 bool writeTranspose =
false,
const int& indexBase = 0);
523 bool writeTranspose =
false);
540 void Read(
const std::string& GroupName,
550 int& NumGlobalDiagonals,
559 void Write(
const std::string& GroupName,
const Teuchos::ParameterList& List);
562 void Read(
const std::string& GroupName, Teuchos::ParameterList& List);
602 void Write(
const std::string& GroupName,
const Handle& List);
605 void Read(
const std::string& GroupName,
Handle& List);
610 int& NumGlobalElements);
625 std::string FileName_;
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.
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.
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.
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.