Debian Codegraph @

packages/stratimikos/adapters/ml/src/Thyra_MLPreconditionerFactory.hpp

raw
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_ML_PRECONDITIONER_FACTORY_DECL_HPP
11 #define THYRA_ML_PRECONDITIONER_FACTORY_DECL_HPP
12
13
14 #include "Thyra_PreconditionerFactoryBase.hpp"
15 #include "Thyra_EpetraOperatorViewExtractorBase.hpp"
16 #include "Teuchos_StandardCompositionMacros.hpp"
17
18 namespace Thyra {
19
20
21 /** \brief Concrete preconditioner factory subclass based on ML.
22 *
23 * For information on ML and its available options, please see the ML <A HREF=http://trilinos.sandia.gov/packages/ml/index.html>home page</A> or the ML User <A HREF="http://trilinos.sandia.gov/packages/ml/manuals.html">manuals</A>.
24 */
25 class MLPreconditionerFactory : public PreconditionerFactoryBase<double> {
26 public:
27
28 /** @name Constructors/initializers/accessors */
29 //@{
30
31 /** \brief . */
32 MLPreconditionerFactory();
33
34 /** \brief Set the strategy object used to extract an
35 * <tt>Epetra_Operator</tt> view of an input forward operator.
36 *
37 * This view will then be dynamically casted to <tt>Epetra_RowMatrix</tt>
38 * before it is used.
39 *
40 * The default implementation used is <tt>EpetraOperatorViewExtractorBase</tt>.
41 */
42 STANDARD_COMPOSITION_MEMBERS(
43 EpetraOperatorViewExtractorBase, epetraFwdOpViewExtractor );
44
45 //@}
46
47 /** @name Overridden from PreconditionerFactoryBase */
48 //@{
49
50 /** \brief . */
51 bool isCompatible( const LinearOpSourceBase<double> &fwdOp ) const;
52 /** \brief . */
53 bool applySupportsConj(EConj conj) const;
54 /** \brief . */
55 bool applyTransposeSupportsConj(EConj conj) const;
56 /** \brief . */
57 Teuchos::RCP<PreconditionerBase<double> > createPrec() const;
58 /** \brief . */
59 void initializePrec(
60 const Teuchos::RCP<const LinearOpSourceBase<double> > &fwdOp,
61 PreconditionerBase<double> *prec,
62 const ESupportSolveUse supportSolveUse
63 ) const;
64 /** \brief . */
65 void uninitializePrec(
66 PreconditionerBase<double> *prec
67 ,Teuchos::RCP<const LinearOpSourceBase<double> > *fwdOp
68 ,ESupportSolveUse *supportSolveUse
69 ) const;
70
71 //@}
72
73 /** @name Overridden from Teuchos::ParameterListAcceptor */
74 //@{
75
76 /** \brief . */
77 void setParameterList(
78 Teuchos::RCP<Teuchos::ParameterList> const& paramList);
79 /** \brief . */
80 Teuchos::RCP<Teuchos::ParameterList> getNonconstParameterList();
81 /** \brief . */
82 Teuchos::RCP<Teuchos::ParameterList> unsetParameterList();
83 /** \brief . */
84 Teuchos::RCP<const Teuchos::ParameterList> getParameterList() const;
85 /** \brief . */
86 Teuchos::RCP<const Teuchos::ParameterList> getValidParameters() const;
87 //@}
88
89 /** \name Public functions overridden from Describable. */
90 //@{
91
92 /** \brief . */
93 std::string description() const;
94
95 // ToDo: Add an override of describe(...) to give more detail!
96
97 //@}
98
99 private:
100
101 Teuchos::RCP<Teuchos::ParameterList> paramList_;
102
103 };
104
105
106 } // namespace Thyra
107
108
109 #endif // THYRA_ML_PRECONDITIONER_FACTORY_DECL_HPP