Skip to content
Snippets Groups Projects
Commit 031af803 authored by Pyry Runko (Puck)'s avatar Pyry Runko (Puck)
Browse files

removed some lines, still some to remove

parent db6faaae
No related branches found
No related tags found
No related merge requests found
......@@ -55,26 +55,6 @@ int printDipoleAmplitudes(string fname, IPGlasma ipglasma)
return 0;
}
void integrateDipoleAmplitudes(IPGlasma* ipglasma, int task_id)
{
//TODO: does data type matter?
double sum = ipglasma->SumAmplitudes(task_id);
cout << "# Task " << task_id << " partial sum = " << sum << endl;
//cout << "# Dipole amplitude integral = " << sum << endl;
// Save partial results
ofstream outfile("partial_sum_" + to_string(task_id) + ".txt");
outfile << sum;
outfile.close();
}
//TODO: check
double sumAmplitudes(IPGlasma *ipglasma)
{
#pragma omp parallel
{
int thread_id = omp_get_thread_num();
int num_threads = omp_get_num_threads();
......@@ -107,14 +87,6 @@ double sumAmplitudes(IPGlasma *ipglasma)
for(int l =0; l < L; l +=1){
int q1[2] = {i,j};
double r1 = ipglasma->DistanceToOrigin(q1);
//#pragma omp critical
//{
// cout << "# Hello from inside the l loop!" << endl;
// }
//TODO: pointer instead of copy?
//TODO: faster to get these two layers above?
//iWasHere += 1;
//quark = GetWilsonLine(WilsonLineCoordinate(i, j));
int q2[2] = {k,l};
//double r1 = ipglasma->DistanceToOrigin(q1);
double r2 = ipglasma->DistanceToOrigin(q2);
......@@ -144,15 +116,6 @@ double sumAmplitudes(IPGlasma *ipglasma)
return sum;
}
//TODO: does data type matter?
double integrateDipoleAmplitudes(IPGlasma* ipglasma)
{
//TODO: use ipglasma->SumAmplitudes();
return sumAmplitudes(ipglasma);
}
int main(int argc, char* argv[])
{
if (argc < 3 || argc > 4){
......@@ -167,7 +130,7 @@ int main(int argc, char* argv[])
if (argc > 3){
task_id= atoi(argv[3]);
cout << "#Integrating array job #" << task_id << endl;
integrateDipoleAmplitudes(&ipglasma, task_id);
ipglasma->SumAmplitudes(task_id);
}
else if (!argv[2]){
......@@ -175,7 +138,7 @@ int main(int argc, char* argv[])
}
else{
double sum = integrateDipoleAmplitudes(&ipglasma);
double sum = ipglasma->SumAmplitudes();
// Save results
//std::filesystem::create_directory("output_"+fname);
ofstream outfile("da_sum_ +" + fname + ".txt");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment