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

Overwrite of RF coefficients in successive cavities #764

Open
cemitch99 opened this issue Nov 27, 2024 · 1 comment
Open

Overwrite of RF coefficients in successive cavities #764

cemitch99 opened this issue Nov 27, 2024 · 1 comment
Assignees
Labels
bug: affects latest release Bug also exists in latest release version

Comments

@cemitch99
Copy link
Member

cemitch99 commented Nov 27, 2024

When multiple thick RF cavities with distinct on-axis Fourier coefficients are specified as input, coefficients of earlier cavities appear to be overwritten with coefficients of the last cavity specified. In the case of Python input, this occurs even if the cavity does not appear in the lattice line.

  • In the attached Python example, the code yields different output if the line defining "rf2" is uncommented.
  • In the attached C++ input example, the energy evolution through the first cavity changes when the cavity "rf2" is added.

run_rfcavity_bug.txt
input_rfcavity_bug.txt

@cemitch99 cemitch99 self-assigned this Nov 27, 2024
@cemitch99 cemitch99 added bug Something isn't working bug: affects latest release Bug also exists in latest release version and removed bug Something isn't working labels Nov 27, 2024
@cemitch99 cemitch99 added this to the Advanced Methods (SciDAC-5) milestone Nov 27, 2024
@cemitch99 cemitch99 changed the title Overwrite of RF coefficients in successive cavities for Python input Overwrite of RF coefficients in successive cavities Nov 27, 2024
@cemitch99
Copy link
Member Author

When running with C++/app input, adding a print statement to write cos_coef[0] and sin_coef[0] at line 230-231 in InitElement.cpp eliminates this problem. Could this be due to dynamic data shuffling in namespace RFCavityData (RFCavity.H)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: affects latest release Bug also exists in latest release version
Projects
None yet
Development

No branches or pull requests

1 participant