|
IFPACK Development
|
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_H 00031 #define IFPACK_H 00032 00033 00034 #include "Ifpack_ConfigDefs.h" 00035 #include "Ifpack_Preconditioner.h" 00036 #include "Teuchos_iostream_helpers.hpp" 00037 00038 00039 #ifdef HAVE_HYPRE 00040 #include "Ifpack_Hypre.h" 00041 #endif 00042 00043 00045 00125 class Ifpack { 00126 public: 00127 00129 enum EPrecType { 00130 POINT_RELAXATION 00131 ,POINT_RELAXATION_STAND_ALONE 00132 ,BLOCK_RELAXATION 00133 ,BLOCK_RELAXATION_STAND_ALONE 00134 ,BLOCK_RELAXATION_STAND_ALONE_ILU 00135 #ifdef HAVE_IFPACK_AMESOS 00136 ,BLOCK_RELAXATION_STAND_ALONE_AMESOS 00137 ,BLOCK_RELAXATION_AMESOS 00138 ,AMESOS 00139 ,AMESOS_STAND_ALONE 00140 #endif // HAVE_IFPACK_AMESOS 00141 ,IC 00142 ,IC_STAND_ALONE 00143 ,ICT 00144 ,ICT_STAND_ALONE 00145 ,ILU 00146 ,ILU_STAND_ALONE 00147 ,ILUT 00148 ,ILUT_STAND_ALONE 00149 #ifdef HAVE_IFPACK_SPARSKIT 00150 ,SPARSKIT 00151 #endif // HAVE_IFPACK_SPARSKIT 00152 #ifdef HAVE_IFPACK_HIPS 00153 ,HIPS 00154 #endif 00155 #ifdef HAVE_HYPRE 00156 ,HYPRE 00157 #endif 00158 #ifdef HAVE_IFPACK_SUPERLU 00159 ,SILU 00160 #endif 00161 ,CHEBYSHEV 00162 ,IHSS 00163 ,SORA 00164 }; 00165 00167 static const int numPrecTypes = 00168 +5 00169 #ifdef HAVE_IFPACK_AMESOS 00170 +4 00171 #endif 00172 +8 00173 #ifdef HAVE_IFPACK_SPARSKIT 00174 +1 00175 #endif 00176 #ifdef HAVE_IFPACK_HIPS 00177 +1 00178 #endif 00179 #ifdef HAVE_HYPRE 00180 +1 00181 #endif 00182 #ifdef HAVE_IFPACK_SUPERLU 00183 +1 00184 #endif 00185 +3 00186 ; 00187 00189 static const EPrecType precTypeValues[numPrecTypes]; 00190 00192 static const char* precTypeNames[numPrecTypes]; 00193 00196 static const bool supportsUnsymmetric[numPrecTypes]; 00197 00200 static const char* toString(const EPrecType precType) 00201 { return precTypeNames[precType]; } 00202 00212 static Ifpack_Preconditioner* Create( 00213 EPrecType PrecType, Epetra_RowMatrix* Matrix, const int overlap = 0 00214 ); 00215 00230 Ifpack_Preconditioner* Create(const string PrecType, 00231 Epetra_RowMatrix* Matrix, 00232 const int overlap = 0); 00233 00241 int SetParameters(int argc, char* argv[], 00242 Teuchos::ParameterList& List, string& PrecType, 00243 int& Overlap); 00244 00245 }; 00246 00247 00248 TEUCHOS_ENUM_INPUT_STREAM_OPERATOR(Ifpack::EPrecType) 00249 00250 00251 #endif
1.7.4