Ifpack Package Browser (Single Doxygen Collection)
Development
Loading...
Searching...
No Matches
src
Ifpack_ConfigDefs.h
Go to the documentation of this file.
1
/*@HEADER
2
// ***********************************************************************
3
//
4
// Ifpack: Object-Oriented Algebraic Preconditioner Package
5
// Copyright (2002) Sandia Corporation
6
//
7
// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8
// license for use of this work by or on behalf of the U.S. Government.
9
//
10
// Redistribution and use in source and binary forms, with or without
11
// modification, are permitted provided that the following conditions are
12
// met:
13
//
14
// 1. Redistributions of source code must retain the above copyright
15
// notice, this list of conditions and the following disclaimer.
16
//
17
// 2. Redistributions in binary form must reproduce the above copyright
18
// notice, this list of conditions and the following disclaimer in the
19
// documentation and/or other materials provided with the distribution.
20
//
21
// 3. Neither the name of the Corporation nor the names of the
22
// contributors may be used to endorse or promote products derived from
23
// this software without specific prior written permission.
24
//
25
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36
//
37
// Questions? Contact Michael A. Heroux (maherou@sandia.gov)
38
//
39
// ***********************************************************************
40
//@HEADER
41
*/
42
43
#ifndef _IFPACK_CONFIGDEFS_H_
44
#define _IFPACK_CONFIGDEFS_H_
45
46
/*
47
* The macros PACKAGE, PACKAGE_NAME, etc, get defined for each package and need to
48
* be undef'd here to avoid warnings when this file is included from another package.
49
* KL 11/25/02
50
*/
51
#ifdef PACKAGE
52
#undef PACKAGE
53
#endif
54
55
#ifdef PACKAGE_NAME
56
#undef PACKAGE_NAME
57
#endif
58
59
#ifdef PACKAGE_BUGREPORT
60
#undef PACKAGE_BUGREPORT
61
#endif
62
63
#ifdef PACKAGE_STRING
64
#undef PACKAGE_STRING
65
#endif
66
67
#ifdef PACKAGE_TARNAME
68
#undef PACKAGE_TARNAME
69
#endif
70
71
#ifdef PACKAGE_VERSION
72
#undef PACKAGE_VERSION
73
#endif
74
75
#ifdef VERSION
76
#undef VERSION
77
#endif
78
79
#include <Ifpack_config.h>
80
81
#ifdef PACKAGE
82
#undef PACKAGE
83
#endif
84
85
#ifdef PACKAGE_NAME
86
#undef PACKAGE_NAME
87
#endif
88
89
#ifdef PACKAGE_BUGREPORT
90
#undef PACKAGE_BUGREPORT
91
#endif
92
93
#ifdef PACKAGE_STRING
94
#undef PACKAGE_STRING
95
#endif
96
97
#ifdef PACKAGE_TARNAME
98
#undef PACKAGE_TARNAME
99
#endif
100
101
#ifdef PACKAGE_VERSION
102
#undef PACKAGE_VERSION
103
#endif
104
105
#ifdef VERSION
106
#undef VERSION
107
#endif
108
109
#ifdef HAVE_MPI
110
111
#ifndef EPETRA_MPI
112
#define EPETRA_MPI
113
#endif
114
115
#endif
116
117
#include <cstdio>
118
#include <string>
119
#include <iostream>
120
#include <algorithm>
121
#include <vector>
122
123
// prints out an error message if variable is not zero,
124
// and returns this value.
125
#define IFPACK_CHK_ERR(ifpack_err) \
126
{ if (ifpack_err < 0) { \
127
std::cerr << "IFPACK ERROR " << ifpack_err << ", " \
128
<< __FILE__ << ", line " << __LINE__ << std::endl; \
129
return(ifpack_err); } }
130
131
// prints out an error message if variable is not zero,
132
// and returns void
133
#define IFPACK_CHK_ERRV(ifpack_err) \
134
{ if (ifpack_err < 0) { \
135
std::cerr << "IFPACK ERROR " << ifpack_err << ", " \
136
<< __FILE__ << ", line " << __LINE__ << std::endl; \
137
return; } }
138
// prints out an error message and returns
139
#define IFPACK_RETURN(ifpack_err) \
140
{ if (ifpack_err < 0) { \
141
std::cerr << "IFPACK ERROR " << ifpack_err << ", " \
142
<< __FILE__ << ", line " << __LINE__ << std::endl; \
143
} return(ifpack_err); }
144
145
#define IFPACK_SGN(x) (((x) < 0.0) ? -1.0 : 1.0)
/* sign function */
146
#define IFPACK_ABS(x) (((x) > 0.0) ? (x) : (-x))
/* abs function */
147
148
#endif
/*_IFPACK_CONFIGDEFS_H_*/
Generated by
1.10.0