Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose beam-beam data via Objects #26

Open
giadarol opened this issue Dec 2, 2018 · 0 comments
Open

Expose beam-beam data via Objects #26

giadarol opened this issue Dec 2, 2018 · 0 comments
Assignees
Milestone

Comments

@giadarol
Copy link
Contributor

giadarol commented Dec 2, 2018

Some questions to be discussed:

  • On the C side:
    • At the moment there is one big struct passed to the beam-beam track function
      • The struct contains other structs (see definitions reported below)
    • On the C side this makes the code quite clean, I would like to keep it as it is if there is no big drawback
  • Is it possible to leave the C side unchanged and expose the same data structure in python via CObjets?
  • If I look at the multipole all data is accessed via setters and getters. To to this here would imply writing some 100 functions here. Is it necessary? And if yes, can it be done automatically?

Here the struct definitions for reference:

typedef struct{
    SIXTRL_REAL_T sphi;
    SIXTRL_REAL_T cphi;
    SIXTRL_REAL_T tphi;
    SIXTRL_REAL_T salpha;
    SIXTRL_REAL_T calpha;
}BB6D_boost_data;

typedef struct{
    SIXTRL_REAL_T Sig_11_0;
    SIXTRL_REAL_T Sig_12_0;
    SIXTRL_REAL_T Sig_13_0;
    SIXTRL_REAL_T Sig_14_0;
    SIXTRL_REAL_T Sig_22_0;
    SIXTRL_REAL_T Sig_23_0;
    SIXTRL_REAL_T Sig_24_0;
    SIXTRL_REAL_T Sig_33_0;
    SIXTRL_REAL_T Sig_34_0;
    SIXTRL_REAL_T Sig_44_0;
}BB6D_Sigmas;

typedef struct{
    SIXTRL_REAL_T q_part;
    BB6D_boost_data parboost;
    BB6D_Sigmas Sigmas_0_star;
    SIXTRL_REAL_T min_sigma_diff;
    SIXTRL_REAL_T threshold_singular;
    SIXTRL_INT64_T N_slices;

    SIXTRL_REAL_T delta_x;
    SIXTRL_REAL_T delta_y;
    SIXTRL_REAL_T x_CO;
    SIXTRL_REAL_T px_CO;
    SIXTRL_REAL_T y_CO;
    SIXTRL_REAL_T py_CO;
    SIXTRL_REAL_T sigma_CO;
    SIXTRL_REAL_T delta_CO;
    SIXTRL_REAL_T Dx_sub;
    SIXTRL_REAL_T Dpx_sub;
    SIXTRL_REAL_T Dy_sub;
    SIXTRL_REAL_T Dpy_sub;
    SIXTRL_REAL_T Dsigma_sub;
    SIXTRL_REAL_T Ddelta_sub;
    SIXTRL_INT64_T enabled;

    SIXTRL_BE_DATAPTR_DEC SIXTRL_REAL_T* N_part_per_slice;
    SIXTRL_BE_DATAPTR_DEC SIXTRL_REAL_T* x_slices_star;
    SIXTRL_BE_DATAPTR_DEC SIXTRL_REAL_T* y_slices_star;
    SIXTRL_BE_DATAPTR_DEC SIXTRL_REAL_T* sigma_slices_star;
}BB6D_data;
@rdemaria rdemaria added this to the v0.2 milestone Apr 17, 2019
martinschwinzerl pushed a commit to martinschwinzerl/sixtracklib that referenced this issue Jul 26, 2019
@martinschwinzerl martinschwinzerl modified the milestones: v0.2, v1.0.0 Nov 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants