DirPowIt.hh

Go to the documentation of this file.
1 
6 #ifndef DirPowIt_hh
7 #define DirPowIt_hh
8 
9 //#include <cfloat>
10 #include "eigensolver/eigens.hh"
12 
13 namespace concepts {
14  // forward declaration
15  template<typename F>
16  class Operator;
17 } // namespace concepts
18 
19 namespace eigensolver {
20 
21 using concepts::Real;
22 using concepts::Cmplx;
23 
24 // ********************************************************* DirPowIt**
25 
30  template <typename F, typename G>
31  class DirPowIt : public EigenSolver<G> {
32  public:
71  const int nev = 3, const int m = 3, const int k = 0,
72  const int maxiter = 300,
74  const Real tol = 0
75  );
77  virtual ~DirPowIt();
79  virtual const concepts::Array<G>& getEV();
83  virtual uint iterations() const { return (uint)iter_; }
85  virtual uint converged() const {return 0;}
86  protected:
87  virtual std::ostream& info(std::ostream& os) const;
88  private:
92  int nev_;
94  int m_;
96  int k_;
98  int iter_;
100  int maxiter_;
113  bool computed_;
115  void compute_();
116  };
117 
118 } // namespace eigensolver
119 
120 #endif // DirPowIt_hh
Interafce for eigenvalue solvers.
Definition: eigens.hh:23
virtual uint converged() const
Returns the number of converged eigenpairs (not implemented)
Definition: DirPowIt.hh:85
int m_
Size of initial matrix V;.
Definition: DirPowIt.hh:94
bool computed_
Are the eigenpairs already computed ?
Definition: DirPowIt.hh:113
virtual uint iterations() const
Returns the number of iterations.
Definition: DirPowIt.hh:83
DirPowIt(concepts::Operator< F > &A, const int nev=3, const int m=3, const int k=0, const int maxiter=300, concepts::Array< concepts::Vector< G > * > *start=0, const Real tol=0)
Constructor.
virtual const concepts::Array< concepts::Vector< G > * > & getEF()
Returns an array with the eigenfunctions.
int nev_
Number of eigenpairs to be computed.
Definition: DirPowIt.hh:92
An array of objects.
Definition: bilinearForm.hh:23
int maxiter_
Maximum number of iterations allowed.
Definition: DirPowIt.hh:100
Abstract class for an operator.
Definition: ARPACK.hh:16
void compute_()
Compute eigenpairs.
std::complex< Real > Cmplx
Type for a complex number. It also depends on the setting of Real.
Definition: typedefs.hh:39
concepts::Array< concepts::Vector< G > * > temp_eigenvectors_
Temporary storage space for eigenvectors.
Definition: DirPowIt.hh:108
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual const concepts::Array< G > & getEV()
Returns an array with the eigenvalues.
concepts::Array< uint > permutation_
Definition: DirPowIt.hh:111
virtual ~DirPowIt()
Destructor.
concepts::Operator< F > & A_
Operator A.
Definition: DirPowIt.hh:90
Eigenvalue solver using the direct power iteration method.
Definition: DirPowIt.hh:31
Real tol_
Convergence tolerance for the eigenpairs.
Definition: DirPowIt.hh:102
concepts::Array< concepts::Vector< G > * > eigenvectors_
Storage space for eigenvectors.
Definition: DirPowIt.hh:106
void sort_(concepts::Array< Real > &)
Sorting an array using bubble sort and returning the permutation:
concepts::Array< G > eigenvalues_
Storage space for eigenvalues.
Definition: DirPowIt.hh:104
Eigenvalue solvers.
Definition: ARPACK.hh:19
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
int iter_
Number of iterations.
Definition: DirPowIt.hh:98
int k_
Number of highest eigenvalues to be cut off:
Definition: DirPowIt.hh:96
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich