Stratimikos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Thyra_AmesosLinearOpWithSolveFactory.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_AMESOS_LINEAR_OP_WITH_SOLVE_FACTORY_HPP
11 #define THYRA_AMESOS_LINEAR_OP_WITH_SOLVE_FACTORY_HPP
12 
13 #include "Thyra_LinearOpWithSolveFactoryBase.hpp"
14 #include "Thyra_AmesosTypes.hpp"
15 #include "Amesos_BaseSolver.h"
19 
20 namespace Thyra {
21 
48 class AmesosLinearOpWithSolveFactory : public LinearOpWithSolveFactoryBase<double> {
49 public:
50 
53 
55  static const std::string SolverType_name;
57  static const std::string RefactorizationPolicy_name;
59  static const std::string ThrowOnPreconditionerInput_name;
61  static const std::string Amesos_Settings_name;
62 
64 
67 
70 
74  const Amesos::ESolverType solverType
75 #ifdef HAVE_AMESOS_KLU
76  = Amesos::KLU
77 #else
79 #endif
81  ,const bool throwOnPrecInput = true
82  );
83 
93 
95 
98 
102  bool isCompatible( const LinearOpSourceBase<double> &fwdOpSrc ) const;
103 
106 
108  void initializeOp(
109  const Teuchos::RCP<const LinearOpSourceBase<double> > &fwdOpSrc
110  ,LinearOpWithSolveBase<double> *Op
111  ,const ESupportSolveUse supportSolveUse
112  ) const;
113 
115  bool supportsPreconditionerInputType(const EPreconditionerInputType precOpType) const;
116 
121  const Teuchos::RCP<const LinearOpSourceBase<double> > &fwdOpSrc
122  ,const Teuchos::RCP<const PreconditionerBase<double> > &prec
123  ,LinearOpWithSolveBase<double> *Op
124  ,const ESupportSolveUse supportSolveUse
125  ) const;
126 
131  const Teuchos::RCP<const LinearOpSourceBase<double> > &fwdOpSrc
132  ,const Teuchos::RCP<const LinearOpSourceBase<double> > &approxFwdOpSrc
133  ,LinearOpWithSolveBase<double> *Op
134  ,const ESupportSolveUse supportSolveUse
135  ) const;
136 
138  void uninitializeOp(
139  LinearOpWithSolveBase<double> *Op
140  ,Teuchos::RCP<const LinearOpSourceBase<double> > *fwdOpSrc
141  ,Teuchos::RCP<const PreconditionerBase<double> > *prec
142  ,Teuchos::RCP<const LinearOpSourceBase<double> > *approxFwdOpSrc
143  ,ESupportSolveUse *supportSolveUse
144  ) const;
145 
147 
150 
161 
163 
166 
168  std::string description() const;
169 
171 
172 private:
173 
174  // /////////////////////////
175  // Private data members
176 
181 
182  // /////////////////////////
183  // Private member functions
184 
187 
188 };
189 
190 } // namespace Thyra
191 
192 #endif // THYRA_AMESOS_LINEAR_OP_WITH_SOLVE_FACTORY_HPP
Concrete LinearOpWithSolveFactoryBase adapter subclass that uses Amesos direct solvers.
ERefactorizationPolicy
The policy used on refactoring a matrix.
bool supportsPreconditionerInputType(const EPreconditionerInputType precOpType) const
Returns false .
bool isCompatible(const LinearOpSourceBase< double > &fwdOpSrc) const
Returns true if dynamic_cast&lt;const EpetraLinearOpBase*&gt;(fwdOpSrc)!=NULL .
Teuchos::RCP< const Teuchos::ParameterList > getParameterList() const
void setParameterList(Teuchos::RCP< Teuchos::ParameterList > const &paramList)
Teuchos::RCP< Teuchos::ParameterList > getNonconstParameterList()
void uninitializeOp(LinearOpWithSolveBase< double > *Op, Teuchos::RCP< const LinearOpSourceBase< double > > *fwdOpSrc, Teuchos::RCP< const PreconditionerBase< double > > *prec, Teuchos::RCP< const LinearOpSourceBase< double > > *approxFwdOpSrc, ESupportSolveUse *supportSolveUse) const
Completely new pivoting will be used on refactorizations!
Teuchos::RCP< LinearOpWithSolveBase< double > > createOp() const
void initializeOp(const Teuchos::RCP< const LinearOpSourceBase< double > > &fwdOpSrc, LinearOpWithSolveBase< double > *Op, const ESupportSolveUse supportSolveUse) const
static Teuchos::RCP< const Teuchos::ParameterList > generateAndGetValidParameters()
void initializePreconditionedOp(const Teuchos::RCP< const LinearOpSourceBase< double > > &fwdOpSrc, const Teuchos::RCP< const PreconditionerBase< double > > &prec, LinearOpWithSolveBase< double > *Op, const ESupportSolveUse supportSolveUse) const
Throws exception if this-&gt;throwOnPrecInput()==true and calls this-&gt;initializeOp(fwdOpSrc,Op) otherwise.
AmesosLinearOpWithSolveFactory(const Amesos::ESolverType solverType=Amesos::LAPACK, const Amesos::ERefactorizationPolicy refactorizationPolicy=Amesos::REPIVOT_ON_REFACTORIZATION, const bool throwOnPrecInput=true)
Constructor which sets the defaults.
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
STANDARD_COMPOSITION_MEMBERS(EpetraOperatorViewExtractorBase, epetraFwdOpViewExtractor)
Set the strategy object used to extract an Epetra_Operator view of an input forward operator...
Teuchos::RCP< Teuchos::ParameterList > unsetParameterList()