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  
00085 
00093   enum ReturnType  {    Converged,     
00094                         Unconverged    
00095   };
00096   
00103   enum StatusType {   Passed = 0x1,      
00104                         Failed = 0x2,      
00105       Undefined = 0x4    
00106   };
00107 
00108   enum ResetType  {     Problem = 0x1,           
00109                         RecycleSubspace = 0x2    
00110   };
00111 
00115   inline
00116   const char* toString(const StatusType status)
00117   {
00118     switch(status) {
00119       case Passed:
00120         return "Passed";
00121       case Failed:
00122         return "Failed";
00123       case Undefined:
00124         return "Undefined";
00125       default:
00126         TEST_FOR_EXCEPT(true);
00127     }
00128     return NULL; // Should never be called!
00129   }
00130   
00137   enum ConjType {
00138     NO_CONJ,      
00139     CONJ          
00140   };
00141   
00146   enum MsgType 
00147     {
00148       Errors= 0,                  
00149       Warnings = 0x1,             
00150       IterationDetails = 0x2,     
00151       OrthoDetails = 0x4,         
00152       FinalSummary = 0x8,         
00153       TimingDetails = 0x10,       
00154       StatusTestDetails = 0x20,   
00155       Debug = 0x40                
00156     };
00157 
00158 } // end Belos namespace
00159 
00160 #endif /* BELOS_TYPES_HPP */

Generated on Wed May 12 21:30:09 2010 for Belos by  doxygen 1.4.7