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);
438 void Write(
const std::string& GroupName,
const Epetra_Map& Map);
441 void Read(
const std::string& GroupName,
Epetra_Map*& Map);
444 void ReadMapProperties(
const std::string& GroupName,
445 int& NumGlobalElements,
456 void ReadBlockMapProperties(
const std::string& GroupName,
457 int& NumGlobalElements,
458 int& NumGlobalPoints,
469 void Read(
const std::string& GroupName,
const Epetra_Map& DomainMap,
473 void Write(
const std::string& GroupName,
const Epetra_CrsGraph& Graph);
476 void ReadCrsGraphProperties(
const std::string& GroupName,
479 int& NumGlobalNonzeros,
480 int& NumGlobalDiagonals,
496 void ReadIntVectorProperties(
const std::string& GroupName,
int& GlobalLength);
504 void Write(
const std::string& GroupName,
const Epetra_MultiVector& x,
bool writeTranspose =
false);
511 bool writeTranspose =
false,
const int& indexBase = 0);
517 bool writeTranspose =
false);
520 void ReadMultiVectorProperties(
const std::string& GroupName,
534 void Read(
const std::string& GroupName,
540 void ReadCrsMatrixProperties(
const std::string& GroupName,
544 int& NumGlobalDiagonals,
553 void Write(
const std::string& GroupName,
const Teuchos::ParameterList& List);
556 void Read(
const std::string& GroupName, Teuchos::ParameterList& List);
562 void Write(
const std::string& GroupName,
const DistArray<int>& array);
571 void ReadIntDistArrayProperties(
const std::string& GroupName,
588 void ReadDoubleDistArrayProperties(
const std::string& GroupName,
596 void Write(
const std::string& GroupName,
const Handle& List);
599 void Read(
const std::string& GroupName,
Handle& List);
602 void ReadHandleProperties(
const std::string& GroupName,
604 int& NumGlobalElements);
619 std::string FileName_;
void ReadComment(const std::string &GroupName, std::string &Comment)
Read the string associated with group GroupName.
void CreateGroup(const std::string &GroupName)
Create group GroupName.
void WriteComment(const std::string &GroupName, std::string Comment)
Associate string Comment with group GroupName.
EpetraExt::BlockCrsMatrix: A class for constructing a distributed block matrix.
void Flush()
Flush the content to the file.
bool IsOpen() const
Return true if a file has already been opened using Open()/Create()
class HDF5: A class for storing Epetra objects in parallel binary files
void Close()
Close the file.
DistArray<T>: A class to store row-oriented multivectors of type T.