Teko  Version of the Day
 All Classes Files Functions Variables Pages
Teko_SolveInverseFactory.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_SolveInverseFactory_hpp__
11 #define __Teko_SolveInverseFactory_hpp__
12 
13 #include "Teko_InverseFactory.hpp"
14 
15 namespace Teko {
16 
17 class SolveInverseFactory : public InverseFactory {
18  public:
20 
21 
31  SolveInverseFactory(
32  const Teuchos::RCP<Thyra::LinearOpWithSolveFactoryBase<double> >& lowsFactory);
33 
35  SolveInverseFactory(const SolveInverseFactory& siFactory);
37 
38  virtual ~SolveInverseFactory() {}
39 
49  virtual InverseLinearOp buildInverse(const LinearOp& linearOp) const;
50 
63  virtual InverseLinearOp buildInverse(const LinearOp& linearOp, const LinearOp& precOp) const;
64 
76  virtual void rebuildInverse(const LinearOp& source, InverseLinearOp& dest) const;
77 
90  virtual void rebuildInverse(const LinearOp& source, const LinearOp& precOp,
91  InverseLinearOp& dest) const;
92 
101  virtual Teuchos::RCP<const Teuchos::ParameterList> getParameterList() const;
102 
104  Teuchos::RCP<const Thyra::LinearOpWithSolveFactoryBase<double> > getLowsFactory() const {
105  return lowsFactory_;
106  }
107 
109  virtual std::string toString() const { return lowsFactory_->description(); }
110 
111  protected:
112  Teuchos::RCP<Thyra::LinearOpWithSolveFactoryBase<double> > lowsFactory_;
113 
114  private:
115  // hide me!
116  SolveInverseFactory();
117 };
118 
119 } // end namespace Teko
120 
121 #endif
InverseLinearOp buildInverse(const InverseFactory &factory, const LinearOp &A, const LinearOp &precOp)
void rebuildInverse(const InverseFactory &factory, const LinearOp &A, const LinearOp &precOp, InverseLinearOp &invA)