Skip to content

Commit

Permalink
Fix bug in unique ID specification for RF cavities. (#765)
Browse files Browse the repository at this point in the history
* Update RFCavity.H and add examples.

* Update example files.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Implement a simpler solution.

* Detailed example as a separate PR.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
cemitch99 and pre-commit-ci[bot] authored Nov 28, 2024
1 parent 1c3861f commit 640820d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/particles/elements/RFCavity.H
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ namespace RFCavityData
: Named(name),
Thick(ds, nslice),
Alignment(dx, dy, rotation_degree),
m_escale(escale), m_freq(freq), m_phase(phase), m_mapsteps(mapsteps)
m_escale(escale), m_freq(freq), m_phase(phase), m_mapsteps(mapsteps), m_id(RFCavityData::next_id)
{
// next created RF cavity has another id for its data
RFCavityData::next_id++;
Expand Down

0 comments on commit 640820d

Please sign in to comment.