Anasazi  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
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 with Sandia Corporation,
8 // the U.S. Government retains certain rights in this software.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are
12 // met:
13 //
14 // 1. Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 //
17 // 2. Redistributions in binary form must reproduce the above copyright
18 // notice, this list of conditions and the following disclaimer in the
19 // documentation and/or other materials provided with the distribution.
20 //
21 // 3. Neither the name of the Corporation nor the names of the
22 // contributors may be used to endorse or promote products derived from
23 // this software without specific prior written permission.
24 //
25 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 //
37 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
38 //
39 // ***********************************************************************
40 // @HEADER
41 
42 #ifndef ANASAZI_EIGENPROBLEM_H
43 #define ANASAZI_EIGENPROBLEM_H
44 
50 #include "AnasaziConfigDefs.hpp"
51 #include "AnasaziTypes.hpp"
53 #include "Teuchos_RCP.hpp"
54 
55 
61 namespace Anasazi {
62 
63  template<class ScalarType, class MV, class OP>
64  class Eigenproblem {
65 
66  public:
67 
69 
70 
73 
75  virtual ~Eigenproblem() {};
77 
79 
80 
88  virtual void setOperator( const Teuchos::RCP<const OP> &Op ) = 0;
89 
91  virtual void setA( const Teuchos::RCP<const OP> &A ) = 0;
92 
94  virtual void setM( const Teuchos::RCP<const OP> &M ) = 0;
95 
97  virtual void setPrec( const Teuchos::RCP<const OP> &Prec ) = 0;
98 
103  virtual void setInitVec( const Teuchos::RCP<MV> &InitVec ) = 0;
104 
111  virtual void setAuxVecs( const Teuchos::RCP<const MV> &AuxVecs ) = 0;
112 
114  virtual void setNEV( int nev ) = 0;
115 
121  virtual void setHermitian( bool isSym ) = 0;
122 
136  virtual bool setProblem() = 0;
137 
144  virtual void setSolution(const Eigensolution<ScalarType,MV> &sol) = 0;
145 
147 
149 
150 
152  virtual Teuchos::RCP<const OP> getOperator() const = 0;
153 
155  virtual Teuchos::RCP<const OP> getA() const = 0;
156 
158  virtual Teuchos::RCP<const OP> getM() const = 0;
159 
161  virtual Teuchos::RCP<const OP> getPrec() const = 0;
162 
164  virtual Teuchos::RCP<const MV> getInitVec() const = 0;
165 
167  virtual Teuchos::RCP<const MV> getAuxVecs() const = 0;
168 
170  virtual int getNEV() const = 0;
171 
173  virtual bool isHermitian() const = 0;
174 
176  virtual bool isProblemSet() const = 0;
177 
183  virtual const Eigensolution<ScalarType,MV> & getSolution() const = 0;
184 
186  };
187 
188 } // end Anasazi namespace
189 #endif
190 
191 // 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.
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 .