AnasaziTypes.hpp

Go to the documentation of this file.
00001 // @HEADER
00002 // ***********************************************************************
00003 //
00004 //                 Anasazi: Block Eigensolvers 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 ANASAZI_TYPES_HPP
00030 #define ANASAZI_TYPES_HPP
00031 
00032 #include "AnasaziConfigDefs.hpp"
00033 #include "Teuchos_RCP.hpp"
00034 #include "Teuchos_ScalarTraits.hpp"
00035 
00040 namespace Anasazi {
00041 
00042 typedef Teuchos_Ordinal Array_size_type;
00043 
00045 
00046 
00050   class AnasaziError : public std::logic_error { 
00051     public: AnasaziError(const std::string& what_arg) : std::logic_error(what_arg) {} 
00052   };
00053 
00055 
00057 
00058 
00060   template <class ScalarType>
00061   struct Value {
00063     typename Teuchos::ScalarTraits<ScalarType>::magnitudeType realpart; 
00065     typename Teuchos::ScalarTraits<ScalarType>::magnitudeType imagpart;
00066     void set(const typename Teuchos::ScalarTraits<ScalarType>::magnitudeType &rp, const typename Teuchos::ScalarTraits<ScalarType>::magnitudeType &ip){
00067       realpart=rp;imagpart=ip;
00068     }
00069     Value<ScalarType> &operator=(const Value<ScalarType> &rhs) {
00070       realpart=rhs.realpart;imagpart=rhs.imagpart;
00071       return *this;
00072     }
00073   };
00074 
00076   template <class ScalarType, class MV>
00077   struct Eigensolution {
00079     Teuchos::RCP<MV> Evecs;
00081     Teuchos::RCP<MV> Espace;
00083     std::vector<Value<ScalarType> >  Evals;
00092     std::vector<int>         index;
00094     int numVecs;
00095     
00096     Eigensolution() : Evecs(),Espace(),Evals(0),index(0),numVecs(0) {}
00097   };
00098 
00100 
00102 
00103 
00107   enum ReturnType 
00108   {
00109     Converged,       
00110     Unconverged      
00111   };
00112 
00113 
00118   enum ConjType 
00119   {
00120     NO_CONJ,      
00121     CONJ          
00122   };
00123 
00124 
00128   enum TestStatus
00129   {
00130     Passed    = 0x1,    
00131     Failed    = 0x2,    
00132     Undefined = 0x4     
00133   };
00134 
00135 
00139   enum MsgType 
00140   {
00141     Errors = 0,                 
00142     Warnings = 0x1,             
00143     IterationDetails = 0x2,     
00144     OrthoDetails = 0x4,         
00145     FinalSummary = 0x8,         
00146     TimingDetails = 0x10,       
00147     StatusTestDetails = 0x20,   
00148     Debug = 0x40                
00149   };
00150 
00152 
00153 } // end of namespace Anasazi
00154 #endif
00155 // end of file AnasaziTypes.hpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Generated on Wed Apr 13 09:56:59 2011 for Anasazi by  doxygen 1.6.3