45 "The \"MULTIPOLET\" element defines a combined function multipole.") {
47 (
"TP",
"Transverse Profile derivatives in T m^(-k)");
49 (
"LFRINGE",
"The length of the left end field [m]");
51 (
"RFRINGE",
"The length of the right end field [m]");
53 (
"HAPERT",
"The aperture width [m]");
55 (
"VAPERT",
"The aperture height [m]");
57 (
"ANGLE",
"The azimuthal angle of the magnet in ring [rad]");
59 (
"EANGLE",
"The entrance angle [rad]");
62 "Number of terms used in each field component");
65 "Number of terms used in polynomial expansions");
68 "Rotation angle about its axis for skew elements [rad]");
71 "Set true if radius of magnet is variable");
74 "Distance between centre of magnet and entrance [m]");
124 const std::vector<double> transProfile =
126 int transSize = transProfile.size();
128 if (transSize == 0) {
138 for(
int comp = 0; comp < transSize; comp++) {
139 double units = 10.*gsl_sf_pow_int(1
e-3, comp);
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.
constexpr double e
The value of.
ElementBase * getElement() const
Return the embedded CLASSIC element.
void setElement(ElementBase *)
Assign new CLASSIC element.
std::vector< Attribute > itsAttr
The object attributes.
virtual void setElementLength(double length)
Set design length.
void setBendAngle(double angle)
void setRotation(double rot)
void setMaxXOrder(std::size_t maxXOrder)
void setAperture(double vertAp, double horizAp)
void setMaxOrder(std::size_t maxOrder)
void setEntranceAngle(double entranceAngle)
void setTransMaxOrder(std::size_t transMaxOrder)
void setBoundingBoxLength(const double &boundingBoxLength)
bool setFringeField(double s0, double lambda_left, double lambda_right)
void setLength(double length)
void setTransProfile(std::size_t n, double Bn)
void initialise(PartBunchBase< double, 3 > *, double &startField, double &endField) 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.
void registerOwnership() const
virtual ~OpalMultipoleT()
virtual OpalMultipoleT * clone(const std::string &name)
void print(std::ostream &os) const
Print the object.