-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
93 lines (80 loc) · 2.11 KB
/
Copy pathmain.cpp
File metadata and controls
93 lines (80 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#include <cstdio>
#include <cstdlib>
#include "Emulator.h"
#include "localGt+.h"
#include "phaseShift.h"
int main (int argc, char **argv){
double energy = 50., l = 0;
if(argc != 3){
puts("usage: first argument 'Energy in MeV'; second argument 'l'. Using default values.");
} else {
energy = std::atof(argv[1]);
l = std::atoi(argv[2]);
}
std::vector<Lecs> trainingPoints; trainingPoints.reserve(8);
std::vector<Lecs> testingPoints; testingPoints.reserve(8);
trainingPoints.push_back({5.,
0.2,
-0.14084,
0.04243,
-0.12338,
0.11018,
-2.11254,
0.15898,
-0.26994,
0.04344,
0.062963});
trainingPoints.push_back({6.,
0.2,
-0.14084,
0.04243,
-0.12338,
0.11018,
-2.11254,
0.15898,
-0.26994,
0.04344,
0.062963});
trainingPoints.push_back({5.,
0.3,
-0.14084,
0.04243,
-0.12338,
0.11018,
-2.11254,
0.15898,
-0.26994,
0.04344,
0.062963});
trainingPoints.push_back({6.,
0.3,
-0.14084,
0.04243,
-0.12338,
0.11018,
-2.11254,
0.15898,
-0.26994,
0.04344,
0.062963});
testingPoints.push_back({5.43850,
0.27672,
-0.14084,
0.04243,
-0.12338,
0.11018,
-2.11254,
0.15898,
-0.26994,
0.04344,
0.062963});
// trainingPoints.push_back(testingPoints[0]);
Emulator emu(trainingPoints, energy, l);
double phaseShift;
emu.emulate(&phaseShift, testingPoints[0]);
puts("\nre-calculate using external functions");
emulator_startSession((int)trainingPoints.size(), &trainingPoints[0], energy, l);
emulator_emulate(&testingPoints[0], &phaseShift);
emulator_closeSession();
return EXIT_SUCCESS;
}