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 #include "Ifpack_ConfigDefs.h"
00034 #include "Ifpack_Preconditioner.h"
00035
00036 #ifdef HAVE_HYPRE
00037 #include "Ifpack_Hypre.h"
00038 #endif
00040
00120 class Ifpack {
00121 public:
00122
00124 enum EPrecType {
00125 POINT_RELAXATION
00126 ,POINT_RELAXATION_STAND_ALONE
00127 ,BLOCK_RELAXATION
00128 ,BLOCK_RELAXATION_STAND_ALONE
00129 ,BLOCK_RELAXATION_STAND_ALONE_ILU
00130 #ifdef HAVE_IFPACK_AMESOS
00131 ,BLOCK_RELAXATION_STAND_ALONE_AMESOS
00132 ,BLOCK_RELAXATION_AMESOS
00133 ,AMESOS
00134 ,AMESOS_STAND_ALONE
00135 #endif // HAVE_IFPACK_AMESOS
00136 ,IC
00137 ,IC_STAND_ALONE
00138 ,ICT
00139 ,ICT_STAND_ALONE
00140 ,ILU
00141 ,ILU_STAND_ALONE
00142 ,ILUT
00143 ,ILUT_STAND_ALONE
00144 #ifdef HAVE_IFPACK_SPARSKIT
00145 ,SPARSKIT
00146 #endif // HAVE_IFPACK_SPARSKIT
00147 #ifdef HAVE_IFPACK_HIPS
00148 ,HIPS
00149 #endif
00150 #ifdef HAVE_HYPRE
00151 ,HYPRE
00152 #endif
00153 ,CHEBYSHEV
00154 };
00155
00157 static const int numPrecTypes =
00158 +5
00159 #ifdef HAVE_IFPACK_AMESOS
00160 +4
00161 #endif
00162 +8
00163 #ifdef HAVE_IFPACK_SPARSKIT
00164 +1
00165 #endif
00166 #ifdef HAVE_IFPACK_HIPS
00167 +1
00168 #endif
00169 #ifdef HAVE_HYPRE
00170 +1
00171 #endif
00172 +1
00173 ;
00174
00176 static const EPrecType precTypeValues[numPrecTypes];
00177
00179 static const char* precTypeNames[numPrecTypes];
00180
00183 static const bool supportsUnsymmetric[numPrecTypes];
00184
00187 static const char* toString(const EPrecType precType)
00188 { return precTypeNames[precType]; }
00189
00199 static Ifpack_Preconditioner* Create(
00200 EPrecType PrecType, Epetra_RowMatrix* Matrix, const int overlap = 0
00201 );
00202
00217 Ifpack_Preconditioner* Create(const string PrecType,
00218 Epetra_RowMatrix* Matrix,
00219 const int overlap = 0);
00220
00228 int SetParameters(int argc, char* argv[],
00229 Teuchos::ParameterList& List, string& PrecType,
00230 int& Overlap);
00231
00232 };
00233
00234 #endif