OPALX (Object Oriented Parallel Accelerator Library for Exascal) MINIorX
OPALX
FM1DProfile1.h
Go to the documentation of this file.
1#ifndef CLASSIC_FIELDMAP1DPROFILE1_HH
2#define CLASSIC_FIELDMAP1DPROFILE1_HH
3
4#include "Fields/Fieldmap.h"
5
6/*
7 * Class FM1DProfile.
8 * --------------------------------------------------------------------------
9 * Field definition for 1D representation of bending magnet.
10 *
11 * Class FM1DProfile1 defines a 1D field map for us in bending magnets.
12 */
13
14class FM1DProfile1: public Fieldmap {
15
16public:
17
18 virtual bool getFieldDerivative(const Vector_t<double, 3> &X,
21 const DiffDirection &dir) const;
22 virtual void get1DProfile1EntranceParam(double &entranceParameter1,
23 double &entranceParameter2,
24 double &entranceParameter3);
25 virtual void get1DProfile1ExitParam(double &exitParameter1,
26 double &exitParameter2,
27 double &exitParameter3);
28 virtual double getFieldGap();
29 virtual void getFieldDimensions(double &zBegin,
30 double &zEnd) const;
31 virtual void getFieldDimensions(double &xIni,
32 double &xFinal,
33 double &yIni,
34 double &yFinal,
35 double &zIni,
36 double &zFinal) const;
37 virtual bool getFieldstrength(const Vector_t<double, 3> &X,
38 Vector_t<double, 3> &strength,
39 Vector_t<double, 3> &info) const;
40 virtual double getFrequency() const;
41 virtual void getInfo(Inform *);
42 virtual void setFrequency(double freq);
43 virtual void get1DProfile1EngeCoeffs(std::vector<double> &engeCoeffsEntry,
44 std::vector<double> &engeCoeffsExit);
45 virtual void swap();
46
47 virtual void setFieldGap(double gap);
48
49private:
50
52 FM1DProfile1(std::string Filename);
53
54 virtual ~FM1DProfile1();
55
56 virtual void freeMap();
57 virtual void readMap();
58
59 double computeEntranceFringe(double z) const;
60 double computeExitFringe(double z) const;
61 double computeFringe(const std::vector<double> &coefs, double z) const;
62 /*
63 * Entrance and exit position parameters. These are read in from the input
64 * input file. Ultimately they are used to determine the origin of the
65 * field Enge function and the extent of the field map. However, how they
66 * are used to do this depends on how the bend using the map is setup in the
67 * OPAL input file. So, we use generic terms to start.
68 */
75
77 std::vector<double> engeCoeffsEntry_m;
78 std::vector<double> engeCoeffsExit_m;
79
82 double gapHeight_m;
83
84 double sBegin_m;
85 double sEnd_m;
86
87 friend class Fieldmap;
88};
89
90#endif
ippl::Vector< T, Dim > Vector_t
std::shared_ptr< _FM1DProfile1 > FM1DProfile1
Definition Definitions.h:46
DiffDirection
Definition Fieldmap.h:55
double entranceParameter2_m
double entranceParameter3_m
virtual void setFrequency(double freq)
double entranceParameter1_m
double gapHeight_m
Enge function order for entry region.
virtual void get1DProfile1ExitParam(double &exitParameter1, double &exitParameter2, double &exitParameter3)
double computeExitFringe(double z) const
virtual void freeMap()
double computeFringe(const std::vector< double > &coefs, double z) const
virtual ~FM1DProfile1()
double exitParameter2_m
double exitParameter1_m
virtual void get1DProfile1EngeCoeffs(std::vector< double > &engeCoeffsEntry, std::vector< double > &engeCoeffsExit)
friend class Fieldmap
End of field map in s coordinates (m).
virtual double getFrequency() const
virtual bool getFieldDerivative(const Vector_t< double, 3 > &X, Vector_t< double, 3 > &E, Vector_t< double, 3 > &B, const DiffDirection &dir) const
virtual double getFieldGap()
virtual void setFieldGap(double gap)
virtual bool getFieldstrength(const Vector_t< double, 3 > &X, Vector_t< double, 3 > &strength, Vector_t< double, 3 > &info) const
virtual void swap()
double exitParameter3_m
virtual void readMap()
virtual void getInfo(Inform *)
double sEnd_m
Start of field map in s coordinates (m).
FM1DProfile1(std::string Filename)
Constructor with field map file name.
double sBegin_m
Full gap height of field map.
std::vector< double > engeCoeffsEntry_m
Enge coefficients for map entry and exit regions.
virtual void getFieldDimensions(double &zBegin, double &zEnd) const
int polyOrderExit_m
Enge function order for entry region.
virtual void get1DProfile1EntranceParam(double &entranceParameter1, double &entranceParameter2, double &entranceParameter3)
double computeEntranceFringe(double z) const
std::vector< double > engeCoeffsExit_m