Class documentation of Concepts

Loading...
Searching...
No Matches
inexactInv.hh
Go to the documentation of this file.
1
6#ifndef inexactInv_hh
7#define inexactInv_hh
8
9#include "eigens.hh"
10
11namespace concepts {
12 // forward declaration
13 template<typename F>
14 class Operator;
15} // namespace concepts
16
17namespace 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_; }
62 virtual const concepts::Array<concepts::Vector<F>*>& getEF() {
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:
73 concepts::Operator<F>& A_, & B_;
74 concepts::Array<F> returnValue1_;
75 F& eigenvalue_;
76 concepts::Vector<F> eigenfunction_;
78 Real innerTol_, outerTol_;
79 uint innerMax_, outerMax_;
80
81 uint iterations_, innerIter_;
82 Real epsilon_;
83
84 bool computed_;
85
87 void compute_();
88 };
89
90} // namespace eigensolver
91
92#endif // inexactInv_hh
virtual const concepts::Array< F > & getEV()
Definition inexactInv.hh:59
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)
virtual uint converged() const
Returns the number of converged eigen pairs.
Definition inexactInv.hh:67
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
double Real
Definition typedefs.hh:39