NanoStructures  1.0
DMFT solver for layered, strongly correlated nanostructures
dmftab.h
1 #ifndef DMFTAB_H
2 #define DMFTAB_H
3 
4 #include "../math/cfunction.h"
5 #include "dos.h"
6 
7 namespace config {
8  class Configuration;
9 }
10 
11 namespace dmft {
12 class DMFTAB
13 {
14 public:
15  DMFTAB();
16  ~DMFTAB();
17 
18  void configure(config::Configuration& configuration);
19 
20  //getters and setters
21  void setU(double U) { m_U = U; }
22  void setMu(double mu) { m_mu = mu; }
23  void setT(double T) { m_T = T; }
24  void setDelta(double delta) { m_delta = delta; }
25  void setTolerance(double tolerance) { m_tolerance = tolerance; }
26  void setMaxIterations(int maxIterations) { m_maxIterations = maxIterations; }
27  inline double getT() { return m_T; }
28  inline double getU() { return m_U; }
29  inline double getMu() { return m_mu; }
30  inline double getDelta() { return m_delta; }
31  inline double getScaling() { return m_scaling; }
32  void setStartWithDelta(bool startWithDelta) { m_startWithDelta = startWithDelta; }
33  void setScaling(double scaling) { m_scaling = scaling; }
34  math::CFunction getSelfEnergyA() const { return m_selfEnergyA; }
35  math::CFunction getGreensFunctionA() const { return m_greenFunctionA; }
36  math::CFunction getHybridizationFunctionA() const { return m_effectiveMediumA; }
37  math::CFunction getSelfEnergyB() const { return m_selfEnergyB; }
38  math::CFunction getGreensFunctionB() const { return m_greenFunctionB; }
39  math::CFunction getHybridizationFunctionB() const { return m_effectiveMediumB; }
40  double getOccupation() const { return m_n; }
41  double getMagnetization() const { return m_m; }
42  void setSelfEnergyA(const math::CFunction& selfEnergy) { m_selfEnergyA = selfEnergy; }
43  void setGreensFunctionA(const math::CFunction& G) { m_greenFunctionA = G; }
44  void setHybridizationFunctionA(const math::CFunction& delta) { m_effectiveMediumA = delta; }
45  void setSelfEnergyB(const math::CFunction& selfEnergy) { m_selfEnergyB = selfEnergy; }
46  void setGreensFunctionB(const math::CFunction& G) { m_greenFunctionB = G; }
47  void setHybridizationFunctionB(const math::CFunction& delta) { m_effectiveMediumB = delta; }
48 
49  void solve(std::string outputDirectory = "");
50 protected:
51  inline static double gAReal(double epsk, int nOmega, double omega, std::complex<double> fomegaA, std::complex<double> fomegaB, void * params) {
52  DMFTAB* dmft = static_cast<DMFTAB*>(params);
53  std::complex<double> z(omega, dmft->getDelta());
54  std::complex<double> XAup = z + dmft->getMu() + dmft->getU()/2.0 - fomegaA;
55  std::complex<double> XBup = z + dmft->getMu() + dmft->getU()/2.0 - fomegaB;
56  return (XBup / (XAup * XBup - epsk * epsk)).real() * dos::rho3(epsk);
57  }
58 
59  inline static double gAImag(double epsk, int nOmega, double omega, std::complex<double> fomegaA, std::complex<double> fomegaB, void * params) {
60  DMFTAB* dmft = static_cast<DMFTAB*>(params);
61  std::complex<double> z(omega, dmft->getDelta());
62  std::complex<double> XAup = z + dmft->getMu() + dmft->getU()/2.0 - fomegaA;
63  std::complex<double> XBup = z + dmft->getMu() + dmft->getU()/2.0 - fomegaB;
64  return (XBup / (XAup * XBup - epsk * epsk)).imag() * dos::rho3(epsk);
65  }
66 
67  inline static double gBReal(double epsk, int nOmega, double omega, std::complex<double> fomegaA, std::complex<double> fomegaB, void * params) {
68  DMFTAB* dmft = static_cast<DMFTAB*>(params);
69  std::complex<double> z(omega, dmft->getDelta());
70  std::complex<double> XAdown = z + dmft->getMu() + dmft->getU()/2.0 - fomegaB;
71  std::complex<double> XBdown = z + dmft->getMu() + dmft->getU()/2.0 - fomegaA;
72  return (XBdown / (XAdown * XBdown - epsk * epsk)).real() * dos::rho3(epsk);
73  }
74 
75  inline static double gBImag(double epsk, int nOmega, double omega, std::complex<double> fomegaA, std::complex<double> fomegaB, void * params) {
76  DMFTAB* dmft = static_cast<DMFTAB*>(params);
77  std::complex<double> z(omega, dmft->getDelta());
78  std::complex<double> XAdown = z + dmft->getMu() + dmft->getU()/2.0 - fomegaB;
79  std::complex<double> XBdown = z + dmft->getMu() + dmft->getU()/2.0 - fomegaA;
80  return (XBdown / (XAdown * XBdown - epsk * epsk)).imag() * dos::rho3(epsk);
81  }
82 
83  inline static double fAReal(double epsk, int nOmega, double omega, std::complex<double> fomegaA, std::complex<double> fomegaB, void * params) {
84  DMFTAB* dmft = static_cast<DMFTAB*>(params);
85  return 0;
86  }
87 
88  inline static double fAImag(double epsk, int nOmega, double omega, std::complex<double> fomegaA, std::complex<double> fomegaB, void * params) {
89  DMFTAB* dmft = static_cast<DMFTAB*>(params);
90  return 0;
91 
92  }
93 
94  inline static double fBReal(double epsk, int nOmega, double omega, std::complex<double> fomegaA, std::complex<double> fomegaB, void * params) {
95  DMFTAB* dmft = static_cast<DMFTAB*>(params);
96  return 0;
97 
98  }
99 
100  inline static double fBImag(double epsk, int nOmega, double omega, std::complex<double> fomegaA, std::complex<double> fomegaB, void * params) {
101  DMFTAB* dmft = static_cast<DMFTAB*>(params);
102  return 0;
103 
104  }
105 
106 
107  void calculateGFAInt();
108  void calculateGFBInt();
109  void calculateFFAInt();
110  void calculateFFBInt();
111 
112 
113 
114  double m_U;
115  double m_T;
116  double m_mu;
117  double m_delta;
118 
119  double m_scaling;
120  double m_tolerance;
121  int m_maxIterations;
122 
123  bool m_startWithDelta;
124 
125  math::CFunction m_selfEnergyA;
126  math::CFunction m_selfEnergyB;
127  math::CFunction m_greenFunctionA;
128  math::CFunction m_greenFunctionB;
129  math::CFunction m_fFunctionA;
130  math::CFunction m_fFunctionB;
131  math::CFunction m_effectiveMediumA;
132  math::CFunction m_effectiveMediumB;
133 
134  double m_n;
135  double m_m;
136 
137  config::Configuration* m_configuration;
138 };
139 }
140 
141 #endif // DMFTAB_H
Definition: dmftab.h:12
A configuration object which is populated from a configuration file and allows to query and modify co...
Definition: configuration.h:46
Discretized complex-valued function for real arguments.
Definition: cfunction.h:34