source: sasview/sansmodels/prototypes/src/modelCalculations.h @ 5425990

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since 5425990 was 7df1a50, checked in by Jae Cho <jhjcho@…>, 13 years ago

moving a file

  • Property mode set to 100644
File size: 2.0 KB
Line 
1#if !defined(modelcalcs_h)
2#define modelcalcs_h
3
4typedef struct {
5        double x;
6        double y;
7        double z;
8} SpacePoint;
9
10
11
12typedef 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
46void modelcalculations_dealloc(CalcParameters *pars);
47void modelcalculations_init(CalcParameters *pars);
48void modelcalculations_reset(CalcParameters *pars);
49
50
51double modelcalculations_calculateIq_1D(double * rho, int r_points, double step, double q);
52int modelcalculations_calculatePairCorrelation_1D(SpacePoint * points, int volume_points, double * rho, int r_points, double size);
53
54double modelcalculations_calculateIq_2D(float * rho, int r_points, double step, double q, double phi);
55int modelcalculations_calculatePairCorrelation_2D(SpacePoint * points, int volume_points, float * rho, int r_points, double size);
56
57double modelcalculations_calculateIq_2D_3Darray(float * rho, int r_points, double step, double q, double phi);
58int modelcalculations_calculatePairCorrelation_2D_3Darray(SpacePoint * points, int volume_points, float * rho, int r_points, double size);
59SpacePoint modelcalculations_rotate(SpacePoint p, double theta, double phi, double omega);
60
61int 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
Note: See TracBrowser for help on using the repository browser.