44 #ifndef THYRA_AMESOS2_LINEAR_OP_WITH_SOLVE_DECL_HPP
45 #define THYRA_AMESOS2_LINEAR_OP_WITH_SOLVE_DECL_HPP
47 #include "Thyra_LinearOpWithSolveBase.hpp"
48 #include "Thyra_LinearOpSourceBase.hpp"
49 #include <Tpetra_Map.hpp>
50 #include <Tpetra_MultiVector.hpp>
51 #include <Tpetra_CrsMatrix.hpp>
55 #include "Thyra_DefaultDiagonalLinearOp.hpp"
56 #include "Thyra_LinearOpTester.hpp"
58 #include "Amesos2.hpp"
59 #include "Amesos2_Version.hpp"
60 #include "Amesos2_Solver.hpp"
71 template<
typename Scalar>
75 using MAT = Tpetra::CrsMatrix<Scalar>;
76 using Op = Tpetra::Operator<Scalar>;
77 using MV = Tpetra::MultiVector<Scalar>;
78 using Solver = ::Amesos2::Solver<MAT, MV>;
90 const Teuchos::RCP<
const LinearOpSourceBase<Scalar> > &fwdOpSrc,
92 const EOpTransp amesos2SolverTransp,
93 const Scalar amesos2SolverScalar
99 const Teuchos::RCP<
const LinearOpSourceBase<Scalar> > &fwdOpSrc,
151 const EOpTransp M_trans,
152 const MultiVectorBase<Scalar> &X,
153 const Ptr<MultiVectorBase<Scalar> > &Y,
165 EOpTransp M_trans,
const SolveMeasureType& solveMeasureType
169 const EOpTransp M_trans,
170 const MultiVectorBase<Scalar> &
B,
171 const Ptr<MultiVectorBase<Scalar> > &X,
172 const Ptr<
const SolveCriteria<Scalar> > solveCriteria
189 template<
typename Scalar>
197 template<
typename Scalar>
202 return amesos2Solver_;
205 template<
typename Scalar>
215 #endif // THYRA_AMESOS2_LINEAR_OP_WITH_SOLVE_HPP
virtual bool solveSupportsSolveMeasureTypeImpl(EOpTransp M_trans, const SolveMeasureType &solveMeasureType) const
void assertInitialized() const
void initialize(const Teuchos::RCP< const LinearOpBase< Scalar > > &fwdOp, const Teuchos::RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, const Teuchos::RCP< Solver > &amesos2Solver)
Initialize after construction.
SolveStatus< Scalar > solveImpl(const EOpTransp M_trans, const MultiVectorBase< Scalar > &B, const Ptr< MultiVectorBase< Scalar > > &X, const Ptr< const SolveCriteria< Scalar > > solveCriteria) const
Tpetra::Operator< Scalar > Op
virtual void applyImpl(const EOpTransp M_trans, const MultiVectorBase< Scalar > &X, const Ptr< MultiVectorBase< Scalar > > &Y, const Scalar alpha, const Scalar beta) const
std::string description() const
Teuchos::RCP< Solver > get_amesos2Solver()
Concrete LinearOpWithSolveBase subclass in terms of Amesos2.
Teuchos::RCP< const LinearOpBase< Scalar > > fwdOp_
virtual bool opSupportedImpl(EOpTransp M_trans) const
Teuchos::RCP< const LinearOpSourceBase< Scalar > > fwdOpSrc_
Teuchos::RCP< const VectorSpaceBase< Scalar > > domain() const
Teuchos::RCP< const LinearOpBase< Scalar > > clone() const
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
Tpetra::MultiVector< Scalar > MV
Teuchos::RCP< const LinearOpBase< Scalar > > get_fwdOp() const
Teuchos::RCP< const VectorSpaceBase< Scalar > > range() const
virtual bool solveSupportsImpl(EOpTransp M_trans) const
Teuchos::RCP< const LinearOpSourceBase< Scalar > > get_fwdOpSrc() const
Teuchos::RCP< Solver > amesos2Solver_
::Amesos2::Solver< MAT, MV > Solver
Tpetra::CrsMatrix< Scalar > MAT
Amesos2LinearOpWithSolve()
Construct to uninitialized.
Teuchos::RCP< const LinearOpSourceBase< Scalar > > extract_fwdOpSrc()
Extract the forward LinearOpSourceBase<double> object so that it can be modified and remove it from t...