IFPACK Development
Ifpack.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_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
00039 
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 #ifdef HAVE_IFPACK_SUPERLU
00154   ,SILU
00155 #endif
00156     ,CHEBYSHEV
00157     ,IHSS
00158     ,SORA
00159   };
00160 
00162   static const int numPrecTypes =
00163     +5
00164 #ifdef HAVE_IFPACK_AMESOS
00165     +4
00166 #endif
00167     +8
00168 #ifdef HAVE_IFPACK_SPARSKIT
00169     +1
00170 #endif
00171 #ifdef HAVE_IFPACK_HIPS
00172     +1
00173 #endif    
00174 #ifdef HAVE_HYPRE
00175     +1
00176 #endif
00177 #ifdef HAVE_IFPACK_SUPERLU
00178     +1
00179 #endif
00180     +3
00181     ;
00182 
00184   static const EPrecType precTypeValues[numPrecTypes];
00185 
00187   static const char* precTypeNames[numPrecTypes];
00188 
00191   static const bool supportsUnsymmetric[numPrecTypes];
00192 
00195   static const char* toString(const EPrecType precType)
00196       { return precTypeNames[precType]; }
00197 
00207   static Ifpack_Preconditioner* Create(
00208     EPrecType PrecType, Epetra_RowMatrix* Matrix, const int overlap = 0
00209     );
00210 
00225   Ifpack_Preconditioner* Create(const string PrecType,
00226                 Epetra_RowMatrix* Matrix,
00227                 const int overlap = 0);
00228 
00236   int SetParameters(int argc, char* argv[],
00237                     Teuchos::ParameterList& List, string& PrecType,
00238                     int& Overlap);
00239 
00240 };
00241 
00242 #endif
 All Classes Files Functions Variables Enumerations Friends