Teko  Version of the Day
 All Classes Files Functions Variables Pages
Teko_DiagonalPreconditionerOp.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_DiagonalPreconditionerOp_hpp__
11 #define __Teko_DiagonalPreconditionerOp_hpp__
12 #include "Teko_Utilities.hpp"
13 
14 #include "Teko_ImplicitLinearOp.hpp"
15 
16 class EpetraExt_PointToBlockDiagPermute;
17 
18 namespace Teko {
19 
20 class DiagonalPreconditionerOp : public ImplicitLinearOp {
21  public:
23  DiagonalPreconditionerOp(Teuchos::RCP<EpetraExt_PointToBlockDiagPermute> BDP,
24  const VectorSpace range, const VectorSpace domain);
25 
27  virtual VectorSpace range() const { return range_; }
28 
30  virtual VectorSpace domain() const { return domain_; }
31 
44  virtual void implicitApply(const MultiVector &x, MultiVector &y, const double alpha = 1.0,
45  const double beta = 0.0) const;
46 
47  virtual void describe(Teuchos::FancyOStream &out_arg,
48  const Teuchos::EVerbosityLevel verbLevel) const;
49 
50  Teuchos::RCP<EpetraExt_PointToBlockDiagPermute> get_BDP() const { return BDP_; }
51 
52  private:
53  Teuchos::RCP<EpetraExt_PointToBlockDiagPermute> BDP_;
54  const VectorSpace range_, domain_;
55 };
56 
57 } // end namespace Teko
58 
59 #endif