Ifpack2 Templated Preconditioning Package Version 1.0
Loading...
Searching...
No Matches
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
16namespace Ifpack2 {
17
19void getValidParameters(Teuchos::ParameterList& params);
20
22
25template <typename T>
26void 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
Preconditioners and smoothers for Tpetra sparse matrices.
Definition Ifpack2_AdditiveSchwarz_decl.hpp:40
void getValidParameters(Teuchos::ParameterList &params)
Fills a list which contains all the parameters possibly used by Ifpack2.
Definition Ifpack2_Parameters.cpp:18
void getParameter(const Teuchos::ParameterList &params, 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