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 /*
00034  * The macros PACKAGE, PACKAGE_NAME, etc, get defined for each package and need to
00035  * be undef'd here to avoid warnings when this file is included from another package.
00036  * KL 11/25/02
00037  */
00038 #ifdef PACKAGE
00039 #undef PACKAGE
00040 #endif
00041 
00042 #ifdef PACKAGE_NAME
00043 #undef PACKAGE_NAME
00044 #endif
00045 
00046 #ifdef PACKAGE_BUGREPORT
00047 #undef PACKAGE_BUGREPORT
00048 #endif
00049 
00050 #ifdef PACKAGE_STRING
00051 #undef PACKAGE_STRING
00052 #endif
00053 
00054 #ifdef PACKAGE_TARNAME
00055 #undef PACKAGE_TARNAME
00056 #endif
00057 
00058 #ifdef PACKAGE_VERSION
00059 #undef PACKAGE_VERSION
00060 #endif
00061 
00062 #ifdef VERSION
00063 #undef VERSION
00064 #endif
00065 
00066 #include <Ifpack_config.h>
00067 
00068 #ifdef PACKAGE
00069 #undef PACKAGE
00070 #endif
00071 
00072 #ifdef PACKAGE_NAME
00073 #undef PACKAGE_NAME
00074 #endif
00075 
00076 #ifdef PACKAGE_BUGREPORT
00077 #undef PACKAGE_BUGREPORT
00078 #endif
00079 
00080 #ifdef PACKAGE_STRING
00081 #undef PACKAGE_STRING
00082 #endif
00083 
00084 #ifdef PACKAGE_TARNAME
00085 #undef PACKAGE_TARNAME
00086 #endif
00087 
00088 #ifdef PACKAGE_VERSION
00089 #undef PACKAGE_VERSION
00090 #endif
00091 
00092 #ifdef VERSION
00093 #undef VERSION
00094 #endif
00095 
00096 #ifdef HAVE_MPI
00097 
00098 #ifndef EPETRA_MPI
00099 #define EPETRA_MPI
00100 #endif
00101 
00102 #endif
00103 
00104 #include <cstdio>
00105 #include <string>
00106 #include <iostream>
00107 #include <algorithm>
00108 #include <vector>
00109 using std::string;
00110 using std::istream;
00111 using std::ostream;
00112 using std::cerr;
00113 using std::cout;
00114 using std::endl;
00115 using namespace std;
00116 /* 2008/11/20: rabartl: ToDo: Above: Get rid of using namespace std! */
00117 
00118 // prints out an error message if variable is not zero,
00119 // and returns this value.
00120 #define IFPACK_CHK_ERR(ifpack_err) \
00121 { if (ifpack_err < 0) { \
00122   std::cerr << "IFPACK ERROR " << ifpack_err << ", " \
00123     << __FILE__ << ", line " << __LINE__ << std::endl; \
00124     return(ifpack_err);  } }
00125 
00126 // prints out an error message if variable is not zero,
00127 // and returns void
00128 #define IFPACK_CHK_ERRV(ifpack_err) \
00129 { if (ifpack_err < 0) { \
00130   std::cerr << "IFPACK ERROR " << ifpack_err << ", " \
00131     << __FILE__ << ", line " << __LINE__ << std::endl; \
00132     return;  } }
00133 // prints out an error message and returns
00134 #define IFPACK_RETURN(ifpack_err) \
00135 { if (ifpack_err < 0) { \
00136   std::cerr << "IFPACK ERROR " << ifpack_err << ", " \
00137     << __FILE__ << ", line " << __LINE__ << std::endl; \
00138                } return(ifpack_err); }
00139 
00140 #define IFPACK_SGN(x) (((x) < 0.0) ? -1.0 : 1.0)  /* sign function */
00141 #define IFPACK_ABS(x) (((x) > 0.0) ? (x) : (-x))  /* abs function */
00142 
00143 #endif /*_IFPACK_CONFIGDEFS_H_*/
 All Classes Files Functions Variables Enumerations Friends
Generated on Wed Apr 13 10:05:22 2011 for IFPACK by  doxygen 1.6.3