36 VariantType
const& element_variant,
41 bool element_has_isr =
false;
43 if (std::holds_alternative<elements::Sbend>(element_variant))
45 auto& element = std::get<elements::Sbend>(element_variant);
46 R = std::abs(element.m_rc);
47 element_has_isr =
true;
49 else if (std::holds_alternative<elements::CFbend>(element_variant))
51 auto& element = std::get<elements::CFbend>(element_variant);
52 R = std::abs(element.m_rc);
53 element_has_isr =
true;
55 else if (std::holds_alternative<elements::ExactSbend>(element_variant))
57 auto& element = std::get<elements::ExactSbend>(element_variant);
58 R = std::abs(element.rc(refpart));
59 element_has_isr =
true;
62 return {element_has_isr, R};
Definition ChargeBinning.cpp:17
std::tuple< bool, amrex::Real > ISRBendElement(VariantType const &element_variant, RefPart const &refpart)
Definition ISRBendElement.H:35