Thyra_Ifpack_Types.cpp

Go to the documentation of this file.
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 #include "Thyra_Ifpack_Types.hpp"
00031 #include "Teuchos_StringToIntMap.hpp"
00032 
00033 namespace {
00034 
00035 const Teuchos::StringToIntMap
00036 precTypeNameToIntMap(
00037   "parameter \"Prec Type\"", Thyra::Ifpack::numPrecTypes, Thyra::Ifpack::precTypeNames
00038   );
00039 
00040 } // namespace
00041 
00042 namespace Thyra {
00043 
00044 const Ifpack::EPrecType Ifpack::precTypeValues[Ifpack::numPrecTypes] =
00045 {
00046   POINT_RELAXATION
00047   ,POINT_RELAXATION_STAND_ALONE
00048   ,BLOCK_RELAXATION
00049   ,BLOCK_RELAXATION_STAND_ALONE
00050 #ifdef HAVE_IFPACK_AMESOS
00051   ,BLOCK_RELAXATION_STAND_ALONE_ILU
00052   ,BLOCK_RELAXATION_STAND_ALONE_AMESOS
00053   ,BLOCK_RELAXATION_AMESOS
00054   ,AMESOS
00055   ,AMESOS_STAND_ALONE
00056 #endif // HAVE_IFPACK_AMESOS
00057   ,IC
00058   ,IC_STAND_ALONE
00059   ,ICT
00060   ,ICT_STAND_ALONE
00061   ,ILU
00062   ,ILU_STAND_ALONE
00063   ,ILUT
00064   ,ILUT_STAND_ALONE
00065 #ifdef HAVE_IFPACK_SPARSKIT
00066   ,SPARSKIT
00067 #endif // HAVE_IFPACK_SPARSKIT
00068 };
00069 
00070 const char* Ifpack::precTypeNames[Ifpack::numPrecTypes] =
00071 {
00072   "point relaxation"
00073   ,"point relaxation stand-alone"
00074   ,"block relaxation"
00075   ,"block relaxation stand-alone"
00076 #ifdef HAVE_IFPACK_AMESOS
00077   ,"block relaxation stand-alone (ILU)"
00078   ,"block relaxation stand-alone (Amesos)"
00079   ,"block relaxation (Amesos)"
00080   ,"Amesos"
00081   ,"LU"
00082 #endif
00083   ,"IC"
00084   ,"IC stand-alone"
00085   ,"ICT"
00086   ,"ICT stand-alone"
00087   ,"ILU"
00088   ,"ILU stand-alone"
00089   ,"ILUT"
00090   ,"ILUT stand-alone"
00091 #ifdef HAVE_IFPACK_SPARSKIT
00092   ,"SPARSKIT"
00093 #endif
00094 };
00095 
00096 const bool Ifpack::supportsUnsymmetric[Ifpack::numPrecTypes] =
00097 {
00098   true // point relaxation
00099   ,true // point relaxation stand-alone
00100   ,true // block relaxation
00101   ,true // block relaxation stand-alone
00102 #ifdef HAVE_IFPACK_AMESOS
00103   ,true // block relaxation stand-alone (ILU)
00104   ,true // block relaxation stand-alone (Amesos)
00105   ,true // block relaxation (Amesos)
00106   ,true // Amesos
00107   ,true // LU
00108 #endif
00109   ,false // IC
00110   ,false // IC stand-alone
00111   ,false // ICT
00112   ,false // ICT stand-alone
00113   ,true // ILU
00114   ,true // ILU stand-alone
00115   ,true // ILUT
00116   ,true // ILUT stand-alone
00117 #ifdef HAVE_IFPACK_SPARSKIT
00118   ,true // SPARSKIT
00119 #endif
00120 };
00121 
00122 Ifpack::EPrecType Ifpack::precTypeNameToEnum(
00123   const std::string& precTypeName
00124   ,const std::string& paramName
00125   )
00126 {
00127   return precTypeNameToIntMap.get<EPrecType>(precTypeName);
00128 }
00129 
00130 } // namespace Thyra

Generated on Thu Sep 18 12:37:22 2008 for Ifpack Package Browser (Single Doxygen Collection) by doxygen 1.3.9.1