jdbsym.hh

Go to the documentation of this file.
1 
6 #ifndef jdbsym_hh
7 #define jdbsym_hh
8 
9 #include "eigens.hh"
10 
11 namespace concepts {
12  // forward declaration
13  template<typename F>
14  class Operator;
15  template<typename F>
16  class SolverFabric;
17 } // namespace concepts
18 
19 namespace eigensolver {
20 
21 using concepts::Real;
22 
23  // **************************************************************** JdbSym **
24 
48  class JdbSym : public EigenSolver<Real> {
49  public:
77  Real tol, uint maxit = 150, Real tau = 0.0, uint jdtype = 1,
78  uint kmax = 1, concepts::SolverFabric<Real>* fabric = 0,
79  const concepts::Array<concepts::Vector<Real>*>* start = 0);
80  virtual ~JdbSym();
81  virtual const concepts::Array<Real>& getEV();
83  virtual uint iterations() const { return (uint)it_; }
84  virtual uint converged() const { return (uint)k_conv_; }
85  protected:
86  virtual std::ostream& info(std::ostream& os) const;
87  private:
91  void compute_();
93  bool computed_;
103  uint maxit_;
107  const uint jdtype_;
109  uint kmax_;
111  int it_;
113  int k_conv_;
114 
121 
124 
127 
129  static int jdbsymLock_;
130  };
131 
132 }
133 
134 #endif // jdbsym_hh
const uint jdtype_
Type of eigen value solver.
Definition: jdbsym.hh:107
Interafce for eigenvalue solvers.
Definition: eigens.hh:23
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
void compute_()
The real compute routine.
concepts::Array< Real > lambda_
Storage space for eigenvalues.
Definition: jdbsym.hh:116
concepts::Array< concepts::Vector< Real > * > ev_
References into storage for eigenvectors.
Definition: jdbsym.hh:120
concepts::Operator< Real > & mass_
Mass matrix (ie.
Definition: jdbsym.hh:99
uint maxit_
Maximal number of iterations.
Definition: jdbsym.hh:103
static int jdbsymLock_
Lock for the eigen value solver.
Definition: jdbsym.hh:129
virtual uint iterations() const
Definition: jdbsym.hh:83
int it_
Actual number of iterations.
Definition: jdbsym.hh:111
bool computed_
If false, the code will have to compute, otherwise not.
Definition: jdbsym.hh:93
virtual const concepts::Array< concepts::Vector< Real > * > & getEF()
uint kmax_
Number of eigenvalues.
Definition: jdbsym.hh:109
Real tol_
Tolerance.
Definition: jdbsym.hh:101
An array of objects.
Definition: bilinearForm.hh:23
concepts::Operator< Real > & stiff_
Stiffness matrix (ie. discretazation of spatial problem)
Definition: jdbsym.hh:95
Abstract fabric class for linear solvers.
Definition: jdbsym.hh:16
Real tau_
Target value for the eigenvalues.
Definition: jdbsym.hh:105
const concepts::Array< concepts::Vector< Real > * > * start_
Definition: jdbsym.hh:126
Eigenvalue solver using JDBSYM.
Definition: jdbsym.hh:48
virtual uint converged() const
Definition: jdbsym.hh:84
int k_conv_
Number of converged eigenpais.
Definition: jdbsym.hh:113
concepts::Array< Real > eigenvectors_
Storage space for eigenvectors.
Definition: jdbsym.hh:118
virtual const concepts::Array< Real > & getEV()
Returns an array with the eigen values.
JdbSym(concepts::Operator< Real > &stiff, concepts::Operator< Real > &mass, Real tol, uint maxit=150, Real tau=0.0, uint jdtype=1, uint kmax=1, concepts::SolverFabric< Real > *fabric=0, const concepts::Array< concepts::Vector< Real > * > *start=0)
Constructor.
concepts::SolverFabric< Real > * fabric_
Definition: jdbsym.hh:125
Eigenvalue solvers.
Definition: ARPACK.hh:19
uint stiffCounter_
Statistics, counts number of evaluations of matrix vector product.
Definition: jdbsym.hh:123
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