Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
eigensolver_IRLanczos.h
Go to the documentation of this file.
1 
14 #ifndef EIGENSOLVER_IRLANCZOS_INCLUDED
15 #define EIGENSOLVER_IRLANCZOS_INCLUDED
16 
17 #include "eigensolver.h"
18 #include "Fopr/fopr.h"
19 #include "Tools/sorter.h"
20 #include "bridge_complex.h"
21 
22 #include "IO/bridgeIO.h"
23 using Bridge::vout;
24 
25 
27 
41 {
42  public:
43  static const std::string class_name;
44 
45  private:
46 
47  int m_Nk;
48  int m_Np;
50  double m_Enorm_eigen;
51  double m_Vthreshold;
52 
55 
56  public:
58  : Eigensolver(), m_fopr(fopr), m_sorter(0) {}
59 
61  : Eigensolver(), m_fopr(fopr.get()), m_sorter(0) {}
62 
64 
65  void set_parameters(const Parameters& params);
66  void set_parameters(const int Nk, const int Np, const int Niter_eigen, const double Enorm_eigen,
67  const double Vthreshold);
68  void set_parameters(const std::string& sort_type,
69  const int Nk, const int Np, const int Niter_eigen, const double Enorm_eigen,
70  const double Vthreshold);
71 
72  void solve(std::vector<double>& TDa, std::vector<Field>& vk,
73  int& Nsbt, int& Nconv, const Field& b);
74 
75  private:
76  void step(const int Nm, const int k,
77  std::vector<double>& TDa,
78  std::vector<double>& TDb,
79  std::vector<Field>& vk, Field& f);
80 
81  void qrtrf(std::vector<double>& TDa, std::vector<double>& TDb,
82  const int Nk, const int Nm, std::vector<double>& Qt,
83  const double Dsh, const int kmin, const int kmax);
84 
85  void tqri(std::vector<double>& TDa, std::vector<double>& TDb,
86  const int Nk, const int Nm, std::vector<double>& Qt);
87 
88  void setUnit_Qt(const int Nm, std::vector<double>& Qt);
89 
90  void schmidt_orthogonalization(Field& w, const std::vector<Field>& vk, const int k);
91 };
92 #endif
void setUnit_Qt(const int Nm, std::vector< double > &Qt)
Eigenvalue solver with Implicitly Restarted Lanczos algorithm.
BridgeIO vout
Definition: bridgeIO.cpp:503
Definition: sorter.h:38
Container of Field-type object.
Definition: field.h:45
void solve(std::vector< double > &TDa, std::vector< Field > &vk, int &Nsbt, int &Nconv, const Field &b)
Class for parameters.
Definition: parameters.h:46
static const std::string class_name
void set_parameters(const Parameters &params)
Eigensolver_IRLanczos(unique_ptr< Fopr > &fopr)
void qrtrf(std::vector< double > &TDa, std::vector< double > &TDb, const int Nk, const int Nm, std::vector< double > &Qt, const double Dsh, const int kmin, const int kmax)
Eigensolver class for abstract base class of eigen solvers.
Definition: eigensolver.h:27
void step(const int Nm, const int k, std::vector< double > &TDa, std::vector< double > &TDb, std::vector< Field > &vk, Field &f)
void tqri(std::vector< double > &TDa, std::vector< double > &TDb, const int Nk, const int Nm, std::vector< double > &Qt)
Base class of fermion operator family.
Definition: fopr.h:46
void schmidt_orthogonalization(Field &w, const std::vector< Field > &vk, const int k)