42 #ifndef BELOS_DETAILS_LINEARSOLVER_HPP
43 #define BELOS_DETAILS_LINEARSOLVER_HPP
49 #include "Trilinos_Details_LinearSolver.hpp"
75 template<
class MV,
class OP,
class ScalarType,
class NormType>
77 public Trilinos::Details::LinearSolver<MV, OP, NormType>
109 }
else if (A !=
problem_->getOperator ()) {
117 return Teuchos::null;
125 TEUCHOS_TEST_FOR_EXCEPTION
127 std::runtime_error,
"Belos::Details::LinearSolver::solve: "
128 "The matrix A in the linear system to solve has not yet been set. "
129 "Please call setMatrix() with a nonnull input before calling solve().");
130 Teuchos::RCP<MV> X_ptr = Teuchos::rcpFromRef (X);
131 Teuchos::RCP<const MV> B_ptr = Teuchos::rcpFromRef (B);
152 if (!
solver_.is_null () && ! params.is_null ()) {
153 solver_->setParameters (params);
160 TEUCHOS_TEST_FOR_EXCEPTION
162 std::runtime_error,
"Belos::Details::LinearSolver::symbolic: "
163 "The matrix A in the linear system to solve has not yet been set. "
164 "Please call setMatrix() with a nonnull input before calling this method.");
174 TEUCHOS_TEST_FOR_EXCEPTION
176 std::runtime_error,
"Belos::Details::LinearSolver::numeric: "
177 "The matrix A in the linear system to solve has not yet been set. "
178 "Please call setMatrix() with a nonnull input before calling this method.");