Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Diffractive Cross Section
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pyjorunk
Diffractive Cross Section
Commits
031af803
Commit
031af803
authored
1 month ago
by
Pyry Runko (Puck)
Browse files
Options
Downloads
Patches
Plain Diff
removed some lines, still some to remove
parent
db6faaae
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main.cpp
+2
-39
2 additions, 39 deletions
src/main.cpp
with
2 additions
and
39 deletions
src/main.cpp
+
2
−
39
View file @
031af803
...
...
@@ -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
;
i
ntegrateDipoleAmplitudes
(
&
ipglasma
,
task_id
);
i
pglasma
->
SumAmplitudes
(
task_id
);
}
else
if
(
!
argv
[
2
]){
...
...
@@ -175,7 +138,7 @@ int main(int argc, char* argv[])
}
else
{
double
sum
=
i
ntegrateDipole
Amplitudes
(
&
ipglasma
);
double
sum
=
i
pglasma
->
Sum
Amplitudes
();
// Save results
//std::filesystem::create_directory("output_"+fname);
ofstream
outfile
(
"da_sum_ +"
+
fname
+
".txt"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment