Ifpack2 Templated Preconditioning Package
Version 1.0
Toggle main menu visibility
Loading...
Searching...
No Matches
src
Ifpack2_Parameters.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_PARAMETERS_HPP
11
#define IFPACK2_PARAMETERS_HPP
12
13
#include "Ifpack2_ConfigDefs.hpp"
14
#include "Teuchos_ParameterList.hpp"
15
16
namespace
Ifpack2
{
17
19
void
getValidParameters
(Teuchos::ParameterList& params);
20
22
25
template
<
typename
T>
26
void
getParameter
(
const
Teuchos::ParameterList& params,
const
std::string& name, T& value) {
27
if
(params.isParameter(name)) {
28
if
(params.isType<T>(name)) {
29
value = params.get<T>(name);
30
}
31
}
32
}
33
34
}
// namespace Ifpack2
35
36
#endif
Ifpack2
Preconditioners and smoothers for Tpetra sparse matrices.
Definition
Ifpack2_AdditiveSchwarz_decl.hpp:40
Ifpack2::getValidParameters
void getValidParameters(Teuchos::ParameterList ¶ms)
Fills a list which contains all the parameters possibly used by Ifpack2.
Definition
Ifpack2_Parameters.cpp:18
Ifpack2::getParameter
void getParameter(const Teuchos::ParameterList ¶ms, const std::string &name, T &value)
Set a value from a ParameterList if a parameter with the specified name exists.
Definition
Ifpack2_Parameters.hpp:26
Generated by
1.17.0