OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
OpalMultipoleT.h
Go to the documentation of this file.
1//
2// Class OpalMultipoleT
3// The Opal MultipoleT element.
4//
5// Copyright (c) 2017 - 2025, Titus Dascalu
6// Chris Rogers, STFC Rutherford Appleton Laboratory, Didcot, UK
7// Jon Thompson, STFC Rutherford Appleton Laboratory, Didcot, UK
8// All rights reserved
9//
10// This file is part of OPAL.
11//
12// OPAL is free software: you can redistribute it and/or modify
13// it under the terms of the GNU General Public License as published by
14// the Free Software Foundation, either version 3 of the License, or
15// (at your option) any later version.
16//
17// You should have received a copy of the GNU General Public License
18// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
19//
20#ifndef OPAL_OPALMULTIPOLET_HH
21#define OPAL_OPALMULTIPOLET_HH
22
24
25class OpalMultipoleT final: public OpalElement {
26
27public:
28 // The attributes of class OpalMultipoleT
29 enum {
30 TP = COMMON, // Transverse field components
31 // Attributes for a straight multipole
32 RFRINGE, // Length of right fringe field
33 LFRINGE, // Length of left fringe field
34 HAPERT, // Aperture horizontal dimension
35 VAPERT, // Aperture vertical dimension
36 MAXFORDER, // Maximum order in the field expansion
37 ROTATION, // Rotation angle about central axis for skew elements
38 EANGLE, // Entrance angle
39 BBLENGTH, // Length within which field is calculated
40 // Further attributes for a constant radius curved multipole
41 ANGLE, // Bending angle of a sector magnet
42 MAXXORDER, // Maximum order in x in polynomial expansions
43 // Further attributes for a variable radius multipole
44 VARRADIUS, // Variable radius flag
45 ENTRYOFFSET, // Longitudinal offset from standard entrance point
46 // Time dependence
47 SCALING_MODEL, // Name of a time dependence object
48 SIZE // size of the enum
49 };
50
53
55 OpalMultipoleT* clone(const std::string& name) override;
56
58 void update() override;
59
60 void print(std::ostream& os) const override;
61
62private:
63 // Not implemented.
65 void operator=(const OpalMultipoleT&) = delete;
66
68 static constexpr double DefaultMAXFORDER = 3.0;
69 static constexpr double MinimumMAXFORDER = 1.0;
70 static constexpr double MaximumMAXFORDER = 20.0;
71 static constexpr double DefaultMAXXORDER = 20.0;
72
73 // Clone constructor.
74 OpalMultipoleT(const std::string& name, OpalMultipoleT* parent);
75};
76
77#endif // OPAL_OpalMultipoleT_HH
const std::string name
OpalElement(int size, const char *name, const char *help)
Exemplar constructor.
OpalMultipoleT * clone(const std::string &name) override
void operator=(const OpalMultipoleT &)=delete
static constexpr double MaximumMAXFORDER
OpalMultipoleT(const OpalMultipoleT &)=delete
static constexpr double DefaultMAXXORDER
void update() override
void print(std::ostream &os) const override
Print the object.
static constexpr double DefaultMAXFORDER
static constexpr double MinimumMAXFORDER