10 #ifndef THYRA_AMESOS2_LINEAR_OP_WITH_SOLVE_DECL_HPP
11 #define THYRA_AMESOS2_LINEAR_OP_WITH_SOLVE_DECL_HPP
13 #include "Thyra_LinearOpWithSolveBase.hpp"
14 #include "Thyra_LinearOpSourceBase.hpp"
15 #include <Tpetra_Map.hpp>
16 #include <Tpetra_MultiVector.hpp>
17 #include <Tpetra_CrsMatrix.hpp>
21 #include "Thyra_DefaultDiagonalLinearOp.hpp"
22 #include "Thyra_LinearOpTester.hpp"
24 #include "Amesos2.hpp"
25 #include "Amesos2_Version.hpp"
26 #include "Amesos2_Solver.hpp"
37 template<
typename Scalar>
41 using MAT = Tpetra::CrsMatrix<Scalar>;
42 using Op = Tpetra::Operator<Scalar>;
43 using MV = Tpetra::MultiVector<Scalar>;
44 using Solver = ::Amesos2::Solver<MAT, MV>;
56 const Teuchos::RCP<
const LinearOpSourceBase<Scalar> > &fwdOpSrc,
58 const EOpTransp amesos2SolverTransp,
59 const Scalar amesos2SolverScalar
65 const Teuchos::RCP<
const LinearOpSourceBase<Scalar> > &fwdOpSrc,
117 const EOpTransp M_trans,
118 const MultiVectorBase<Scalar> &X,
119 const Ptr<MultiVectorBase<Scalar> > &Y,
131 EOpTransp M_trans,
const SolveMeasureType& solveMeasureType
135 const EOpTransp M_trans,
136 const MultiVectorBase<Scalar> &
B,
137 const Ptr<MultiVectorBase<Scalar> > &X,
138 const Ptr<
const SolveCriteria<Scalar> > solveCriteria
155 template<
typename Scalar>
163 template<
typename Scalar>
168 return amesos2Solver_;
171 template<
typename Scalar>
181 #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...