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 
00111   inline
00112   const char* toString(const StatusType status)
00113   {
00114     switch(status) {
00115       case Passed:
00116         return "Passed";
00117       case Failed:
00118         return "Failed";
00119       case Undefined:
00120         return "Undefined";
00121       default:
00122         TEST_FOR_EXCEPT(true);
00123     }
00124     return NULL; // Should never be called!
00125   }
00126   
00133   enum ConjType {
00134     NO_CONJ,      
00135     CONJ          
00136   };
00137   
00142   enum MsgType 
00143     {
00144       Errors= 0,                  
00145       Warnings = 0x1,             
00146       IterationDetails = 0x2,     
00147       OrthoDetails = 0x4,         
00148       FinalSummary = 0x8,         
00149       TimingDetails = 0x10,       
00150       StatusTestDetails = 0x20,   
00151       Debug = 0x40                
00152     };
00153 
00154 } // end Belos namespace
00155 
00156 #endif /* BELOS_TYPES_HPP */

Generated on Tue Oct 20 12:48:34 2009 for Belos by doxygen 1.4.7