Ifpack2 Templated Preconditioning Package
Version 1.0
Toggle main menu visibility
Loading...
Searching...
No Matches
src
Ifpack2_Details_OneLevelFactory_decl.hpp
1
// @HEADER
2
// *****************************************************************************
3
// Ifpack2: Templated Object-Oriented Algebraic Preconditioner Package
4
//
5
// Copyright 2009 NTESS and the Ifpack2 contributors.
6
// SPDX-License-Identifier: BSD-3-Clause
7
// *****************************************************************************
8
// @HEADER
9
10
#ifndef IFPACK2_DETAILS_ONELEVELFACTORY_DECL_HPP
11
#define IFPACK2_DETAILS_ONELEVELFACTORY_DECL_HPP
12
13
#include "Ifpack2_ConfigDefs.hpp"
14
#include "
Ifpack2_Preconditioner.hpp
"
15
#include "Tpetra_RowMatrix.hpp"
16
#include <type_traits>
// std::is_same
17
18
namespace
Ifpack2
{
19
namespace
Details {
20
91
template
<
class
MatrixType>
92
class
OneLevelFactory
{
93
public
:
94
typedef
typename
MatrixType::scalar_type scalar_type;
95
typedef
typename
MatrixType::local_ordinal_type local_ordinal_type;
96
typedef
typename
MatrixType::global_ordinal_type global_ordinal_type;
97
typedef
typename
MatrixType::node_type node_type;
98
typedef
::Ifpack2::Preconditioner
<scalar_type,
99
local_ordinal_type,
100
global_ordinal_type,
101
node_type>
102
prec_type;
103
typedef
::Tpetra::RowMatrix<scalar_type,
104
local_ordinal_type,
105
global_ordinal_type,
106
node_type>
107
row_matrix_type;
108
109
static_assert
(std::is_same<MatrixType, row_matrix_type>::value,
110
"Ifpack2::Details::OneLevelFactory: MatrixType must be a "
111
"Tpetra::RowMatrix specialization."
);
112
123
Teuchos::RCP<prec_type>
124
create
(
const
std::string& precType,
125
const
Teuchos::RCP<const row_matrix_type>& matrix)
const
;
126
127
std::vector<std::string>
128
getSupportedNames()
const
;
129
130
bool
131
isSupported(
const
std::string& precType)
const
;
132
};
133
134
}
// namespace Details
135
}
// namespace Ifpack2
136
137
#endif
// IFPACK2_DETAILS_ONELEVELFACTORY_DECL_HPP
Ifpack2_Preconditioner.hpp
Ifpack2::Details::OneLevelFactory
"Factory" for creating single-level preconditioners.
Definition
Ifpack2_Details_OneLevelFactory_decl.hpp:92
Ifpack2::Details::OneLevelFactory::create
Teuchos::RCP< prec_type > create(const std::string &precType, const Teuchos::RCP< const row_matrix_type > &matrix) const
Create an instance of Preconditioner given the string name of the preconditioner type.
Definition
Ifpack2_Details_OneLevelFactory_def.hpp:52
Ifpack2::Preconditioner
Interface for all Ifpack2 preconditioners.
Definition
Ifpack2_Preconditioner.hpp:74
Ifpack2
Preconditioners and smoothers for Tpetra sparse matrices.
Definition
Ifpack2_AdditiveSchwarz_decl.hpp:40
Generated by
1.17.0