ImpactX
Loading...
Searching...
No Matches
impactx::elements::mixin Namespace Reference

Namespaces

namespace  detail

Classes

struct  Alignment
struct  BeamOptic
struct  HostOnly
struct  IncludesCollectiveEffects
struct  LinearTransport
struct  LinearTransport< T_Element, false >
struct  Named
struct  NoFinalize
struct  ParticlePush
struct  PipeAperture
struct  SpinTransport
struct  SynchrotronRadiation
struct  Thick
struct  Thin

Variables

template<typename T>
constexpr bool is_host_only_v = std::is_base_of_v<HostOnly, std::remove_cvref_t<T>>
template<typename T_Element>
constexpr bool is_thick_v = std::is_base_of_v<Thick, std::decay_t<T_Element>>
template<typename T_Element>
constexpr bool is_thin_v = std::is_base_of_v<Thin, std::decay_t<T_Element>>
template<typename T_Element>
constexpr bool is_named_v = std::is_base_of_v<Named, std::decay_t<T_Element>>
template<typename T_Element>
constexpr bool has_alignment_v = std::is_base_of_v<Alignment, std::decay_t<T_Element>>
template<typename T_Element>
constexpr bool has_pipe_aperture_v = std::is_base_of_v<PipeAperture, std::decay_t<T_Element>>
template<typename T_Element>
constexpr bool has_spin_transport_v = std::is_base_of_v<SpinTransport, std::decay_t<T_Element>>
template<typename T_Element>
constexpr bool has_synchrotron_radiation_v
template<typename T_Element>
constexpr bool has_includes_collective_effects_flag_v
template<typename T_Element>
constexpr bool has_settable_ds_v
template<typename T_Element>
constexpr bool has_settable_nslice_v
template<typename T_Element>
constexpr bool can_slice_v = is_thick_v<T_Element>

Variable Documentation

◆ can_slice_v

template<typename T_Element>
bool impactx::elements::mixin::can_slice_v = is_thick_v<T_Element>
inlineconstexpr

Can this element be subdivided by overriding its slice count?

True exactly for the elements that derive their per-push transport length from their own nslice() at push time, i.e. everything deriving from

See also
Thick. Only for those does temporarily raising the slice count actually shorten the transport of one push,
ScopedNslice in helper/Accessors.H.

This is deliberately narrower than

See also
has_settable_nslice_v:
  • Programmable stores a slice count, but its push is an opaque user callback. The callback reads ds and nslice from the user's own Python object, while the lattice holds a copy — a temporary override is invisible to it, and the callback would transport a full slice on each of the two half-maps.
  • LinearMap and SpinMap have a finite ds but no slice count to raise: their nslice() returns a literal 1.

◆ has_alignment_v

template<typename T_Element>
bool impactx::elements::mixin::has_alignment_v = std::is_base_of_v<Alignment, std::decay_t<T_Element>>
inlineconstexpr

Does this element support alignment errors (

See also
Alignment)?

◆ has_includes_collective_effects_flag_v

template<typename T_Element>
bool impactx::elements::mixin::has_includes_collective_effects_flag_v
inlineconstexpr
Initial value:
=
std::is_base_of_v<IncludesCollectiveEffects, std::decay_t<T_Element>>

Does this element carry the includes_collective_effects flag (

See also
IncludesCollectiveEffects)?
includes_collective_effects in helper/Accessors.H for the run-time value.

◆ has_pipe_aperture_v

template<typename T_Element>
bool impactx::elements::mixin::has_pipe_aperture_v = std::is_base_of_v<PipeAperture, std::decay_t<T_Element>>
inlineconstexpr

Does this element support a transverse beam pipe aperture (

See also
PipeAperture)?

◆ has_settable_ds_v

template<typename T_Element>
bool impactx::elements::mixin::has_settable_ds_v
inlineconstexpr
Initial value:
= std::conjunction_v<
std::bool_constant<!is_thin_v<T_Element>>,
>

Can this element's segment length be set?

True for all finite-length elements: everything deriving from

See also
Thick, plus Programmable, LinearMap and SpinMap, which carry their own m_ds.

The !is_thin_v term is load-bearing and not redundant with the member detection: ThinDipole is a zero-length element (

See also
Thin, so ds() returns 0) that nevertheless owns an m_ds member holding its effective (equivalent) arc length theta * rc. Detection alone would let a setter silently overwrite that with a segment length.

◆ has_settable_nslice_v

template<typename T_Element>
bool impactx::elements::mixin::has_settable_nslice_v
inlineconstexpr
Initial value:
= std::conjunction_v<
std::bool_constant<!is_thin_v<T_Element>>,
>

Can this element's slice count be set?

True for everything deriving from

See also
Thick, plus Programmable, which carries its own m_nslice. False for LinearMap and SpinMap: those have a finite ds but their nslice() returns a literal 1.

◆ has_spin_transport_v

template<typename T_Element>
bool impactx::elements::mixin::has_spin_transport_v = std::is_base_of_v<SpinTransport, std::decay_t<T_Element>>
inlineconstexpr

Does this element support spin transport (

See also
SpinTransport)?

◆ has_synchrotron_radiation_v

template<typename T_Element>
bool impactx::elements::mixin::has_synchrotron_radiation_v
inlineconstexpr
Initial value:
=
std::is_base_of_v<SynchrotronRadiation, std::decay_t<T_Element>>

Does this element emit synchrotron radiation (

See also
SynchrotronRadiation)?

◆ is_host_only_v

template<typename T>
bool impactx::elements::mixin::is_host_only_v = std::is_base_of_v<HostOnly, std::remove_cvref_t<T>>
inlineconstexpr

True if T carries host-only state

◆ is_named_v

template<typename T_Element>
bool impactx::elements::mixin::is_named_v = std::is_base_of_v<Named, std::decay_t<T_Element>>
inlineconstexpr

Does this element carry a user-settable name (

See also
Named)?

◆ is_thick_v

template<typename T_Element>
bool impactx::elements::mixin::is_thick_v = std::is_base_of_v<Thick, std::decay_t<T_Element>>
inlineconstexpr

Does this element have a finite length (

See also
Thick)?

◆ is_thin_v

template<typename T_Element>
bool impactx::elements::mixin::is_thin_v = std::is_base_of_v<Thin, std::decay_t<T_Element>>
inlineconstexpr

Does this element have zero length (

See also
Thin)?