Teko Version of the Day
Loading...
Searching...
No Matches
Teko_NeumannSeriesPreconditionerFactoryDecl.hpp
1// @HEADER
2// *****************************************************************************
3// Teko: A package for block and physics based preconditioning
4//
5// Copyright 2010 NTESS and the Teko contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef __Teko_NeumannSeriesPreconditionerFactoryDecl_hpp__
11#define __Teko_NeumannSeriesPreconditionerFactoryDecl_hpp__
12
13#include "Teuchos_ParameterListAcceptor.hpp"
14
15// Thyra includes
16#include "Thyra_PreconditionerFactoryBase.hpp"
17
18// Teko includes
19#include "Teko_Utilities.hpp"
20
21namespace Teko {
22
23using Teuchos::RCP;
24
25template <typename ScalarT>
26class NeumannSeriesPreconditionerFactory
27 : public virtual Thyra::PreconditionerFactoryBase<ScalarT> {
28 public:
29 NeumannSeriesPreconditionerFactory();
30
32 bool isCompatible(const Thyra::LinearOpSourceBase<ScalarT> &fwdOpSrc) const;
33
35 RCP<Thyra::PreconditionerBase<ScalarT> > createPrec() const;
36
47 void initializePrec(const RCP<const Thyra::LinearOpSourceBase<ScalarT> > &fwdOpSrc,
48 const RCP<const Thyra::MultiVectorBase<ScalarT> > &solnVec,
49 Thyra::PreconditionerBase<ScalarT> *precOp,
50 const Thyra::ESupportSolveUse supportSolveUse) const;
51
60 void initializePrec(const RCP<const Thyra::LinearOpSourceBase<ScalarT> > &fwdOpSrc,
61 Thyra::PreconditionerBase<ScalarT> *precOp,
62 const Thyra::ESupportSolveUse supportSolveUse) const;
63
65 void uninitializePrec(Thyra::PreconditionerBase<ScalarT> *prec,
66 RCP<const Thyra::LinearOpSourceBase<ScalarT> > *fwdOpSrc,
67 Thyra::ESupportSolveUse *supportSolveUse) const;
68
71
73 void setParameterList(Teuchos::RCP<Teuchos::ParameterList> const &paramList);
74
76 Teuchos::RCP<Teuchos::ParameterList> getNonconstParameterList();
77
79 Teuchos::RCP<Teuchos::ParameterList> unsetParameterList();
80
82 Teuchos::RCP<const Teuchos::ParameterList> getParameterList() const;
83
85 Teuchos::RCP<const Teuchos::ParameterList> getValidParameters() const;
87
90
92 std::string description() const;
93
95
96 protected:
98 Teuchos::RCP<Teuchos::ParameterList> paramList_;
99
100 int numberOfTerms_;
101 Teko::DiagonalType scalingType_;
102};
103
104} // end namespace Teko
105
106#endif