Anasazi  Version of the Day
AnasaziEigenproblem.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 
29 #ifndef ANASAZI_EIGENPROBLEM_H
30 #define ANASAZI_EIGENPROBLEM_H
31 
37 #include "AnasaziConfigDefs.hpp"
38 #include "AnasaziTypes.hpp"
40 #include "Teuchos_RCP.hpp"
41 
42 
48 namespace Anasazi {
49 
50  template<class ScalarType, class MV, class OP>
51  class Eigenproblem {
52 
53  public:
54 
56 
57 
60 
62  virtual ~Eigenproblem() {};
64 
66 
67 
75  virtual void setOperator( const Teuchos::RCP<const OP> &Op ) = 0;
76 
78  virtual void setA( const Teuchos::RCP<const OP> &A ) = 0;
79 
81  virtual void setM( const Teuchos::RCP<const OP> &M ) = 0;
82 
84  virtual void setPrec( const Teuchos::RCP<const OP> &Prec ) = 0;
85 
90  virtual void setInitVec( const Teuchos::RCP<MV> &InitVec ) = 0;
91 
98  virtual void setAuxVecs( const Teuchos::RCP<const MV> &AuxVecs ) = 0;
99 
101  virtual void setNEV( int nev ) = 0;
102 
108  virtual void setHermitian( bool isSym ) = 0;
109 
123  virtual bool setProblem() = 0;
124 
131  virtual void setSolution(const Eigensolution<ScalarType,MV> &sol) = 0;
132 
134 
136 
137 
139  virtual Teuchos::RCP<const OP> getOperator() const = 0;
140 
142  virtual Teuchos::RCP<const OP> getA() const = 0;
143 
145  virtual Teuchos::RCP<const OP> getM() const = 0;
146 
148  virtual Teuchos::RCP<const OP> getPrec() const = 0;
149 
151  virtual Teuchos::RCP<const MV> getInitVec() const = 0;
152 
154  virtual Teuchos::RCP<const MV> getAuxVecs() const = 0;
155 
157  virtual int getNEV() const = 0;
158 
160  virtual bool isHermitian() const = 0;
161 
163  virtual bool isProblemSet() const = 0;
164 
170  virtual const Eigensolution<ScalarType,MV> & getSolution() const = 0;
171 
173  };
174 
175 } // end Anasazi namespace
176 #endif
177 
178 // end AnasaziEigenproblem.hpp
virtual void setSolution(const Eigensolution< ScalarType, MV > &sol)=0
Set the solution to the eigenproblem.
virtual Teuchos::RCP< const MV > getAuxVecs() const =0
Get a pointer to the auxiliary vector.
This class defines the interface required by an eigensolver and status test class to compute solution...
virtual bool isHermitian() const =0
Get the symmetry information for this eigenproblem.
virtual bool setProblem()=0
Specify that this eigenproblem is fully defined.
virtual void setHermitian(bool isSym)=0
Specify the symmetry of the eigenproblem.
virtual Teuchos::RCP< const OP > getM() const =0
Get a pointer to the operator M of the eigenproblem .
virtual void setOperator(const Teuchos::RCP< const OP > &Op)=0
Set the operator for which eigenvalues will be computed.
virtual void setA(const Teuchos::RCP< const OP > &A)=0
Set the operator A of the eigenvalue problem .
virtual void setInitVec(const Teuchos::RCP< MV > &InitVec)=0
Set the initial guess.
Namespace Anasazi contains the classes, structs, enums and utilities used by the Anasazi package...
virtual void setNEV(int nev)=0
The number of eigenvalues (NEV) that are requested.
virtual Teuchos::RCP< const OP > getPrec() const =0
Get a pointer to the preconditioner.
Anasazi header file which uses auto-configuration information to include necessary C++ headers...
Struct for storing an eigenproblem solution.
virtual Teuchos::RCP< const MV > getInitVec() const =0
Get a pointer to the initial vector.
virtual int getNEV() const =0
Get the number of eigenvalues (NEV) that are required by this eigenproblem.
virtual Teuchos::RCP< const OP > getOperator() const =0
Get a pointer to the operator for which eigenvalues will be computed.
virtual void setPrec(const Teuchos::RCP< const OP > &Prec)=0
Set the preconditioner for this eigenvalue problem .
Types and exceptions used within Anasazi solvers and interfaces.
Eigenproblem()
Empty constructor.
virtual bool isProblemSet() const =0
If the problem has been set, this method will return true.
virtual const Eigensolution< ScalarType, MV > & getSolution() const =0
Get the solution to the eigenproblem.
virtual Teuchos::RCP< const OP > getA() const =0
Get a pointer to the operator A of the eigenproblem .
virtual ~Eigenproblem()
Destructor.
virtual void setAuxVecs(const Teuchos::RCP< const MV > &AuxVecs)=0
Set auxiliary vectors.
virtual void setM(const Teuchos::RCP< const OP > &M)=0
Set the operator M of the eigenvalue problem .