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"
94 template<
class MatrixType>
97 typename MatrixType::local_ordinal_type,
98 typename MatrixType::global_ordinal_type,
99 typename MatrixType::node_type> >
101 const Teuchos::RCP<const MatrixType>& matrix)
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;
111 RCP<const row_matrix_type> A;
112 if (! matrix.is_null ()) {
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> >
141 const Teuchos::RCP<const MatrixType>& matrix,
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;
152 RCP<const row_matrix_type> A;
153 if (! matrix.is_null ()) {
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);
"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)
Create an instance of Ifpack2_Preconditioner given the string name of the preconditioner type.
Definition Ifpack2_Factory_decl.hpp:100
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
Interface for all Ifpack2 preconditioners.
Definition Ifpack2_Preconditioner.hpp:75
Preconditioners and smoothers for Tpetra sparse matrices.
Definition Ifpack2_AdditiveSchwarz_decl.hpp:41
bool supportsUnsymmetric(const std::string &prec_type)
\C true if the specified preconditioner type supports nonsymmetric matrices, else false.
Definition Ifpack2_Factory.cpp:22