70 int main (
int argc,
char **argv)
73 MPI_Init(&argc, &argv);
90 HDF5.
Open(
"matlab.h5");
92 if (Comm.
MyPID() == 0)
94 cout <<
"*) Reading Epetra_CrsMatrix from HDF5 file matlab.h5..." << endl;
98 int NumGlobalRows, NumGlobalCols, NumGlobalNonzeros;
99 int NumGlobalDiagonals, MaxNumEntries;
100 double NormOne, NormInf;
103 NumGlobalNonzeros, NumGlobalDiagonals,
104 MaxNumEntries, NormOne, NormInf);
106 if (Comm.
MyPID() == 0)
108 cout <<
"Matrix information as given by ReadCrsMatrixProperties()";
109 cout << endl << endl;
110 cout <<
"NumGlobalRows = " << NumGlobalRows << endl;
111 cout <<
"NumGlobalCols = " << NumGlobalCols << endl;
112 cout <<
"NumGlobalNonzeros = " << NumGlobalNonzeros << endl;
113 cout <<
"NumGlobalDiagonals = " << NumGlobalDiagonals << endl;
114 cout <<
"MaxNumEntries = " << MaxNumEntries << endl;
115 cout <<
"NormOne = " << NormOne << endl;
116 cout <<
"NormInf = " << NormInf << endl;
122 HDF5.
Read(
"speye", Matrix);
126 if (Comm.
MyPID() == 0)
129 cout <<
"*) Reading Epetra_MultiVector from HDF5 file matlab.h5..." << endl;
139 if (Comm.
MyPID() == 0)
142 cout <<
"*) Reading Epetra_Map from HDF5 file matlab.h5..." << endl;
147 HDF5.
Read(
"map-2", Map);
157 if (Matrix)
delete Matrix;
165 cerr <<
"Caught generic exception" << endl;
172 return(EXIT_SUCCESS);
void Read(const std::string &GroupName, const std::string &DataSetName, int &data)
Read an integer from group /GroupName/DataSetName.
int main(int argc, char **argv)
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
void Close()
Close the file.
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.