Teko Version of the Day
Loading...
Searching...
No Matches
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
16namespace Tpetra {
17namespace Ext {
18template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
19class PointToBlockDiagPermute;
20}
21} // namespace Tpetra
22
23namespace Teko {
24
25class DiagonalPreconditionerOp : public ImplicitLinearOp {
26 public:
28 DiagonalPreconditionerOp(Teuchos::RCP<Tpetra::Ext::PointToBlockDiagPermute<ST, LO, GO, NT>> BDP,
29 const VectorSpace range, const VectorSpace domain);
30
32 virtual VectorSpace range() const { return range_; }
33
35 virtual VectorSpace domain() const { return domain_; }
36
49 virtual void implicitApply(const MultiVector &x, MultiVector &y, const double alpha = 1.0,
50 const double beta = 0.0) const;
51
52 virtual void describe(Teuchos::FancyOStream &out_arg,
53 const Teuchos::EVerbosityLevel verbLevel) const;
54
55 Teuchos::RCP<Tpetra::Ext::PointToBlockDiagPermute<ST, LO, GO, NT>> get_BDP() const {
56 return BDP_;
57 }
58
59 private:
60 Teuchos::RCP<Tpetra::Ext::PointToBlockDiagPermute<ST, LO, GO, NT>> BDP_;
61 const VectorSpace range_, domain_;
62};
63
64} // end namespace Teko
65
66#endif