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

Add multipolar components to solenoid #500

Conversation

szymonlopaciuk
Copy link
Collaborator

@szymonlopaciuk szymonlopaciuk commented May 30, 2024

Description

  • Add knl, ksl and related fields to the solenoid element to implement multipolar components.
  • Also a small amount of refactoring in xtrack/beam_elements/slice_elements.py.
  • Also see a comment below.

Checklist

Mandatory:

  • I have added tests to cover my changes
  • All the tests are passing, including my new ones
  • I described my changes in this PR description

Optional:

  • The code I wrote follows good style practices (see PEP 8 and PEP 20).
  • I have updated the docs in relation to my changes, if applicable
  • I have tested also GPU contexts

#endif

#ifndef XTRACK_SOLENOID_NO_SYNRAD
Copy link
Collaborator Author

@szymonlopaciuk szymonlopaciuk May 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also: does this do the right thing? If XTRACK_SOLENOID_NO_SYNRAD is defined then the variables are not defined and the compilation will fail. Also these values are passed as pointers to Solenoid_thick_track_single_particle but their updated values were not used (now they are though -- is that the correct way?).

@giadarol giadarol changed the base branch from main to merge/solenoid_with_multipole May 31, 2024 13:13
@giadarol giadarol merged commit f9dde09 into xsuite:merge/solenoid_with_multipole May 31, 2024
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

Successfully merging this pull request may close these issues.

2 participants