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_RefCountPtr.hpp"
00034 #include "Teuchos_ScalarTraits.hpp"
00035 
00040 namespace Anasazi {
00041 
00043 
00044 
00048   class AnasaziError : public std::logic_error { 
00049     public: AnasaziError(const std::string& what_arg) : std::logic_error(what_arg) {} 
00050   };
00051 
00053 
00055 
00056 
00058   template <class ScalarType>
00059   struct Value {
00061     typename Teuchos::ScalarTraits<ScalarType>::magnitudeType realpart; 
00063     typename Teuchos::ScalarTraits<ScalarType>::magnitudeType imagpart;
00064     void set(const typename Teuchos::ScalarTraits<ScalarType>::magnitudeType &rp, const typename Teuchos::ScalarTraits<ScalarType>::magnitudeType &ip){
00065       realpart=rp;imagpart=ip;
00066     }
00067     Value<ScalarType> &operator=(const Value<ScalarType> &rhs) {
00068       realpart=rhs.realpart;imagpart=rhs.imagpart;
00069       return *this;
00070     }
00071   };
00072 
00074   template <class ScalarType, class MV>
00075   struct Eigensolution {
00077     Teuchos::RefCountPtr<MV> Evecs;
00079     Teuchos::RefCountPtr<MV> Espace;
00081     std::vector<Value<ScalarType> >  Evals;
00090     std::vector<int>         index;
00092     int numVecs;
00093     
00094     Eigensolution() : Evecs(),Espace(),Evals(0),index(0),numVecs(0) {}
00095   };
00096 
00098 
00100 
00101 
00105   enum ReturnType 
00106   {
00107     Converged,       
00108     Unconverged      
00109   };
00110 
00111 
00116   enum ConjType 
00117   {
00118     NO_CONJ,      
00119     CONJ          
00120   };
00121 
00122 
00126   enum TestStatus
00127   {
00128     Passed    = 0x1,    
00129     Failed    = 0x2,    
00130     Undefined = 0x4     
00131   };
00132 
00133 
00137   enum MsgType 
00138   {
00139     Errors = 0,                 
00140     Warnings = 0x1,             
00141     IterationDetails = 0x2,     
00142     OrthoDetails = 0x4,         
00143     FinalSummary = 0x8,         
00144     TimingDetails = 0x10,       
00145     StatusTestDetails = 0x20,   
00146     Debug = 0x40                
00147   };
00148 
00150 
00151 } // end of namespace Anasazi
00152 #endif
00153 // end of file AnasaziTypes.hpp

Generated on Thu Sep 18 12:31:38 2008 for Anasazi by doxygen 1.3.9.1