Ifpack2 Templated Preconditioning Package  Version 1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Ifpack2_Details_InverseDiagonalKernel_decl.hpp
1 // @HEADER
2 // *****************************************************************************
3 // Ifpack2: Templated Object-Oriented Algebraic Preconditioner Package
4 //
5 // Copyright 2009 NTESS and the Ifpack2 contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
15 
16 #ifndef IFPACK2_DETAILS_INVERSEDIAGONALKERNEL_DECL_HPP
17 #define IFPACK2_DETAILS_INVERSEDIAGONALKERNEL_DECL_HPP
18 
19 #include "Ifpack2_config.h"
20 #include "Tpetra_CrsMatrix_fwd.hpp"
21 #include "Tpetra_MultiVector_fwd.hpp"
22 #include "Tpetra_Operator_fwd.hpp"
23 #include "Tpetra_Vector_fwd.hpp"
24 #include "Tpetra_Export_fwd.hpp"
25 #include "Tpetra_Import_fwd.hpp"
26 #include "Teuchos_RCP.hpp"
27 #include <memory>
28 
29 namespace Ifpack2 {
30 namespace Details {
31 
44 template<class TpetraOperatorType>
46 private:
47  using SC = typename TpetraOperatorType::scalar_type;
48  using LO = typename TpetraOperatorType::local_ordinal_type;
49  using GO = typename TpetraOperatorType::global_ordinal_type;
50  using NT = typename TpetraOperatorType::node_type;
51 
52  using crs_matrix_type = Tpetra::CrsMatrix<SC, LO, GO, NT>;
53  using multivector_type = Tpetra::MultiVector<SC, LO, GO, NT>;
54  using operator_type = Tpetra::Operator<SC, LO, GO, NT>;
55  using vector_type = Tpetra::Vector<SC, LO, GO, NT>;
56  using magnitude_type = typename Teuchos::ScalarTraits<SC>::magnitudeType;
57  using device_type = typename NT::device_type;
58  using offset_type = Kokkos::View<size_t*, device_type>;
59 
60 public:
62 
63  void
64  setMatrix (const Teuchos::RCP<const operator_type>& A);
65 
66  void
67  compute (vector_type& D_inv,
68  bool do_l1, magnitude_type L1Eta,
69  bool fixTinyDiagEntries, magnitude_type MinDiagonalValue);
70 
71 private:
74  offset_type offsets_;
75 
76 };
77 
78 } // namespace Details
79 } // namespace Ifpack2
80 
81 #endif // IFPACK2_DETAILS_INVERSEINVERSEDIAGONALKERNEL_DECL_HPP
Compute scaled damped residual for Chebyshev.
Definition: Ifpack2_Details_InverseDiagonalKernel_decl.hpp:45