Teko  Version of the Day
 All Classes Files Functions Variables Pages
Teko_PreconditionerInverseFactory.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_PreconditionerInverseFactory_hpp__
11 #define __Teko_PreconditionerInverseFactory_hpp__
12 
13 #include "Teko_InverseFactory.hpp"
14 
15 namespace Teko {
16 
17 class PreconditionerInverseFactory : public InverseFactory {
18  public:
21 
23 
24 
34  PreconditionerInverseFactory(
35  const Teuchos::RCP<Thyra::PreconditionerFactoryBase<double> >& precFactory,
36  const Teuchos::RCP<Teko::RequestHandler>& rh);
37 
52  PreconditionerInverseFactory(
53  const Teuchos::RCP<Thyra::PreconditionerFactoryBase<double> >& precFactory,
54  const Teuchos::RCP<const Teuchos::ParameterList>& xtraParam,
55  const Teuchos::RCP<Teko::RequestHandler>& rh);
56 
58  PreconditionerInverseFactory(const PreconditionerInverseFactory& pFactory);
60 
61  virtual ~PreconditionerInverseFactory() {}
62 
75  virtual InverseLinearOp buildInverse(const LinearOp& linearOp) const;
76 
89  virtual InverseLinearOp buildInverse(const LinearOp& linearOp,
90  const PreconditionerState& parentState) const;
91 
106  virtual void rebuildInverse(const LinearOp& source, InverseLinearOp& dest) const;
107 
116  virtual Teuchos::RCP<const Teuchos::ParameterList> getParameterList() const;
117 
132  virtual Teuchos::RCP<Teuchos::ParameterList> getRequestedParameters() const;
133 
147  virtual bool updateRequestedParameters(const Teuchos::ParameterList& pl);
148 
150  virtual std::string toString() const { return precFactory_->description(); }
151 
153  Teuchos::RCP<const Thyra::PreconditionerFactoryBase<double> > getPrecFactory() const {
154  return precFactory_;
155  }
156 
158  Teuchos::RCP<Thyra::PreconditionerFactoryBase<double> > getPrecFactory() { return precFactory_; }
159 
168  void setupParameterListFromRequestHandler();
169 
170  protected:
171  Teuchos::RCP<Thyra::PreconditionerFactoryBase<double> > precFactory_;
172  Teuchos::RCP<Teuchos::ParameterList> extraParams_;
173 
174  private:
175  // hide me!
176  PreconditionerInverseFactory();
177 };
178 
179 } // namespace Teko
180 
181 #endif
virtual InverseLinearOp buildInverse(const LinearOp &linearOp) const =0
Build an inverse operator.
virtual InverseLinearOp buildInverse(const LinearOp &linearOp, const LinearOp &) const
Build a preconditioned inverse operator.
virtual void rebuildInverse(const LinearOp &source, const LinearOp &, InverseLinearOp &dest) const
Pass in an already constructed inverse operator. Update the inverse operator based on the new source ...
virtual void rebuildInverse(const LinearOp &source, InverseLinearOp &dest) const =0
Pass in an already constructed inverse operator. Update the inverse operator based on the new source ...