43 #ifndef IFPACK2_FACTORY_DECL_HPP
44 #define IFPACK2_FACTORY_DECL_HPP
46 #include "Ifpack2_ConfigDefs.hpp"
48 #include "Ifpack2_Details_Factory.hpp"
50 #include "Ifpack2_Chebyshev.hpp"
51 #include "Ifpack2_RILUK.hpp"
52 #include "Ifpack2_Experimental_RBILUK.hpp"
54 #include <type_traits>
127 template<
class MatrixType>
130 typename MatrixType::local_ordinal_type,
131 typename MatrixType::global_ordinal_type,
132 typename MatrixType::node_type> >
137 using Teuchos::rcp_implicit_cast;
138 typedef typename MatrixType::scalar_type SC;
139 typedef typename MatrixType::local_ordinal_type LO;
140 typedef typename MatrixType::global_ordinal_type GO;
141 typedef typename MatrixType::node_type NT;
142 typedef Tpetra::RowMatrix<SC, LO, GO, NT> row_matrix_type;
144 RCP<const row_matrix_type> A;
146 A = rcp_implicit_cast<
const row_matrix_type> (matrix);
148 Ifpack2::Details::Factory<SC, LO, GO, NT> factory;
149 return factory.create (precType, A);
167 template<
class MatrixType>
170 typename MatrixType::local_ordinal_type,
171 typename MatrixType::global_ordinal_type,
172 typename MatrixType::node_type> >
178 using Teuchos::rcp_implicit_cast;
179 typedef typename MatrixType::scalar_type SC;
180 typedef typename MatrixType::local_ordinal_type LO;
181 typedef typename MatrixType::global_ordinal_type GO;
182 typedef typename MatrixType::node_type NT;
183 typedef Tpetra::RowMatrix<SC, LO, GO, NT> row_matrix_type;
185 RCP<const row_matrix_type> A;
187 A = rcp_implicit_cast<
const row_matrix_type> (matrix);
189 Ifpack2::Details::Factory<SC, LO, GO, NT> factory;
190 return factory.create (precType, A, overlap);
193 template<
class MatrixType>
196 isSupported (
const std::string& precType)
198 typedef typename MatrixType::scalar_type SC;
199 typedef typename MatrixType::local_ordinal_type LO;
200 typedef typename MatrixType::global_ordinal_type GO;
201 typedef typename MatrixType::node_type NT;
203 Ifpack2::Details::Factory<SC, LO, GO, NT> factory;
204 return factory.isSupported (precType);
211 #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:56
Interface for all Ifpack2 preconditioners.
Definition: Ifpack2_Preconditioner.hpp:107
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:133
"Factory" for creating Ifpack2 preconditioners.
Definition: Ifpack2_Factory_decl.hpp:115
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:173