50 #ifndef IFPACK2_KRYLOV_DECL_HPP
51 #define IFPACK2_KRYLOV_DECL_HPP
53 #include "Ifpack2_ConfigDefs.hpp"
54 #ifdef HAVE_IFPACK2_DEPRECATED_CODE
60 #include "BelosTpetraAdapter.hpp"
62 #include <type_traits>
69 namespace DeprecatedAndMayDisappearAtAnyTime {
81 template <
typename ScalarType>
82 struct BelosScalarType {
83 typedef ScalarType type;
100 template<
class MatrixType>
101 class IFPACK2_DEPRECATED Krylov :
103 typename MatrixType::local_ordinal_type,
104 typename MatrixType::global_ordinal_type,
105 typename MatrixType::node_type>,
107 typename MatrixType::local_ordinal_type,
108 typename MatrixType::global_ordinal_type,
109 typename MatrixType::node_type> >
116 typedef typename MatrixType::scalar_type scalar_type;
119 typedef typename BelosScalarType<scalar_type>::type belos_scalar_type;
122 typedef typename MatrixType::local_ordinal_type local_ordinal_type;
125 typedef typename MatrixType::global_ordinal_type global_ordinal_type;
128 typedef typename MatrixType::node_type node_type;
134 typedef Tpetra::RowMatrix<scalar_type,
137 node_type> row_matrix_type;
139 static_assert(std::is_same<MatrixType, row_matrix_type>::value,
"Ifpack2::Krylov: The template parameter MatrixType must be a Tpetra::RowMatrix specialization. Please don't use Tpetra::CrsMatrix (a subclass of Tpetra::RowMatrix) here anymore. The constructor can take either a RowMatrix or a CrsMatrix just fine.");
145 node_type> prec_type;
181 inline bool isInitialized ()
const {
182 return IsInitialized_;
189 inline bool isComputed()
const {
227 apply (
const Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type>& X,
228 Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type>& Y,
240 bool hasTransposeApply()
const;
253 int getNumInitialize()
const;
256 int getNumCompute()
const;
259 int getNumApply()
const;
262 double getInitializeTime()
const;
265 double getComputeTime()
const;
268 double getApplyTime()
const;
274 std::string description()
const;
286 Krylov (
const Krylov<MatrixType>& RHS);
289 Krylov<MatrixType>& operator= (
const Krylov<MatrixType>& RHS);
302 std::string iterationType_;
308 magnitude_type resTol_;
314 bool ZeroStartingSolution_;
321 int PreconditionerType_;
338 mutable int NumApply_;
340 double InitializeTime_;
344 mutable double ApplyTime_;
348 Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type>,
349 Tpetra::Operator<scalar_type,local_ordinal_type,global_ordinal_type,node_type> > > belosProblem_;
353 Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type>,
354 Tpetra::Operator<scalar_type,local_ordinal_type,global_ordinal_type,node_type> > > belosSolver_;
363 #endif // HAVE_IFPACK2_DEPRECATED_CODE
364 #endif // IFPACK2_KRYLOV_DECL_HPP
Mix-in interface for preconditioners that can change their matrix after construction.
Definition: Ifpack2_Details_CanChangeMatrix.hpp:93
Interface for all Ifpack2 preconditioners.
Definition: Ifpack2_Preconditioner.hpp:107
Declaration of interface for preconditioners that can change their matrix after construction.
static const EVerbosityLevel verbLevel_default