OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
AbstractMapper.h
Go to the documentation of this file.
1 #ifndef CLASSIC_AbstractMapper_HH
2 #define CLASSIC_AbstractMapper_HH
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: AbstractMapper.h,v $
6 // ------------------------------------------------------------------------
7 // $Revision: 1.1.1.1.2.1 $
8 // ------------------------------------------------------------------------
9 // Copyright: see Copyright.readme
10 // ------------------------------------------------------------------------
11 //
12 // Class: AbstractMapper
13 //
14 // ------------------------------------------------------------------------
15 // Class category: Algorithms
16 // ------------------------------------------------------------------------
17 //
18 // $Date: 2004/11/12 18:57:53 $
19 // $Author: adelmann $
20 //
21 // ------------------------------------------------------------------------
22 
24 #include "Algorithms/PartData.h"
25 
26 class BMultipoleField;
27 template <class T, int N> class LinearMap;
28 template <class T, int N> class FTps;
29 template <class T, int N> class FVps;
30 
31 
32 // Class AbstractMapper
33 // ------------------------------------------------------------------------
35 // An abstract visitor class implementing the default behaviour for all
36 // visitors capable of tracking a transfer map through a beam line.
37 // It implements access to the accumulated map, and keeps track of the
38 // beam reference data.
39 // This class redefines all visitXXX() methods for elements as pure
40 // to force their implementation in derived classes.
41 
43 
44 public:
45 
46  // Particle coordinate numbers.
47  enum { X, PX, Y, PY, T, PT };
48 
50  // The beam line to be tracked is [b]bl[/b].
51  // The particle reference data are taken from [b]data[/b].
52  // If [b]revBeam[/b] is true, the beam runs from s = C to s = 0.
53  // If [b]revTrack[/b] is true, we track against the beam.
54  AbstractMapper(const Beamline &bl, const PartData &data,
55  bool revBeam, bool revTrack);
56 
57  virtual ~AbstractMapper();
58 
59 
61  virtual void getMap(LinearMap<double, 6> &) const = 0;
62 
64  virtual void getMap(FVps<double, 6> &) const = 0;
65 
67  virtual void setMap(const LinearMap<double, 6> &) = 0;
68 
70  virtual void setMap(const FVps<double, 6> &) = 0;
71 
72 protected:
73 
76 
79 
82 
83 private:
84 
85  // Not implemented.
88  void operator=(const AbstractMapper &);
89 };
90 
91 #endif // CLASSIC_AbstractMapper_HH
Build transfer map.
void operator=(const AbstractMapper &)
Particle reference data.
Definition: PartData.h:38
Default algorithms.
virtual ~AbstractMapper()
Linear map with values of type [b]T[/b] in [b]N[/b] variables.
FTps< double, 6 > buildSBendVectorPotential(const BMultipoleField &, double h)
Construct the vector potential for an SBend.
virtual void setMap(const LinearMap< double, 6 > &)=0
Reset the linear part of the accumulated map for restart.
An abstract sequence of beam line components.
Definition: Beamline.h:37
The magnetic field of a multipole.
FTps< double, 6 > buildMultipoleVectorPotential(const BMultipoleField &)
Construct the vector potential for a Multipole.
Truncated power series in N variables of type T.
const PartData itsReference
The reference information.
Vector truncated power series in n variables.
virtual void getMap(LinearMap< double, 6 > &) const =0
Return the linear part of the accumulated map.