Skip to content
Open
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions xfields/prebuild_kernels/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# copyright ############################### #
# This file is part of the Xfields package. #
# Copyright (c) CERN, 2025. #
# ######################################### #

from .elements import DEFAULT_XFIELDS_ELEMENTS
from .element_inits import XFIELDS_ELEMENTS_INIT_DEFAULTS
37 changes: 37 additions & 0 deletions xfields/prebuild_kernels/element_inits.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# copyright ############################### #
# This file is part of the Xfields package. #
# Copyright (c) CERN, 2025. #
# ######################################### #

import numpy as np


XFIELDS_ELEMENTS_INIT_DEFAULTS = {
'BeamBeamBiGaussian2D': {
'other_beam_Sigma_11': 1.,
'other_beam_Sigma_33': 1.,
'other_beam_num_particles': 0.,
'other_beam_q0': 1.,
'other_beam_beta0': 1.,
},
'BeamBeamBiGaussian3D': {
'slices_other_beam_zeta_center': np.array([0]),
'slices_other_beam_num_particles': np.array([0]),
'phi': 0.,
'alpha': 0,
'other_beam_q0': 1.,
'slices_other_beam_Sigma_11': np.array([1]),
'slices_other_beam_Sigma_12': np.array([0]),
'slices_other_beam_Sigma_22': np.array([0]),
'slices_other_beam_Sigma_33': np.array([1]),
'slices_other_beam_Sigma_34': np.array([0]),
'slices_other_beam_Sigma_44': np.array([0]),
},
'SpaceChargeBiGaussian': {
'longitudinal_profile': {
'__class__': 'LongitudinalProfileQGaussian',
'number_of_particles': 1,
'sigma_z': 0,
}
}
}
16 changes: 16 additions & 0 deletions xfields/prebuild_kernels/elements.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# copyright ############################### #
# This file is part of the Xfields package. #
# Copyright (c) CERN, 2025. #
# ######################################### #

from ..beam_elements.beambeam2d import BeamBeamBiGaussian2D
from ..beam_elements.beambeam3d import BeamBeamBiGaussian3D
from ..beam_elements.spacecharge import SpaceChargeBiGaussian


DEFAULT_XFIELDS_ELEMENTS = [
BeamBeamBiGaussian2D,
BeamBeamBiGaussian3D,
SpaceChargeBiGaussian,
]