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" 66 const Epetra_Map& rowmap =
A->RowMap();
68 Epetra_MultiVector* x =
new Epetra_MultiVector(rowmap, 1);
70 std::cout <<
"creating b = A*random" << std::endl;
71 b =
new Epetra_MultiVector(rowmap, 1);
85 const Epetra_Comm& comm)
91 Epetra_Vector* b =
NULL;
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)
void start(bool reset=false)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
double totalElapsedTime(bool readCurrentTime=false) const
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.
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)