00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
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