OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
FM2DElectroStatic.h
Go to the documentation of this file.
1#ifndef CLASSIC_FIELDMAP2DELECTROSTATIC_HH
2#define CLASSIC_FIELDMAP2DELECTROSTATIC_HH
3
4#include "Fields/Fieldmap.h"
5
7
8public:
9 virtual bool getFieldstrength(const Vector_t &R, Vector_t &E, Vector_t &B) const;
10 virtual void getFieldDimensions(double &zBegin, double &zEnd) const;
11 virtual void getFieldDimensions(double &xIni, double &xFinal, double &yIni, double &yFinal, double &zIni, double &zFinal) const;
12 virtual bool getFieldDerivative(const Vector_t &R, Vector_t &E, Vector_t &B, const DiffDirection &dir) const;
13 virtual void swap();
14 virtual void getInfo(Inform *msg);
15 virtual double getFrequency() const;
16 virtual void setFrequency(double freq);
17
18 virtual bool isInside(const Vector_t &r) const;
19private:
20 FM2DElectroStatic(std::string aFilename);
22
23 virtual void readMap();
24 virtual void freeMap();
25
29 double rbegin_m;
30 double rend_m;
31 double zbegin_m;
32 double zend_m;
33 double hz_m;
34 double hr_m;
38 bool swap_m;
39 friend class Fieldmap;
40};
41
42inline bool FM2DElectroStatic::isInside(const Vector_t &r) const
43{
44 return r(2) >= zbegin_m && r(2) < zend_m && std::sqrt(r(0)*r(0) + r(1)*r(1)) < rend_m;
45}
46
47#endif
DiffDirection
Definition: Fieldmap.h:54
Tps< T > sqrt(const Tps< T > &x)
Square root.
Definition: TpsMath.h:91
virtual bool isInside(const Vector_t &r) const
virtual double getFrequency() const
virtual void readMap()
virtual void freeMap()
virtual bool getFieldstrength(const Vector_t &R, Vector_t &E, Vector_t &B) const
FM2DElectroStatic(std::string aFilename)
virtual void setFrequency(double freq)
virtual void getFieldDimensions(double &zBegin, double &zEnd) const
virtual void getInfo(Inform *msg)
virtual bool getFieldDerivative(const Vector_t &R, Vector_t &E, Vector_t &B, const DiffDirection &dir) const
Definition: Inform.h:42