Anasazi  Version of the Day
AnasaziOrthoManager.hpp
Go to the documentation of this file.
1 // @HEADER
2 // ***********************************************************************
3 //
4 // Anasazi: Block Eigensolvers Package
5 // Copyright (2004) Sandia Corporation
6 //
7 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8 // license for use of this work by or on behalf of the U.S. Government.
9 //
10 // This library is free software; you can redistribute it and/or modify
11 // it under the terms of the GNU Lesser General Public License as
12 // published by the Free Software Foundation; either version 2.1 of the
13 // License, or (at your option) any later version.
14 //
15 // This library is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 // Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public
21 // License along with this library; if not, write to the Free Software
22 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
23 // USA
24 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
25 //
26 // ***********************************************************************
27 // @HEADER
28 
33 #ifndef ANASAZI_ORTHOMANAGER_HPP
34 #define ANASAZI_ORTHOMANAGER_HPP
35 
50 #include "AnasaziConfigDefs.hpp"
51 #include "AnasaziTypes.hpp"
52 #include "Teuchos_ScalarTraits.hpp"
53 #include "Teuchos_RCP.hpp"
54 #include "Teuchos_SerialDenseMatrix.hpp"
55 #include "Teuchos_Array.hpp"
56 
57 
58 
59 
60 namespace Anasazi {
61 
62 
64 
65 
68  class OrthoError : public AnasaziError
69  {public: OrthoError(const std::string& what_arg) : AnasaziError(what_arg) {}};
70 
72 
73  template <class ScalarType, class MV>
74  class OrthoManager {
75  public:
77 
78  OrthoManager() {};
80 
82  virtual ~OrthoManager() {};
84 
86 
87 
101  virtual void innerProd( const MV &X, const MV &Y, Teuchos::SerialDenseMatrix<int,ScalarType>& Z ) const = 0;
102 
103 
116  virtual void norm( const MV& X, std::vector< typename Teuchos::ScalarTraits<ScalarType>::magnitudeType > &normvec ) const = 0;
117 
118 
119 
158  virtual void project (
159  MV &X,
160  Teuchos::Array<Teuchos::RCP<const MV> > Q,
161  Teuchos::Array<Teuchos::RCP<Teuchos::SerialDenseMatrix<int,ScalarType> > > C
162  = Teuchos::tuple(Teuchos::RCP< Teuchos::SerialDenseMatrix<int,ScalarType> >(Teuchos::null))
163  ) const = 0;
164 
165 
166 
207  virtual int normalize (
208  MV &X,
209  Teuchos::RCP<Teuchos::SerialDenseMatrix<int,ScalarType> > B = Teuchos::null) const = 0;
210 
211 
277  virtual int projectAndNormalize (
278  MV &X,
279  Teuchos::Array<Teuchos::RCP<const MV> > Q,
280  Teuchos::Array<Teuchos::RCP<Teuchos::SerialDenseMatrix<int,ScalarType> > > C
281  = Teuchos::tuple(Teuchos::RCP< Teuchos::SerialDenseMatrix<int,ScalarType> >(Teuchos::null)),
282  Teuchos::RCP<Teuchos::SerialDenseMatrix<int,ScalarType> > B = Teuchos::null
283  ) const = 0;
284 
286 
288 
289 
295  virtual typename Teuchos::ScalarTraits< ScalarType >::magnitudeType orthonormError(const MV &X) const = 0;
296 
302  virtual typename Teuchos::ScalarTraits<ScalarType>::magnitudeType orthogError(const MV &X1, const MV &X2) const = 0;
303 
305 
306  };
307 
308 } // end of Anasazi namespace
309 
310 
311 #endif
312 
313 // end of file AnasaziOrthoManager.hpp
An exception class parent to all Anasazi exceptions.
Namespace Anasazi contains the classes, structs, enums and utilities used by the Anasazi package...
Anasazi header file which uses auto-configuration information to include necessary C++ headers...
Exception thrown to signal error in an orthogonalization manager method.
Types and exceptions used within Anasazi solvers and interfaces.
Anasazi&#39;s templated virtual class for providing routines for orthogonalization and orthonormalization...
virtual ~OrthoManager()
Destructor.