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{
23 typedef Teuchos::ScalarTraits<Scalar> STS;
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
31namespace 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
70
71} // namespace Ifpack2
72
73#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:41