Ifpack2 Templated Preconditioning Package  Version 1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
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?
19 template <class Scalar>
21 IFPACK2_SGN(const Scalar& x) {
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 
30 namespace Ifpack2 {
31 typedef Tpetra::global_size_t global_size_t;
32 
39 namespace Details {
45 enum RelaxationType {
46  JACOBI,
47  GS,
48  SGS,
49  MTGS,
50  MTSGS,
51  MTSPLITJACOBI,
52  RICHARDSON,
53  GS2,
54  SGS2
55 };
56 } // namespace Details
57 
62 namespace Experimental {
63 }
64 
68 namespace DeprecatedAndMayDisappearAtAnyTime {}
69 
70 } // namespace Ifpack2
71 
72 #endif /*_IFPACK2_CONFIGDEFS_HPP_*/