AnasaziOrthoManager.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 
00033 #ifndef ANASAZI_ORTHOMANAGER_HPP
00034 #define ANASAZI_ORTHOMANAGER_HPP
00035 
00050 #include "AnasaziConfigDefs.hpp"
00051 #include "AnasaziTypes.hpp"
00052 #include "Teuchos_ScalarTraits.hpp"
00053 #include "Teuchos_RCP.hpp"
00054 #include "Teuchos_SerialDenseMatrix.hpp"
00055 #include "Teuchos_Array.hpp"
00056 
00057 
00058 
00059 
00060 namespace Anasazi {
00061 
00062 
00064 
00065 
00068   class OrthoError : public AnasaziError
00069   {public: OrthoError(const std::string& what_arg) : AnasaziError(what_arg) {}};
00070 
00072 
00073   template <class ScalarType, class MV>
00074   class OrthoManager {
00075   public:
00077 
00078 
00079     OrthoManager() {};
00080 
00082     virtual ~OrthoManager() {};
00084 
00086 
00087 
00101     virtual void innerProd( const MV &X, const MV &Y, Teuchos::SerialDenseMatrix<int,ScalarType>& Z ) const = 0;
00102 
00103 
00111     virtual void norm( const MV& X, std::vector< typename Teuchos::ScalarTraits<ScalarType>::magnitudeType > *normvec ) const = 0;
00112 
00147     virtual void project ( 
00148         MV &X, 
00149         Teuchos::Array<Teuchos::RCP<Teuchos::SerialDenseMatrix<int,ScalarType> > > C = Teuchos::tuple(Teuchos::null), 
00150         Teuchos::Array<Teuchos::RCP<const MV> > Q = Teuchos::tuple(Teuchos::null) ) const = 0;
00151 
00179     virtual int normalize ( 
00180         MV &X, 
00181         Teuchos::RCP<Teuchos::SerialDenseMatrix<int,ScalarType> > B = Teuchos::null) const = 0;
00182 
00183 
00236     virtual int projectAndNormalize ( 
00237         MV &X, 
00238         Teuchos::Array<Teuchos::RCP<Teuchos::SerialDenseMatrix<int,ScalarType> > > C = Teuchos::tuple(Teuchos::null), 
00239         Teuchos::RCP<Teuchos::SerialDenseMatrix<int,ScalarType> > B = Teuchos::null, 
00240         Teuchos::Array<Teuchos::RCP<const MV> > Q = Teuchos::tuple(Teuchos::null) ) const = 0;
00241 
00243 
00245 
00246 
00251     virtual typename Teuchos::ScalarTraits< ScalarType >::magnitudeType orthonormError(const MV &X) const = 0;
00252 
00257     virtual typename Teuchos::ScalarTraits<ScalarType>::magnitudeType orthogError(const MV &X1, const MV &X2) const = 0;
00258 
00260 
00261   };
00262 
00263 } // end of Anasazi namespace
00264 
00265 
00266 #endif
00267 
00268 // end of file AnasaziOrthoManager.hpp

Generated on Tue Oct 20 12:45:18 2009 for Anasazi by doxygen 1.4.7