Renormalized Susceptibility Code
D. Stanford
#include
#include
#include
#include
//VARIABLES
//number of ky momentum windows for the integral
int N=37;
//number of energy windows
const int M=1000;
float pi=3.14159265,w=1,qx=pi-.02,qy=pi-.02,eps=0.01,Emax=10,Emin=-10,dk=pi/float(N),dw=(Emax-Emin)/float(M);
float t=1;
float tprime=1;
float U=0;
float Delta=0;
int counter=0;
//STRUCTS
struct douglas{
float w;
float c;
float r;
}output[M+1];
//FUNCTIONS
float E(float kx, float ky);
float MatrixElement(float kx, float ky, float qx, float qy);
float Grad(float kx, float ky);
float L(float Edr,float Edl, float Eur, float Eul);
void ComputeBareSusceptibility();
void MakeRetarded();
void LadderSum();
void HilbertTransform();
void Outfile();
float SumRule();
float Grad2(float kx,float ky);
void InfileSusceptibility();
using namespace std;
int main(){
// InfileSusceptibility();
ComputeBareSusceptibility();
MakeRetarded();
HilbertTransform();
LadderSum();
Outfile();
return 0;
}
float E(float kx, float ky){
return(sqrt(4*t*t*(pow(cos(kx),2)+pow(cos(ky),2))+pow(Delta+4*tprime*sin(kx)*sin(ky),2)));
}
float MatrixElement(float kx, float ky, float qx, float qy){
return((E(kx+qx,ky+qy)*E(kx,ky)-4*t*t*(cos(kx+qx)*cos(kx)+cos(ky+qy)*cos(ky))-16*tprime*tprime*sin(kx+qx)*sin(ky+qy)*sin(kx)*sin(ky))/(2*E(kx,ky)*E(kx+qx,ky+qy)));
}
float L(float Edr, float Edl, float Eur, float Eul){
float t1=Edr/(Edr-Edl),t2=Edl/(Edl-Eul),t3=Eul/(Eul-Eur),t4=Eur/(Eur-Edr);
if((0>output[i].w;
infile>>output[i].c;
infile>>output[i].r;
}
}