OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
OpalMultipoleT.h
Go to the documentation of this file.
1//
2// Copyright (c) 2026, Paul Scherrer Institute, Villigen PSI, Switzerland
3// All rights reserved
4//
5// This file is part of OPAL.
6//
7// OPAL is free software: you can redistribute it and/or modify
8// it under the terms of the GNU General Public License as published by
9// the Free Software Foundation, either version 3 of the License, or
10// (at your option) any later version.
11//
12// You should have received a copy of the GNU General License
13// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
14//
15
16#ifndef OPAL_OPALMULTIPOLET_HH
17#define OPAL_OPALMULTIPOLET_HH
18
20
21class OpalMultipoleT final : public OpalElement {
22public:
23 // The attributes of class OpalMultipoleT
24 enum {
25 TP = COMMON, // Transverse field components
26 // Attributes for a straight multipole
27 RFRINGE, // Length of right fringe field
28 LFRINGE, // Length of left fringe field
29 HAPERT, // Aperture horizontal dimension
30 VAPERT, // Aperture vertical dimension
31 MAXFORDER, // Maximum order in the field expansion
32 ROTATION, // Rotation angle about central axis for skew elements
33 EANGLE, // Entrance angle
34 BBLENGTH, // Length within which field is calculated
35 // Further attributes for a constant radius curved multipole
36 ANGLE, // Bending angle of a sector magnet
37 MAXXORDER, // Maximum order in x in polynomial expansions
38 // Further attributes for a variable radius multipole
39 VARRADIUS, // Variable radius flag
40 ENTRYOFFSET, // Longitudinal offset from standard entrance point
41 // Time dependence
42 SCALING_MODEL, // Name of a time dependence object
43 // Misalignments
44 MISALIGN_H, // Horizontal misalignment [m]
45 MISALIGN_V, // Vertical misalignment [m]
46 MISALIGN_S, // Longitudinal misalignment [m]
47 MISALIGN_ROLL, // Roll misalignment [rad] about the longitudinal axis
48 MISALIGN_PITCH, // Pitch misalignment [rad] about the horizontal axis
49 MISALIGN_YAW, // Yaw misalignment [rad] about the vertical axis
50 MISALIGN_AXISOFFSET, // Vertical offset of rotation axes [m]
51 SIZE // size of the enum
52 };
53
56
58 OpalMultipoleT* clone(const std::string& name) override;
59
61 ~OpalMultipoleT() override = default;
62
64 void update() override;
65
66 void print(std::ostream& os) const override;
67
68 // Not implemented.
70 void operator=(const OpalMultipoleT&) = delete;
71
72private:
74 static constexpr double DefaultMAXFORDER = 3.0;
75 static constexpr double MinimumMAXFORDER = 1.0;
76 static constexpr double MaximumMAXFORDER = 9.0;
77 static constexpr double DefaultMAXXORDER = 20.0;
78
79 // Clone constructor.
80 OpalMultipoleT(const std::string& name, OpalMultipoleT* parent);
81};
82
83#endif // OPAL_OpalMultipoleT_HH
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
~OpalMultipoleT() override=default
static constexpr double MinimumMAXFORDER