Ifpack_ConfigDefs.h

00001 /*@HEADER
00002 // ***********************************************************************
00003 // 
00004 //       Ifpack: Object-Oriented Algebraic Preconditioner Package
00005 //                 Copyright (2002) Sandia Corporation
00006 // 
00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00008 // license for use of this work by or on behalf of the U.S. Government.
00009 // 
00010 // This library is free software; you can redistribute it and/or modify
00011 // it under the terms of the GNU Lesser General Public License as
00012 // published by the Free Software Foundation; either version 2.1 of the
00013 // License, or (at your option) any later version.
00014 //  
00015 // This library is distributed in the hope that it will be useful, but
00016 // WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 // Lesser General Public License for more details.
00019 //  
00020 // You should have received a copy of the GNU Lesser General Public
00021 // License along with this library; if not, write to the Free Software
00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00023 // USA
00024 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 
00025 // 
00026 // ***********************************************************************
00027 //@HEADER
00028 */
00029 
00030 #ifndef _IFPACK_CONFIGDEFS_H_
00031 #define _IFPACK_CONFIGDEFS_H_
00032 
00033 #ifndef TRILINOS_NO_CONFIG_H
00034 
00035 /*
00036  * The macros PACKAGE, PACKAGE_NAME, etc, get defined for each package and need to
00037  * be undef'd here to avoid warnings when this file is included from another package.
00038  * KL 11/25/02
00039  */
00040 #ifdef PACKAGE
00041 #undef PACKAGE
00042 #endif
00043 
00044 #ifdef PACKAGE_NAME
00045 #undef PACKAGE_NAME
00046 #endif
00047 
00048 #ifdef PACKAGE_BUGREPORT
00049 #undef PACKAGE_BUGREPORT
00050 #endif
00051 
00052 #ifdef PACKAGE_STRING
00053 #undef PACKAGE_STRING
00054 #endif
00055 
00056 #ifdef PACKAGE_TARNAME
00057 #undef PACKAGE_TARNAME
00058 #endif
00059 
00060 #ifdef PACKAGE_VERSION
00061 #undef PACKAGE_VERSION
00062 #endif
00063 
00064 #ifdef VERSION
00065 #undef VERSION
00066 #endif
00067 
00068 #include <Ifpack_config.h>
00069 
00070 #ifdef PACKAGE
00071 #undef PACKAGE
00072 #endif
00073 
00074 #ifdef PACKAGE_NAME
00075 #undef PACKAGE_NAME
00076 #endif
00077 
00078 #ifdef PACKAGE_BUGREPORT
00079 #undef PACKAGE_BUGREPORT
00080 #endif
00081 
00082 #ifdef PACKAGE_STRING
00083 #undef PACKAGE_STRING
00084 #endif
00085 
00086 #ifdef PACKAGE_TARNAME
00087 #undef PACKAGE_TARNAME
00088 #endif
00089 
00090 #ifdef PACKAGE_VERSION
00091 #undef PACKAGE_VERSION
00092 #endif
00093 
00094 #ifdef VERSION
00095 #undef VERSION
00096 #endif
00097 
00098 #ifdef HAVE_MPI
00099 
00100 #ifndef EPETRA_MPI
00101 #define EPETRA_MPI
00102 #endif
00103 
00104 #endif
00105 
00106 
00107 /******************************************************************************
00108  *   Choose header file flavor: either ANSI-style (no .h, e.g. <iostream>) or
00109  * old-style (with .h, e.g., <iostream.h>). 
00110  * KL 9/26/03
00111  *****************************************************************************/
00112 
00113 #if HAVE_CSTDIO
00114 #include <cstdio>
00115 #elif HAVE_STDIO_H
00116 #include <stdio.h>
00117 #else
00118 #error "Found neither cstdio nor stdio.h"
00119 #endif
00120 
00121 #if HAVE_STRING
00122 #include <string>
00123 #elif HAVE_STRING_H
00124 #include <string.h>
00125 #else
00126 #error "Found neither string nor string.h"
00127 #endif
00128 
00129 #if HAVE_IOSTREAM
00130 #include <iostream>
00131 #elif HAVE_IOSTREAM_H
00132 #include <iostream.h>
00133 #else
00134 #error "Found neither iostream nor iostream.h"
00135 #endif
00136 
00137 #ifdef HAVE_ALGORITHM
00138 #include <algorithm>
00139 #elif defined(HAVE_ALGO_H)
00140 #include <algo.h>
00141 #elif defined(HAVE_ALGORITHM_H)
00142 #include <algorithm.h>
00143 #else
00144 #error "Did not find algorithm, algo.h or algorithm.h"
00145 #endif
00146 
00147 #if HAVE_VECTOR
00148 #include <vector>
00149 #elif HAVE_IOSTREAM_H
00150 #include <vector.h>
00151 #else
00152 #error "Found neither vector nor vector.h"
00153 #endif
00154 
00155 #if defined(TFLOP)
00156 #ifdef HAVE_STRING
00157 using std::string;
00158 #endif
00159 #ifdef HAVE_IOSTREAM
00160 using std::istream;
00161 using std::ostream;
00162 using std::cerr;
00163 using std::cout;
00164 using std::endl;
00165 #endif
00166 #else /* NOT TFLOP */
00167 using namespace std;
00168 #endif /* defined(TFLOP) */
00169 
00170 #endif
00171 
00172 // prints out an error message if variable is not zero,
00173 // and returns this value.
00174 #define IFPACK_CHK_ERR(ifpack_err) \
00175 { if (ifpack_err < 0) { \
00176   std::cerr << "IFPACK ERROR " << ifpack_err << ", " \
00177     << __FILE__ << ", line " << __LINE__ << std::endl; \
00178     return(ifpack_err);  } }
00179 
00180 // prints out an error message if variable is not zero,
00181 // and returns void
00182 #define IFPACK_CHK_ERRV(ifpack_err) \
00183 { if (ifpack_err < 0) { \
00184   std::cerr << "IFPACK ERROR " << ifpack_err << ", " \
00185     << __FILE__ << ", line " << __LINE__ << std::endl; \
00186     return;  } }
00187 // prints out an error message and returns
00188 #define IFPACK_RETURN(ifpack_err) \
00189 { if (ifpack_err < 0) { \
00190   std::cerr << "IFPACK ERROR " << ifpack_err << ", " \
00191     << __FILE__ << ", line " << __LINE__ << std::endl; \
00192                } return(ifpack_err); }
00193 
00194 #define IFPACK_SGN(x) (((x) < 0.0) ? -1.0 : 1.0)  /* sign function */
00195 #define IFPACK_ABS(x) (((x) > 0.0) ? (x) : (-x))  /* abs function */
00196 
00197 #endif /*_IFPACK_CONFIGDEFS_H_*/

Generated on Wed May 12 21:46:03 2010 for IFPACK by  doxygen 1.4.7