BelosTypes.hpp

Go to the documentation of this file.
00001 // @HEADER
00002 // ***********************************************************************
00003 //
00004 //                 Belos: Block Linear Solvers Package
00005 //                 Copyright (2004) 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 #ifndef BELOS_TYPES_HPP
00030 #define BELOS_TYPES_HPP
00031 
00037 #include "BelosConfigDefs.hpp"
00038 #include "Teuchos_TestForException.hpp"
00039 
00040 namespace Belos {
00041  
00043 
00044 
00048   class BelosError: public std::logic_error {
00049     public: BelosError(const std::string& what_arg) : std::logic_error(what_arg) {}
00050   };
00051 
00053 
00054  
00059   enum ETrans     { NOTRANS = 0,  
00060       TRANS = 1,    
00061       CONJTRANS = 2 
00062   };
00063   
00068   enum NormType {   OneNorm,       
00069         TwoNorm,       
00070         InfNorm        
00071   };
00072   
00077   enum ScaleType {NormOfRHS,     
00078                   NormOfInitRes, 
00079                   NormOfPrecInitRes, 
00080                   None,          
00081                   UserProvided   
00083   };
00084  
00089   enum OutputType {General,     
00090                    Brief        
00091   };
00092 
00100   enum ReturnType  {    Converged,     
00101                         Unconverged    
00102   };
00103   
00110   enum StatusType {   Passed = 0x1,      
00111                         Failed = 0x2,      
00112       Undefined = 0x4    
00113   };
00114 
00115   enum ResetType  {     Problem = 0x1,           
00116                         RecycleSubspace = 0x2    
00117   };
00118 
00122   inline
00123   const char* toString(const StatusType status)
00124   {
00125     switch(status) {
00126       case Passed:
00127         return "Passed";
00128       case Failed:
00129         return "Failed";
00130       case Undefined:
00131         return "Undefined";
00132       default:
00133         TEST_FOR_EXCEPT(true);
00134     }
00135     return NULL; // Should never be called!
00136   }
00137   
00144   enum ConjType {
00145     NO_CONJ,      
00146     CONJ          
00147   };
00148   
00153   enum MsgType 
00154     {
00155       Errors= 0,                  
00156       Warnings = 0x1,             
00157       IterationDetails = 0x2,     
00158       OrthoDetails = 0x4,         
00159       FinalSummary = 0x8,         
00160       TimingDetails = 0x10,       
00161       StatusTestDetails = 0x20,   
00162       Debug = 0x40                
00163     };
00164 
00165 } // end Belos namespace
00166 
00167 #endif /* BELOS_TYPES_HPP */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Wed Apr 13 10:05:15 2011 for Belos Package Browser (Single Doxygen Collection) by  doxygen 1.6.3