28 SIZE,
"MULTIPOLET",
"The \"MULTIPOLET\" element defines a combined function multipole.") {
32 "Array of multipolar field strengths b_k. The field generated in the "
33 "flat top is B = b_k x^k [T m^(-k)]");
39 "MAXFORDER",
"Number of terms used in each fringe component",
DefaultMAXFORDER);
41 "ROTATION",
"Rotation angle about its axis for skew elements [rad]");
44 "BBLENGTH",
"Distance between centre of magnet and entrance [m]");
48 "ANGLE",
"The azimuthal angle of the magnet in ring [rad]", 0.0);
50 "MAXXORDER",
"Number of terms used in polynomial expansions",
DefaultMAXXORDER);
54 "VARRADIUS",
"Set true if radius of magnet is variable",
false);
56 "ENTRYOFFSET",
"Longitudinal offset from standard entrance point [m]", 0.0);
61 "The name of the time dependence model, which should give a scaling factor.");
87 "Attribute MAXFORDER must be >= 1.0");
90 WARNMSG(
"OpalMultipoleT::Update, a value of "
91 << maxFOrder <<
" for MAXFORDER may lead to excessive run time");
95 if(bendAngle != 0.0 && rotation != 0.0) {
97 "Non-zero ROTATION (a skew multipole) is only supported for straight magnets");
100 if(varRadius && bendAngle != 0.0) {
101 WARNMSG(
"OpalMultipoleT::Update, the variable radius multipole magnet implementation is very slow");
104 if((!varRadius || bendAngle == 0.0) && entryOffset != 0.0) {
106 "The ENTRYOFFSET is only supported for variable radius curved magnets");
117 multT->setBendAngle(bendAngle, varRadius);
119 multT->setFringeField(
122 multT->setTransProfile(tp);
123 multT->setMaxOrder(
static_cast<size_t>(maxFOrder),
125 multT->setRotation(rotation);
127 multT->setEntryOffset(entryOffset);
Attribute makeBool(const std::string &name, const std::string &help)
Make logical attribute.
double getReal(const Attribute &attr)
Return real value.
Attribute makeReal(const std::string &name, const std::string &help)
Make real attribute.
bool getBool(const Attribute &attr)
Return logical value.
Attribute makeRealArray(const std::string &name, const std::string &help)
Create real array attribute.
std::vector< double > getRealArray(const Attribute &attr)
Get array value.
std::string getString(const Attribute &attr)
Get string value.
Attribute makeString(const std::string &name, const std::string &help)
Make string attribute.
ElementBase * getElement() const
Return the embedded CLASSIC element.
void setElement(ElementBase *)
Assign new CLASSIC element.
std::vector< Attribute > itsAttr
The object attributes.
void setElementLength(double length) override
virtual void updateUnknown(ElementBase *)
Transmit the ``unknown'' (not known to OPAL) attributes to CLASSIC.
virtual void print(std::ostream &) const
Print the object.
virtual void update()
Update the embedded CLASSIC element.
OpalElement(int size, const char *name, const char *help)
Exemplar constructor.
void registerOwnership() const
OpalMultipoleT * clone(const std::string &name) override
static constexpr double MaximumMAXFORDER
static constexpr double DefaultMAXXORDER
void print(std::ostream &os) const override
Print the object.
static constexpr double DefaultMAXFORDER
static constexpr double MinimumMAXFORDER
The base class for all OPAL exceptions.