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)
22 {
24  typedef typename STS::magnitudeType magnitudeType;
25  static const magnitudeType one = STS::magnitude(STS::one());
26  return STS::real(x) > 0.0 ? magnitudeType(-one) : one;
27 }
28 
31 namespace Ifpack2 {
32  typedef Tpetra::global_size_t global_size_t;
33 
40  namespace Details {
46  enum RelaxationType {
47  JACOBI,
48  GS,
49  SGS,
50  MTGS,
51  MTSGS,
52  MTSPLITJACOBI,
53  RICHARDSON,
54  GS2,
55  SGS2
56  };
57  } // namespace Details
58 
63  namespace Experimental {
64  }
65 
69  namespace DeprecatedAndMayDisappearAtAnyTime {}
70 
71 } // namespace Ifpack2
72 
73 #endif /*_IFPACK2_CONFIGDEFS_HPP_*/