00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
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_RefCountPtr.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
00096 virtual void innerProd( const MV &X, const MV &Y, Teuchos::SerialDenseMatrix<int,ScalarType>& Z ) const = 0;
00097
00098
00101 virtual void norm( const MV& X, std::vector< typename Teuchos::ScalarTraits<ScalarType>::magnitudeType > * normvec ) const = 0;
00102
00122 virtual void project ( MV &X,
00123 Teuchos::Array<Teuchos::RefCountPtr<Teuchos::SerialDenseMatrix<int,ScalarType> > > C,
00124 Teuchos::Array<Teuchos::RefCountPtr<const MV> > Q) const = 0;
00125
00140 virtual int normalize ( MV &X, Teuchos::RefCountPtr<Teuchos::SerialDenseMatrix<int,ScalarType> > B ) const = 0;
00141
00142
00170 virtual int projectAndNormalize ( MV &X,
00171 Teuchos::Array<Teuchos::RefCountPtr<Teuchos::SerialDenseMatrix<int,ScalarType> > > C,
00172 Teuchos::RefCountPtr<Teuchos::SerialDenseMatrix<int,ScalarType> > B,
00173 Teuchos::Array<Teuchos::RefCountPtr<const MV> > Q ) const = 0;
00174
00176
00178
00179
00182 virtual typename Teuchos::ScalarTraits< ScalarType >::magnitudeType orthonormError(const MV &X) const = 0;
00183
00186 virtual typename Teuchos::ScalarTraits<ScalarType>::magnitudeType orthogError(const MV &X1, const MV &X2) const = 0;
00187
00189
00190 };
00191
00192 }
00193
00194
00195 #endif
00196
00197