Stratimikos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Thyra_Amesos2LinearOpWithSolveFactory_decl.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Stratimikos: Thyra-based strategies for linear solvers
4 //
5 // Copyright 2006 NTESS and the Stratimikos contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef THYRA_AMESOS2_LINEAR_OP_WITH_SOLVE_FACTORY_DECL_HPP
11 #define THYRA_AMESOS2_LINEAR_OP_WITH_SOLVE_FACTORY_DECL_HPP
12 
13 #include "Thyra_LinearOpWithSolveFactoryBase.hpp"
15 #include "Thyra_Amesos2Types.hpp"
16 #include "Amesos2.hpp"
17 #include "Amesos2_Version.hpp"
23 
24 namespace Thyra {
25 
26 template<typename Scalar>
27 class Amesos2LinearOpWithSolveFactory : public LinearOpWithSolveFactoryBase<Scalar> {
28 public:
33 
36 
38  static const std::string SolverType_name;
40  static const std::string RefactorizationPolicy_name;
42  static const std::string ThrowOnPreconditionerInput_name;
44  static const std::string Amesos2_Settings_name;
45 
47 
50 
53 
57  const Amesos2::ESolverType solverType
58 #ifdef HAVE_AMESOS2_KLU2
59  = Amesos2::KLU2,
60 #else
62 #endif
63  const Amesos2::ERefactorizationPolicy refactorizationPolicy
65  const bool throwOnPrecInput = true
66  );
67 
69 
72 
74  bool isCompatible( const LinearOpSourceBase<Scalar> &fwdOpSrc ) const;
75 
78 
80  void initializeOp(
81  const Teuchos::RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
82  LinearOpWithSolveBase<Scalar> *Op,
83  const ESupportSolveUse supportSolveUse
84  ) const;
85 
87  bool supportsPreconditionerInputType(const EPreconditionerInputType precOpType) const;
88 
93  const Teuchos::RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
94  const Teuchos::RCP<const PreconditionerBase<Scalar> > &prec,
95  LinearOpWithSolveBase<Scalar> *Op,
96  const ESupportSolveUse supportSolveUse
97  ) const;
98 
103  const Teuchos::RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
104  const Teuchos::RCP<const LinearOpSourceBase<Scalar> > &approxFwdOpSrc,
105  LinearOpWithSolveBase<Scalar> *Op,
106  const ESupportSolveUse supportSolveUse
107  ) const;
108 
110  void uninitializeOp(
111  LinearOpWithSolveBase<Scalar> *Op,
112  Teuchos::RCP<const LinearOpSourceBase<Scalar> > *fwdOpSrc,
113  Teuchos::RCP<const PreconditionerBase<Scalar> > *prec,
114  Teuchos::RCP<const LinearOpSourceBase<Scalar> > *approxFwdOpSrc,
115  ESupportSolveUse *supportSolveUse
116  ) const;
117 
119 
122 
133 
135 
138 
140  std::string description() const;
141 
143 
144 private:
145 
146  // /////////////////////////
147  // Private data members
148 
153 
154  // /////////////////////////
155  // Private member functions
156 
159 
160 };
161 
162 } // namespace Thyra
163 
164 #endif // THYRA_AMESOS2_LINEAR_OP_WITH_SOLVE_FACTORY_HPP
Teuchos::RCP< Teuchos::ParameterList > getNonconstParameterList()
static Teuchos::RCP< const Teuchos::ParameterList > generateAndGetValidParameters()
Teuchos::RCP< LinearOpWithSolveBase< Scalar > > createOp() const
typename Amesos2LinearOpWithSolve< Scalar >::ConverterT ConverterT
void initializeOp(const Teuchos::RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, LinearOpWithSolveBase< Scalar > *Op, const ESupportSolveUse supportSolveUse) const
void initializePreconditionedOp(const Teuchos::RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, const Teuchos::RCP< const PreconditionerBase< Scalar > > &prec, LinearOpWithSolveBase< Scalar > *Op, const ESupportSolveUse supportSolveUse) const
Throws exception if this-&gt;throwOnPrecInput()==true and calls this-&gt;initializeOp(fwdOpSrc,Op) otherwise.
Completely new pivoting will be used on refactorizations!
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
ERefactorizationPolicy
The policy used on refactoring a matrix.
typename Amesos2LinearOpWithSolve< Scalar >::MAT MAT
void setParameterList(Teuchos::RCP< Teuchos::ParameterList > const &paramList)
typename Amesos2LinearOpWithSolve< Scalar >::Solver Solver
typename Amesos2LinearOpWithSolve< Scalar >::MV MV
bool isCompatible(const LinearOpSourceBase< Scalar > &fwdOpSrc) const
Teuchos::RCP< const Teuchos::ParameterList > getParameterList() const
bool supportsPreconditionerInputType(const EPreconditionerInputType precOpType) const
Returns false .
Amesos2LinearOpWithSolveFactory(const Amesos2::ESolverType solverType=Amesos2::LAPACK, const Amesos2::ERefactorizationPolicy refactorizationPolicy=Amesos2::REPIVOT_ON_REFACTORIZATION, const bool throwOnPrecInput=true)
Constructor which sets the defaults.
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