Ifpack2 Templated Preconditioning Package Version 1.0
Loading...
Searching...
No Matches
Ifpack2_ConfigDefs.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_CONFIGDEFS_HPP_
11#define _IFPACK2_CONFIGDEFS_HPP_
12
13#include <Ifpack2_config.h>
14#include <Teuchos_ScalarTraits.hpp>
15#include <Tpetra_ConfigDefs.hpp>
16
17// The sgn function isn't well defined for complex.
18// Is it correct to operate on the real part of x as is done below?
19template <class Scalar>
20typename Teuchos::ScalarTraits<Scalar>::magnitudeType
21IFPACK2_SGN(const Scalar& x) {
22 typedef Teuchos::ScalarTraits<Scalar> STS;
23 typedef typename STS::magnitudeType magnitudeType;
24 static const magnitudeType one = STS::magnitude(STS::one());
25 return STS::real(x) > 0.0 ? magnitudeType(-one) : one;
26}
27
30namespace Ifpack2 {
31typedef Tpetra::global_size_t global_size_t;
32
39namespace Details {
45enum RelaxationType {
46 JACOBI,
47 GS,
48 SGS,
49 MTGS,
50 MTSGS,
51 MTSPLITJACOBI,
52 RICHARDSON,
53 GS2,
54 SGS2
55};
56} // namespace Details
57
62namespace Experimental {
63}
64
69
70} // namespace Ifpack2
71
72#endif /*_IFPACK2_CONFIGDEFS_HPP_*/
Ifpack2 features that have been DEPRECATED and may DISAPPEAR AT ANY TIME. USE AT YOUR OWN RISK.
Ifpack2 implementation details.
Ifpack2 features that are experimental. Use at your own risk.
Preconditioners and smoothers for Tpetra sparse matrices.
Definition Ifpack2_AdditiveSchwarz_decl.hpp:40