OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
Astra1DDynamic.h
Go to the documentation of this file.
1 #ifndef CLASSIC_AstraFIELDMAP1DDYNAMIC_HH
2 #define CLASSIC_AstraFIELDMAP1DDYNAMIC_HH
3 
4 #include "Fields/Fieldmap.h"
5 
6 class Astra1DDynamic: public Fieldmap {
7 
8 public:
9  virtual bool getFieldstrength(const Vector_t &R, Vector_t &E, Vector_t &B) const;
10  virtual bool getFieldDerivative(const Vector_t &R, Vector_t &E, Vector_t &B, const DiffDirection &dir) const;
11  virtual void getFieldDimensions(double &zBegin, double &zEnd) const;
12  virtual void getFieldDimensions(double &xIni, double &xFinal, double &yIni, double &yFinal, double &zIni, double &zFinal) const;
13  virtual void swap();
14  virtual void getInfo(Inform *);
15  virtual double getFrequency() const;
16  virtual void setFrequency(double freq);
17  virtual void getOnaxisEz(std::vector<std::pair<double, double> > & F);
18 
19  virtual bool isInside(const Vector_t &r) const;
20 private:
21  Astra1DDynamic(std::string aFilename);
23 
24  virtual void readMap();
25  virtual void freeMap();
26 
27  double *__restrict__ FourCoefs_m;
28 
29  double frequency_m;
30  double xlrep_m;
31 
32  double zbegin_m;
33  double zend_m;
34  double length_m;
35 
38 
39  friend class Fieldmap;
40 };
41 
42 inline bool Astra1DDynamic::isInside(const Vector_t &r) const
43 {
44  return r(2) >= zbegin_m && r(2) < zend_m;
45 }
46 
47 #endif
DiffDirection
Definition: Fieldmap.h:54
virtual bool getFieldstrength(const Vector_t &R, Vector_t &E, Vector_t &B) const
virtual bool getFieldDerivative(const Vector_t &R, Vector_t &E, Vector_t &B, const DiffDirection &dir) const
virtual void setFrequency(double freq)
virtual double getFrequency() const
virtual void readMap()
virtual void getFieldDimensions(double &zBegin, double &zEnd) const
virtual void getOnaxisEz(std::vector< std::pair< double, double > > &F)
virtual bool isInside(const Vector_t &r) const
double *__restrict__ FourCoefs_m
virtual void getInfo(Inform *)
virtual void swap()
virtual void freeMap()
Astra1DDynamic(std::string aFilename)
Definition: Inform.h:42