inexactInv.hh

Go to the documentation of this file.
1 
6 #ifndef inexactInv_hh
7 #define inexactInv_hh
8 
9 #include "eigens.hh"
10 
11 namespace concepts {
12  // forward declaration
13  template<typename F>
14  class Operator;
15 } // namespace concepts
16 
17 namespace eigensolver {
18 
19  using concepts::Real;
20 
21  // ************************************************************ InexactInv **
22 
35  template<typename F>
36  class InexactInv : public EigenSolver<F> {
37  public:
54  const concepts::Vector<F>& EFguess,
55  const Real innerTol = 0.5, const uint innerMax = 100,
56  const Real outerTol = 1e-6, const uint outerMax = 100);
57 
58  virtual ~InexactInv();
59  virtual const concepts::Array<F>& getEV() {
60  compute_();
61  return returnValue1_; }
63  compute_();
64  return returnValue2_;
65  }
66  virtual uint iterations() const { return iterations_; }
67  virtual uint converged() const {
68  return (epsilon_ < outerTol_) ? 1 : 0;
69  }
70  protected:
71  virtual std::ostream& info(std::ostream& os) const;
72  private:
80 
83 
84  bool computed_;
85 
87  void compute_();
88  };
89 
90 } // namespace eigensolver
91 
92 #endif // inexactInv_hh
virtual uint converged() const
Returns the number of converged eigen pairs.
Definition: inexactInv.hh:67
Interafce for eigenvalue solvers.
Definition: eigens.hh:23
void compute_()
Does the computations.
concepts::Vector< F > eigenfunction_
Definition: inexactInv.hh:76
virtual const concepts::Array< F > & getEV()
Returns an array with the eigen values.
Definition: inexactInv.hh:59
Inexact inverse iteration to solve a generalized Eigen value problem.
Definition: inexactInv.hh:36
An array of objects.
Definition: bilinearForm.hh:23
concepts::Operator< F > & A_
Definition: inexactInv.hh:73
concepts::Operator< F > & B_
Definition: inexactInv.hh:73
Abstract class for an operator.
Definition: ARPACK.hh:16
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
concepts::Array< concepts::Vector< F > * > returnValue2_
Definition: inexactInv.hh:77
virtual uint iterations() const
Returns the number of iterations.
Definition: inexactInv.hh:66
InexactInv(concepts::Operator< F > &A, concepts::Operator< F > &B, const concepts::Vector< F > &EFguess, const Real innerTol=0.5, const uint innerMax=100, const Real outerTol=1e-6, const uint outerMax=100)
Constructor.
concepts::Array< F > returnValue1_
Definition: inexactInv.hh:74
virtual const concepts::Array< concepts::Vector< F > * > & getEF()
Definition: inexactInv.hh:62
Eigenvalue solvers.
Definition: ARPACK.hh:19
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
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