Class documentation of Concepts

Loading...
Searching...
No Matches
ARPACK.hh
Go to the documentation of this file.
1
7#ifndef ARPACK_hh
8#define ARPACK_hh
9
10#include <cfloat>
11#include "eigensolver/eigens.hh"
12
13namespace concepts {
14 // forward declaration
15 template<typename F>
16 class Operator;
17} // namespace concepts
18
19namespace eigensolver {
20
21using concepts::Real;
22using concepts::Cmplx;
23
24 // ********************************************************* ArPack **
25
69 template <typename F, typename G = Real, typename H = Real>
70 class ArPack : public EigenSolver<F> {
71 public:
75 enum which { LM, SM, LR, SR, LI, SI };
92 enum modus { NORMAL = 1, REGINV = 2, SHIFTINV = 3, SHIFTINVIMAG = 4 };
127 concepts::Operator<H>& B, const int kmax = 1,
128 const Real tol = 0.0, const int maxiter = 300,
129 enum which target = SM, enum modus mode = REGINV,
130 const F sigma = 0.0,
131 const concepts::Vector<F>* start = 0,
132 const concepts::Array<F>* resid = 0,
133 const bool schur = false);
134 virtual ~ArPack();
139 virtual const concepts::Array<F>& getEV();
148 virtual uint iterations() const { return (uint)iter_; }
150 virtual uint converged() const { return (uint)k_conv_; }
152 concepts::Array<F> getRESID() { return resid_out_; }
153 protected:
154 virtual std::ostream& info(std::ostream& os) const;
155 private:
163 int kmax_;
165 int maxiter_;
167 Real tol_;
168 int numop_, numopb_, numreo_, k_conv_, iter_;
170 concepts::Array<F> eigenvalues_;
172 concepts::Array<F> eigenvectors_;
176 enum which target_;
178 enum modus mode_;
180 const F sigma_;
182 const concepts::Vector<F>* start_;
185 const concepts::Array<F>* resid_in_;
186 const bool schur_;
188 bool computed_;
190 concepts::Array<F> resid_out_;
192 void compute_();
193
194 void computeCmplx_();
195 };
196
197} // namespace eigensolver
198
199#endif // ARPACK_hh
virtual uint converged() const
Returns the number of converged eigenpairs.
Definition ARPACK.hh:150
concepts::Array< F > getRESID()
Returns the RESID vector:
Definition ARPACK.hh:152
ArPack(concepts::Operator< G > &OP, concepts::Operator< F > &A, concepts::Operator< H > &B, const int kmax=1, const Real tol=0.0, const int maxiter=300, enum which target=SM, enum modus mode=REGINV, const F sigma=0.0, const concepts::Vector< F > *start=0, const concepts::Array< F > *resid=0, const bool schur=false)
virtual const concepts::Array< concepts::Vector< F > * > & getEF()
virtual const concepts::Array< F > & getEV()
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual uint iterations() const
Returns the number of iterations.
Definition ARPACK.hh:148
double Real
Definition typedefs.hh:39
std::complex< Real > Cmplx
Type for a complex number. It also depends on the setting of Real.
Definition typedefs.hh:42