Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions xtrack/multiline/multiline.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,17 @@ def configure_beambeam_interactions(self, num_particles,

'''

# Check that the context in which the trackers are built is on CPU
for nn in ["clockwise", "anticlockwise"]:
if self._bb_config[f"{nn}_line"] is None:
continue
line = self.lines[self._bb_config[f"{nn}_line"]]
if not isinstance(line.tracker._context, xo.ContextCpu):
raise ValueError(
"The trackers need to be built on CPU before "
"configuring the beam-beam elements."
)

if self._bb_config['dataframes']['clockwise'] is not None:
bb_df_cw = self._bb_config['dataframes']['clockwise'].copy()
else:
Expand Down