49 #include "Teuchos_ParameterList.hpp"
50 #include "Teuchos_RefCountPtr.hpp"
51 #include "Teuchos_Time.hpp"
52 #include "Teuchos_Comm.hpp"
54 #include "Epetra_Comm.h"
55 #include "Epetra_Map.h"
56 #include "Epetra_MultiVector.h"
57 #include "Epetra_RowMatrix.h"
58 #include "Epetra_CrsMatrix.h"
59 #include "Epetra_LinearProblem.h"
70 std::cout <<
"creating b = A*random" << std::endl;
93 std::string mm_file(
"not specified");
94 std::string rhs_mm_file(
"not specified");
97 std::string hb_file(
"not specified");
100 if (mm_file !=
"not specified") {
101 if (comm.
MyPID() == 0) {
102 std::cout <<
"Matrix-Market file: " << mm_file << std::endl;
105 if (rhs_mm_file !=
"not specified") {
106 if (comm.
MyPID() == 0) {
107 std::cout <<
"Matrix-Market file: " << rhs_mm_file << std::endl;
112 else if (hb_file !=
"not specified") {
116 throw std::runtime_error(
"No matrix file specified.");
121 if (comm.
MyPID() == 0) {
122 std::cout <<
"proc 0 time to read matrix & create problem: " << timer.
totalElapsedTime()
void read_matrix_hb(const std::string &hb_file, const Epetra_Comm &Comm, Epetra_CrsMatrix *&A, Epetra_Vector *&b)
int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
virtual int MyPID() const =0
const Epetra_Map & RowMap() const
void start(bool reset=false)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
void GetParameter(const Teuchos::ParameterList ¶ms, const std::string &name, T &value)
Set a value from a ParameterList if a parameter with the specified name exists.
double totalElapsedTime(bool readCurrentTime=false) const
Teuchos::RCP< Epetra_LinearProblem > build_problem(Teuchos::ParameterList &test_params, const Epetra_Comm &comm)
Epetra_Vector * read_vector_mm(const std::string &mm_file, const Epetra_Comm &comm)
Epetra_CrsMatrix * read_matrix_mm(const std::string &mm_file, const Epetra_Comm &comm)
Teuchos::RCP< Epetra_LinearProblem > build_problem_mm(Teuchos::ParameterList &test_params, Epetra_CrsMatrix *A, Epetra_MultiVector *b)