1 | #if !defined(modelcalcs_h) |
---|
2 | #define modelcalcs_h |
---|
3 | |
---|
4 | typedef struct { |
---|
5 | double x; |
---|
6 | double y; |
---|
7 | double z; |
---|
8 | } SpacePoint; |
---|
9 | |
---|
10 | |
---|
11 | |
---|
12 | typedef struct { |
---|
13 | /// Volume points |
---|
14 | SpacePoint * points; |
---|
15 | /// Pair correlation function |
---|
16 | double * rho; |
---|
17 | /// Is rho already generated? |
---|
18 | int isRhoAvailable; |
---|
19 | /// Memory allocation flag |
---|
20 | int isPointMemAllocated; |
---|
21 | |
---|
22 | /// Volume points |
---|
23 | SpacePoint * points_2D; |
---|
24 | /// Pair correlation function |
---|
25 | float * rho_2D; |
---|
26 | /// Is rho already generated? |
---|
27 | int isRhoAvailable_2D; |
---|
28 | /// Memory allocation flag |
---|
29 | int isPointMemAllocated_2D; |
---|
30 | |
---|
31 | //TODO: add volume_points, r_points, step here... |
---|
32 | |
---|
33 | int volume_points; |
---|
34 | int r_points; |
---|
35 | |
---|
36 | float timePr_1D; |
---|
37 | float timePr_2D; |
---|
38 | float timeIq_1D; |
---|
39 | float timeIq_2D; |
---|
40 | |
---|
41 | int errorOccured; |
---|
42 | |
---|
43 | |
---|
44 | } CalcParameters; |
---|
45 | |
---|
46 | void modelcalculations_dealloc(CalcParameters *pars); |
---|
47 | void modelcalculations_init(CalcParameters *pars); |
---|
48 | void modelcalculations_reset(CalcParameters *pars); |
---|
49 | |
---|
50 | |
---|
51 | double modelcalculations_calculateIq_1D(double * rho, int r_points, double step, double q); |
---|
52 | int modelcalculations_calculatePairCorrelation_1D(SpacePoint * points, int volume_points, double * rho, int r_points, double size); |
---|
53 | |
---|
54 | double modelcalculations_calculateIq_2D(float * rho, int r_points, double step, double q, double phi); |
---|
55 | int modelcalculations_calculatePairCorrelation_2D(SpacePoint * points, int volume_points, float * rho, int r_points, double size); |
---|
56 | |
---|
57 | double modelcalculations_calculateIq_2D_3Darray(float * rho, int r_points, double step, double q, double phi); |
---|
58 | int modelcalculations_calculatePairCorrelation_2D_3Darray(SpacePoint * points, int volume_points, float * rho, int r_points, double size); |
---|
59 | SpacePoint modelcalculations_rotate(SpacePoint p, double theta, double phi, double omega); |
---|
60 | |
---|
61 | int modelcalculations_calculatePairCorrelation_2D_vector(SpacePoint * points, int volume_points, float * rho, |
---|
62 | int r_points, double bin_width, double theta_beam, double phi_beam, double omega_beam); |
---|
63 | |
---|
64 | #endif |
---|