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"
127 template<
class MatrixType>
130 typename MatrixType::local_ordinal_type,
131 typename MatrixType::global_ordinal_type,
132 typename MatrixType::node_type> >
134 const Teuchos::RCP<const MatrixType>& matrix)
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;
145 if (! matrix.is_null ()) {
146 A = rcp_implicit_cast<const row_matrix_type> (matrix);
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> >
174 const Teuchos::RCP<const MatrixType>& matrix,
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;
186 if (! matrix.is_null ()) {
187 A = rcp_implicit_cast<const row_matrix_type> (matrix);
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;
204 return factory.isSupported (precType);
Ifpack2's implementation of Trilinos::Details::LinearSolver interface.
Definition Ifpack2_Details_LinearSolver_decl.hpp:110
"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)
Create an instance of Ifpack2_Preconditioner given the string name of the preconditioner type.
Definition Ifpack2_Factory_decl.hpp:133
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
Interface for all Ifpack2 preconditioners.
Definition Ifpack2_Preconditioner.hpp:108
Preconditioners and smoothers for Tpetra sparse matrices.
Definition Ifpack2_AdditiveSchwarz_decl.hpp:74
bool supportsUnsymmetric(const std::string &prec_type)
\C true if the specified preconditioner type supports nonsymmetric matrices, else false.
Definition Ifpack2_Factory.cpp:56