10 #ifndef THYRA_BELOS_LINEAR_OP_WITH_SOLVE_FACTORY_DECL_HPP
11 #define THYRA_BELOS_LINEAR_OP_WITH_SOLVE_FACTORY_DECL_HPP
13 #include "Thyra_LinearOpWithSolveFactoryBase.hpp"
18 namespace Teuchos {
class ParameterList; }
25 enum EBelosSolverType {
26 SOLVER_TYPE_BLOCK_GMRES,
27 SOLVER_TYPE_PSEUDO_BLOCK_GMRES,
29 SOLVER_TYPE_PSEUDO_BLOCK_CG,
30 SOLVER_TYPE_PSEUDO_BLOCK_STOCHASTIC_CG,
36 SOLVER_TYPE_FIXEDPOINT,
37 SOLVER_TYPE_TPETRA_GMRES,
38 SOLVER_TYPE_TPETRA_GMRES_PIPELINE,
39 SOLVER_TYPE_TPETRA_GMRES_SINGLE_REDUCE,
40 SOLVER_TYPE_TPETRA_GMRES_SSTEP
46 std::istream& is, EBelosSolverType& sType)
50 sType = (EBelosSolverType)intval;
62 template<
class Scalar>
126 const Teuchos::RCP<PreconditionerFactoryBase<Scalar> > &precFactory
137 const Teuchos::RCP<PreconditionerFactoryBase<Scalar> > &precFactory
138 ,
const std::string &precFactoryName
144 Teuchos::RCP<PreconditionerFactoryBase<Scalar> > *precFactory
145 ,std::string *precFactoryName
148 bool isCompatible(
const LinearOpSourceBase<Scalar> &fwdOpSrc )
const;
153 const Teuchos::RCP<
const LinearOpSourceBase<Scalar> > &fwdOpSrc
154 ,LinearOpWithSolveBase<Scalar> *Op
155 ,
const ESupportSolveUse supportSolveUse
159 const Teuchos::RCP<
const LinearOpSourceBase<Scalar> > &fwdOpSrc
160 ,LinearOpWithSolveBase<Scalar> *Op
164 LinearOpWithSolveBase<Scalar> *Op
165 ,
Teuchos::RCP<
const LinearOpSourceBase<Scalar> > *fwdOpSrc
167 ,
Teuchos::RCP<
const LinearOpSourceBase<Scalar> > *approxFwdOpSrc
168 ,ESupportSolveUse *supportSolveUse
174 const Teuchos::RCP<
const LinearOpSourceBase<Scalar> > &fwdOpSrc
175 ,
const Teuchos::RCP<
const PreconditionerBase<Scalar> > &prec
176 ,LinearOpWithSolveBase<Scalar> *Op
177 ,
const ESupportSolveUse supportSolveUse
181 const Teuchos::RCP<
const LinearOpSourceBase<Scalar> > &fwdOpSrc
182 ,
const Teuchos::RCP<
const LinearOpSourceBase<Scalar> > &approxFwdOpSrc
183 ,LinearOpWithSolveBase<Scalar> *Op
184 ,
const ESupportSolveUse supportSolveUse
236 const Teuchos::RCP<
const LinearOpSourceBase<Scalar> > &fwdOpSrc
237 ,
const Teuchos::RCP<
const LinearOpSourceBase<Scalar> > &approxFwdOpSrc
238 ,
const Teuchos::RCP<
const PreconditionerBase<Scalar> > &prec
239 ,
const bool reusePrec
240 ,LinearOpWithSolveBase<Scalar> *Op
241 ,
const ESupportSolveUse supportSolveUse
250 #endif // THYRA_BELOS_LINEAR_OP_WITH_SOLVE_FACTORY_DECL_HPP
void updateThisValidParamList()
static const std::string TpetraGmresPipeline_name
static const std::string BlockGMRES_name
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
static const std::string RCG_name
void uninitializeOp(LinearOpWithSolveBase< Scalar > *Op, Teuchos::RCP< const LinearOpSourceBase< Scalar > > *fwdOpSrc, Teuchos::RCP< const PreconditionerBase< Scalar > > *prec, Teuchos::RCP< const LinearOpSourceBase< Scalar > > *approxFwdOpSrc, ESupportSolveUse *supportSolveUse) const
static const std::string MINRES_name
EBelosSolverType solverType_
void initializeAndReuseOp(const Teuchos::RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, LinearOpWithSolveBase< Scalar > *Op) const
static const std::string FixedPoint_name
static Teuchos::RCP< const Teuchos::ParameterList > generateAndGetValidParameters()
static const std::string SolverTypes_name
void unsetPreconditionerFactory(Teuchos::RCP< PreconditionerFactoryBase< Scalar > > *precFactory, std::string *precFactoryName)
void setParameterList(Teuchos::RCP< Teuchos::ParameterList > const ¶mList)
static const std::string ConvergenceTestFrequency_name
bool isCompatible(const LinearOpSourceBase< Scalar > &fwdOpSrc) const
static const std::string BiCGStab_name
std::istringstream & operator>>(std::istringstream &in, TwoDArray< T > &array)
static const std::string BlockCG_name
static const std::string PseudoBlockGMRES_name
static const std::string TpetraGmres_name
bool acceptsPreconditionerFactory() const
Returns true .
int convergenceTestFrequency_
static const std::string PseudoBlockCG_name
Teuchos::RCP< Teuchos::ParameterList > getNonconstParameterList()
void initializeOp(const Teuchos::RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, LinearOpWithSolveBase< Scalar > *Op, const ESupportSolveUse supportSolveUse) const
std::string description() const
void setPreconditionerFactory(const Teuchos::RCP< PreconditionerFactoryBase< Scalar > > &precFactory, const std::string &precFactoryName)
LinearOpWithSolveFactoryBase subclass implemented in terms of Belos.
bool supportsPreconditionerInputType(const EPreconditionerInputType precOpType) const
Teuchos::ScalarTraits< Scalar >::magnitudeType MagnitudeType
Teuchos::RCP< const Teuchos::ParameterList > getParameterList() const
Teuchos::RCP< PreconditionerFactoryBase< Scalar > > getPreconditionerFactory() const
Teuchos::RCP< Teuchos::ParameterList > thisValidParamList_
static const std::string PseudoBlockStochasticCG_name
void initializeApproxPreconditionedOp(const Teuchos::RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, const Teuchos::RCP< const LinearOpSourceBase< Scalar > > &approxFwdOpSrc, LinearOpWithSolveBase< Scalar > *Op, const ESupportSolveUse supportSolveUse) const
static const std::string SolverType_default
void initializePreconditionedOp(const Teuchos::RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, const Teuchos::RCP< const PreconditionerBase< Scalar > > &prec, LinearOpWithSolveBase< Scalar > *Op, const ESupportSolveUse supportSolveUse) const
Teuchos::RCP< LinearOpWithSolveBase< Scalar > > createOp() const
Teuchos::RCP< Teuchos::ParameterList > paramList_
BelosLinearOpWithSolveFactory()
Construct without preconditioner factory.
Teuchos::RCP< PreconditionerFactoryBase< Scalar > > precFactory_
void initializeOpImpl(const Teuchos::RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, const Teuchos::RCP< const LinearOpSourceBase< Scalar > > &approxFwdOpSrc, const Teuchos::RCP< const PreconditionerBase< Scalar > > &prec, const bool reusePrec, LinearOpWithSolveBase< Scalar > *Op, const ESupportSolveUse supportSolveUse) const
std::string precFactoryName_
Teuchos::RCP< Teuchos::ParameterList > unsetParameterList()
static const std::string SolverType_name
static const std::string TFQMR_name
static const std::string TpetraGmresSingleReduce_name
static const std::string GCRODR_name
static const std::string TpetraGmresSstep_name