diff --git a/src/ipglasma.cpp b/src/ipglasma.cpp index b356be9614a0bb3331e48afa2dd78d88c21aeecc..77781e6e350882e17c2925195f94c96af625389c 100644 --- a/src/ipglasma.cpp +++ b/src/ipglasma.cpp @@ -475,6 +475,7 @@ int IPGlasma::WilsonLineCoordinate(int xind, int yind) } + // compute complex amplitude with one wilson line and two indices std::complex<double> IPGlasma::ComplexAmplitude(double xpom, WilsonLine quark, int q2[2]) { @@ -517,57 +518,7 @@ std::complex<double> IPGlasma::ComplexAmplitude(double xpom, WilsonLine quark, i return amp; } -// overload amplitude when given coordinates are integers i.e. indices -std::complex<double> IPGlasma::ComplexAmplitude(double xpom, int q1[2], int q2[2]) -{ - //TODO: make work with int? - //ApplyPeriodicBoundaryConditions(q1); - //ApplyPeriodicBoundaryConditions(q2); - // TODO: make work with indices (xMax? - // Out of grid? Return 0 (probably very large dipole) - - //if (q1[0] < xcoords[0] or q1[0] > xcoords[xcoords.size()-1] - // or q1[1] < ycoords[0] or q1[1] > ycoords[ycoords.size()-1] - // etc... - // ?TODO?: (double?) check if dipole is less than lattice spacing - - // First find corresponding grid indeces - WilsonLine quark = GetWilsonLine(WilsonLineCoordinate(q1[0], q1[1])); - WilsonLine antiquark = GetWilsonLine(WilsonLineCoordinate(q2[0], q2[1])); - - //antiquark = antiquark.HermitianConjugate(); - - WilsonLine prod; - try { - prod = quark.MultiplyByHermitianConjugate(antiquark); - //prod = quark*antiquark; - } catch (...) { - cerr << "Matrix multiplication failed!" << endl; - cout << "Quark: " << q1[0] << ", " << q1[1] << endl; - cout << quark << endl; - cout << "Antiquark: " << q2[0] << ", " << q2[1] << endl; - cout << antiquark << endl; - exit(1); - } - std::complex<double > amp = 1.0 - 1.0/NC * prod.Trace(); - - double result = amp.real(); - if (result < 0) return 0; - return result; - if (result > 1) - return 1; - if (result < 0) - return 0; - - if (isnan(result)) - { - cerr << "Wilson line trance NaN, quark coords " << q1[0] << ", " << q1[1] << " and " << q2[0] << ", " << q2[1] << endl; - exit(1); - } - - return result; -} //TODO: check double IPGlasma::DistanceToOrigin(int q[2]){ @@ -580,40 +531,6 @@ double IPGlasma::DistanceToOrigin(int q[2]){ } -//TODO: check -std::complex<double> IPGlasma::SumAmplitudes(int w) -{ - std::complex<double> sum = 0.0; - int L = xcoords.size(); - cout << "# Summing with lattice size L = " << L << endl; - WilsonLine quark; - for(int i =0; i < L; i += 1){ - for(int j =0; j < L; j += 1){ - int q1[2] = {i,j}; - //TODO: pointer instead of copy? - quark = GetWilsonLine(WilsonLineCoordinate(i, j)); - for(int v =0; v < L; v +=1){ - int q2[2] = {v,w}; - double r1 = DistanceToOrigin(q1); - double r2 = DistanceToOrigin(q2); - if (r1 > 1. && r2 > 1.){ - //cout << "#!!Throwing away large dipole separation!" << endl; - //cout << "#Quark coordinate indices " << q1[0] << "," << q1[1] << " and " << q2[0] << "," << q2[1] << endl; - //cout << "#Dipole size is " << r1-r2 << endl; - //cout << "#Dipole amplitude is " << Amplitude(0, q1, q2) << endl; - continue; - } - - sum += ComplexAmplitude(0, quark, q2); - } - } - } - cout << "# Intermediate sum" << endl; - cout << sum << endl; - cout << "#---------" << endl; - - return sum; -} //TODO: check std::complex<double> IPGlasma::SumAmplitudes() diff --git a/src/ipglasma.hpp b/src/ipglasma.hpp index 1da59da3353e0f64580bfa894f6c773bc1c48000..049caade4024b0e13b8091c9c47e9514d2060168 100644 --- a/src/ipglasma.hpp +++ b/src/ipglasma.hpp @@ -60,7 +60,6 @@ public: std::complex<double> ComplexAmplitude(double xpom, int q1[2], int q2[2]); std::complex<double> ComplexAmplitude(double xpom, WilsonLine quark, int q2[2]); std::complex<double> SumAmplitudes(); - std::complex<double> SumAmplitudes(int w); struct quark_flavor{ double mass; diff --git a/src/main.cpp b/src/main.cpp index 064ae291aa1d43ae4bf0dcef7c220fe7f8e21ea2..9c7da0e57f47adfa555b1359bd55e06ef226751b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -77,13 +77,6 @@ int main(int argc, char* argv[]) printDipoleAmplitudes(fname, ipglasma); } - int task_id = 0; - if (argc > 3){ - task_id= atoi(argv[3]); - cout << "#Integrating array job #" << task_id << endl; - ipglasma.SumAmplitudes(task_id); - } - else{ std::complex<double> sum = ipglasma.SumAmplitudes();