10 #ifndef IFPACK2_FACTORY_DECL_HPP
11 #define IFPACK2_FACTORY_DECL_HPP
13 #include "Ifpack2_ConfigDefs.hpp"
15 #include "Ifpack2_Details_Factory.hpp"
17 #include "Ifpack2_Chebyshev.hpp"
18 #include "Ifpack2_RILUK.hpp"
19 #include "Ifpack2_Experimental_RBILUK.hpp"
21 #include <type_traits>
94 template<
class MatrixType>
97 typename MatrixType::local_ordinal_type,
98 typename MatrixType::global_ordinal_type,
99 typename MatrixType::node_type> >
104 using Teuchos::rcp_implicit_cast;
105 typedef typename MatrixType::scalar_type SC;
106 typedef typename MatrixType::local_ordinal_type LO;
107 typedef typename MatrixType::global_ordinal_type GO;
108 typedef typename MatrixType::node_type NT;
109 typedef Tpetra::RowMatrix<SC, LO, GO, NT> row_matrix_type;
111 RCP<const row_matrix_type> A;
113 A = rcp_implicit_cast<
const row_matrix_type> (matrix);
115 Ifpack2::Details::Factory<SC, LO, GO, NT> factory;
116 return factory.create (precType, A);
134 template<
class MatrixType>
137 typename MatrixType::local_ordinal_type,
138 typename MatrixType::global_ordinal_type,
139 typename MatrixType::node_type> >
145 using Teuchos::rcp_implicit_cast;
146 typedef typename MatrixType::scalar_type SC;
147 typedef typename MatrixType::local_ordinal_type LO;
148 typedef typename MatrixType::global_ordinal_type GO;
149 typedef typename MatrixType::node_type NT;
150 typedef Tpetra::RowMatrix<SC, LO, GO, NT> row_matrix_type;
152 RCP<const row_matrix_type> A;
154 A = rcp_implicit_cast<
const row_matrix_type> (matrix);
156 Ifpack2::Details::Factory<SC, LO, GO, NT> factory;
157 return factory.create (precType, A, overlap);
160 template<
class MatrixType>
163 isSupported (
const std::string& precType)
165 typedef typename MatrixType::scalar_type SC;
166 typedef typename MatrixType::local_ordinal_type LO;
167 typedef typename MatrixType::global_ordinal_type GO;
168 typedef typename MatrixType::node_type NT;
170 Ifpack2::Details::Factory<SC, LO, GO, NT> factory;
171 return factory.isSupported (precType);
178 #endif // IFPACK2_FACTORY_DECL_HPP
bool supportsUnsymmetric(const std::string &prec_type)
true if the specified preconditioner type supports nonsymmetric matrices, else false.
Definition: Ifpack2_Factory.cpp:22
Interface for all Ifpack2 preconditioners.
Definition: Ifpack2_Preconditioner.hpp:74
static Teuchos::RCP< Preconditioner< typename MatrixType::scalar_type, typename MatrixType::local_ordinal_type, typename MatrixType::global_ordinal_type, typename MatrixType::node_type > > create(const std::string &precType, const Teuchos::RCP< const MatrixType > &matrix)
Create an instance of Ifpack2_Preconditioner given the string name of the preconditioner type...
Definition: Ifpack2_Factory_decl.hpp:100
"Factory" for creating Ifpack2 preconditioners.
Definition: Ifpack2_Factory_decl.hpp:82
static Teuchos::RCP< Preconditioner< typename MatrixType::scalar_type, typename MatrixType::local_ordinal_type, typename MatrixType::global_ordinal_type, typename MatrixType::node_type > > create(const std::string &precType, const Teuchos::RCP< const MatrixType > &matrix, const int overlap)
Create an instance of Ifpack2_Preconditioner given the string name of the preconditioner type...
Definition: Ifpack2_Factory_decl.hpp:140