1 #ifndef NANOSTRUCTURE_H
2 #define NANOSTRUCTURE_H
4 #include "../math/cfunction.h"
5 #include "../math/function.h"
6 #include "../dmft/dos.h"
7 #include "../math/physics.h"
8 #include "../config/configuration.h"
9 #include "layerparameters.h"
52 std::complex<double> left(
int nLayer,
int nOmega,
double epsk);
53 std::complex<double> right(
int nLayer,
int nOmega,
double epsk);
55 void precalc_L(
int nLayer,
int nOmega,
double epsk);
56 void precalc_R(
int nLayer,
int nOmega,
double epsk);
57 void precalc_dL(
int nLayer,
int nOmega,
double epsk);
58 void precalc_dR(
int nLayer,
int nOmega,
double epsk);
60 double Pi(
int alpha,
int gamma,
int delta,
int nOmega,
double epsk);
62 std::complex<double> G(
int nLayer,
int nOmega,
double epsk);
63 std::complex<double> F(
int nLayer,
int nOmega,
double epsk);
68 std::complex<double> GOff(
int alpha,
int beta,
int nOmega,
double epsk);
71 void updatePotentials();
72 void initializePotentials();
74 double calculateOccupationFromG(
int layer,
double mu = 0.0);
75 double totalExcessCharge(
double mu);
79 double calculateSigmaXX(
int alpha,
int beta);
80 double calculatePiXY(
int alpha,
int gamma,
int delta);
81 double calculateSigmaXX(
int alpha,
int beta,
mpi::OpenMPI& mpi);
82 double calculatePiXY(
int alpha,
int gamma,
int delta,
mpi::OpenMPI& mpi);
85 bool areAllSelfEnergySizesEqual();
86 bool isScalingCompatibleWithSelfEnergies();
89 void setMaxIterations(
int maxIterations) { m_maxIterations = maxIterations; }
91 void setHoppings(
double tL,
double tR);
94 inline double getT()
const {
return m_T; }
96 void setAlphaV(
double alphaV) { m_alphaV = alphaV; }
97 void setCalculateRhoXX(
bool calc) { m_calculateRhoXX = calc; }
98 void setCalculateRhoXY(
bool calc) { m_calculateRhoXY = calc; }
99 void setVerbose(
bool verbose) { m_verbose = verbose; }
100 void setSymmetricNano(
bool symmetric) { m_symmetricNano = symmetric; }
101 bool isSymmetricNano() {
return m_symmetricNano; }
103 void setMu(
int nLayer,
double mu) { m_mu[nLayer] = mu; }
104 void setSelfEnergy(
int nLayer,
const math::CFunction& S) { m_selfEnergies[nLayer] = S; }
105 void setU(
int nLayer,
double U) { m_U[nLayer] = U; }
106 void setDoECR(
bool ecr) { m_doECR = ecr; }
108 void writeBinary(std::string directory);
109 void readBinary(std::string directory);
112 double doNRG(
int layer);
114 void allocate(
int N);
116 typedef std::map<std::string, nano::LayerParameters> tPMap;
117 tPMap parseStructure(
const libconfig::Config& structure);
135 double* m_rhoBackground;
140 bool m_symmetricNano;
148 double* m_similarities;
157 bool m_calculateRhoXX;
158 bool m_calculateRhoXY;
163 std::complex<double> *m_L;
164 std::complex<double> *m_dL;
165 std::complex<double> *m_R;
166 std::complex<double> *m_dR;
167 std::complex<double> *m_temp;
173 inline static std::complex<double> fermiWrapper(
double omega, std::complex<double> fomega,
void* parameters) {
174 double * beta =
static_cast<double*
>(parameters);
175 return math::physics::fermi(*beta, omega);
179 inline static double gReal(
double epsk,
int nOmega,
double omega, std::complex<double> fomega,
void * params) {
181 return dmft::dos::rho2(epsk) * parameters->structure->G(parameters->nLayer, nOmega, epsk ).real();
183 inline static double gImag(
double epsk,
int nOmega,
double omega, std::complex<double> fomega,
void * params) {
185 return dmft::dos::rho2(epsk) * parameters->structure->G(parameters->nLayer, nOmega, epsk ).imag();
187 inline static double fReal(
double epsk,
int nOmega,
double omega, std::complex<double> fomega,
void * params) {
189 return dmft::dos::rho2(epsk) * parameters->structure->F(parameters->nLayer, nOmega, epsk ).real();
191 inline static double fImag(
double epsk,
int nOmega,
double omega, std::complex<double> fomega,
void * params) {
193 return dmft::dos::rho2(epsk) * parameters->structure->F(parameters->nLayer, nOmega, epsk ).imag();
203 inline static double sigmaXX(
double epsk,
int nOmega,
double omega, std::complex<double> fomega,
void * params) {
205 return std::pow(parameters->structure->GOff(parameters->alpha, parameters->beta, nOmega, epsk ).imag(),2) * dmft::dos::rhoXX(epsk);
208 inline static double piXY(
double epsk,
int nOmega,
double omega, std::complex<double> fomega,
void * params) {
210 return parameters->structure->Pi(parameters->alpha, parameters->gamma, parameters->delta, nOmega, epsk);
216 #endif // NANOSTRUCTURE_H
The MPI singleton is responsible for data exchange between compute nodes via OpenMPI.
Definition: openmpi.h:35
Definition: nanostructure.h:23
Definition: nanostructure.h:40
A configuration object which is populated from a configuration file and allows to query and modify co...
Definition: configuration.h:46
Definition: nanostructure.h:27
Definition: nanostructure.h:33
Discretized complex-valued function for real arguments.
Definition: cfunction.h:34