45 #ifndef THYRA_BELOS_LINEAR_OP_WITH_SOLVE_FACTORY_DECL_HPP
46 #define THYRA_BELOS_LINEAR_OP_WITH_SOLVE_FACTORY_DECL_HPP
48 #include "Thyra_LinearOpWithSolveFactoryBase.hpp"
52 namespace Teuchos {
class ParameterList; }
56 enum EBelosSolverType {
57 SOLVER_TYPE_BLOCK_GMRES,
58 SOLVER_TYPE_PSEUDO_BLOCK_GMRES,
60 SOLVER_TYPE_PSEUDO_BLOCK_CG,
61 SOLVER_TYPE_PSEUDO_BLOCK_STOCHASTIC_CG,
69 std::istream& is, EBelosSolverType& sType)
73 sType = (EBelosSolverType)intval;
85 template<
class Scalar>
137 const Teuchos::RCP<PreconditionerFactoryBase<Scalar> > &precFactory
148 const Teuchos::RCP<PreconditionerFactoryBase<Scalar> > &precFactory
149 ,
const std::string &precFactoryName
155 Teuchos::RCP<PreconditionerFactoryBase<Scalar> > *precFactory
156 ,std::string *precFactoryName
159 bool isCompatible(
const LinearOpSourceBase<Scalar> &fwdOpSrc )
const;
164 const Teuchos::RCP<
const LinearOpSourceBase<Scalar> > &fwdOpSrc
165 ,LinearOpWithSolveBase<Scalar> *Op
166 ,
const ESupportSolveUse supportSolveUse
170 const Teuchos::RCP<
const LinearOpSourceBase<Scalar> > &fwdOpSrc
171 ,LinearOpWithSolveBase<Scalar> *Op
175 LinearOpWithSolveBase<Scalar> *Op
176 ,
Teuchos::RCP<
const LinearOpSourceBase<Scalar> > *fwdOpSrc
178 ,
Teuchos::RCP<
const LinearOpSourceBase<Scalar> > *approxFwdOpSrc
179 ,ESupportSolveUse *supportSolveUse
185 const Teuchos::RCP<
const LinearOpSourceBase<Scalar> > &fwdOpSrc
186 ,
const Teuchos::RCP<
const PreconditionerBase<Scalar> > &prec
187 ,LinearOpWithSolveBase<Scalar> *Op
188 ,
const ESupportSolveUse supportSolveUse
192 const Teuchos::RCP<
const LinearOpSourceBase<Scalar> > &fwdOpSrc
193 ,
const Teuchos::RCP<
const LinearOpSourceBase<Scalar> > &approxFwdOpSrc
194 ,LinearOpWithSolveBase<Scalar> *Op
195 ,
const ESupportSolveUse supportSolveUse
247 const Teuchos::RCP<
const LinearOpSourceBase<Scalar> > &fwdOpSrc
248 ,
const Teuchos::RCP<
const LinearOpSourceBase<Scalar> > &approxFwdOpSrc
249 ,
const Teuchos::RCP<
const PreconditionerBase<Scalar> > &prec
250 ,
const bool reusePrec
251 ,LinearOpWithSolveBase<Scalar> *Op
252 ,
const ESupportSolveUse supportSolveUse
261 #endif // THYRA_BELOS_LINEAR_OP_WITH_SOLVE_FACTORY_DECL_HPP
void updateThisValidParamList()
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 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
std::istringstream & operator>>(std::istringstream &in, TwoDArray< T > &array)
static const std::string BlockCG_name
static const std::string PseudoBlockGMRES_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 GCRODR_name