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
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

Generated on Tue Jul 13 09:27:13 2010 for IFPACK by  doxygen 1.4.7