meanfield.h Source File

LibRPA: meanfield.h Source File
LibRPA
meanfield.h
Go to the documentation of this file.
1 
5 #ifndef MEANFIELD_H
6 #define MEANFIELD_H
7 
8 #include <vector>
9 #include <map>
10 #include "matrix.h"
11 #include "complexmatrix.h"
12 #include "vector3_order.h"
13 
15 
19 class MeanField
20 {
21  private:
23  int n_spins;
25  int n_aos;
27  int n_bands;
29  int n_kpoints;
31  std::vector<matrix> eskb;
33  std::vector<matrix> wg;
35  std::vector<std::vector<ComplexMatrix>> wfc;
37  double efermi;
38  void resize(int ns, int nk, int nb, int nao);
39  public:
40  MeanField():
41  n_spins(0), n_aos(0), n_bands(0), n_kpoints(0)
42  {};
43  MeanField(int ns, int nk, int nb, int nao);
44  ~MeanField() {};
45  void set(int ns, int nk, int nb, int nao);
46  MeanField(const MeanField &);
47  inline int get_n_bands() const { return n_bands; }
48  inline int get_n_spins() const { return n_spins; }
49  inline int get_n_kpoints() const { return n_kpoints; }
50  inline int get_n_aos() const { return n_aos; }
51  inline double & get_efermi() { return efermi; }
52  inline const double & get_efermi() const { return efermi; }
53  std::vector<matrix> & get_eigenvals() { return eskb; }
54  const std::vector<matrix> & get_eigenvals() const { return eskb; }
55  std::vector<matrix> & get_weight() { return wg; }
56  const std::vector<matrix> & get_weight() const { return wg; }
58  ComplexMatrix get_dmat_cplx(int ispin, int ikpt) const;
59  ComplexMatrix get_dmat_cplx_R(int ispin, const std::vector<Vector3_Order<double>>& kfrac_list, const Vector3_Order<int>& R) const;
60  std::vector<std::vector<ComplexMatrix>> & get_eigenvectors() { return wfc; }
61  const std::vector<std::vector<ComplexMatrix>> & get_eigenvectors() const { return wfc; }
62  double get_E_min_max(double &emin, double &emax);
63  double get_band_gap();
64  std::map<double, std::map<Vector3_Order<int>, ComplexMatrix>> get_gf_cplx_imagtimes_Rs(int ispin, const std::vector<Vector3_Order<double>>& kfrac_list, std::vector<double> imagtimes, const std::vector<Vector3_Order<int>>& Rs) const;
65  std::map<double, std::map<Vector3_Order<int>, matrix>> get_gf_real_imagtimes_Rs(int ispin, const std::vector<Vector3_Order<double>>& kfrac_list, std::vector<double> imagtimes, const std::vector<Vector3_Order<int>>& Rs) const;
66  void allredue_wfc_isk();
67 };
68 
70 extern MeanField meanfield;
71 
72 #endif // ! MEANFIELD_H
Definition: complexmatrix.h:20
Object of the meanfield input of Green's function.
Definition: meanfield.h:20
ComplexMatrix get_dmat_cplx(int ispin, int ikpt) const
get the density matrix of a particular spin and kpoint
Definition: meanfield.cpp:110
Definition: vector3_order.h:15
Definition: matrix.h:23
utilies to handle square matrix and related operations
MeanField meanfield
A global MeanField object.
Definition: meanfield.cpp:231