OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
EDipoleField.h
Go to the documentation of this file.
1 #ifndef CLASSIC_EDipoleField_HH
2 #define CLASSIC_EDipoleField_HH
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: EDipoleField.h,v $
6 // ------------------------------------------------------------------------
7 // $Revision: 1.1.1.1 $
8 // ------------------------------------------------------------------------
9 // Copyright: see Copyright.readme
10 // ------------------------------------------------------------------------
11 //
12 // Class: EDipoleField
13 //
14 // ------------------------------------------------------------------------
15 // Class category: Fields
16 // ------------------------------------------------------------------------
17 //
18 // $Date: 2000/03/27 09:32:35 $
19 // $Author: fci $
20 //
21 // ------------------------------------------------------------------------
22 
23 #include "Fields/ConstEField.h"
24 
25 
26 // Class EDipoleField
27 // ------------------------------------------------------------------------
29 
30 class EDipoleField: public ConstEField {
31 
32 public:
33 
35  // Constructs a null field.
36  EDipoleField();
37 
38  virtual ~EDipoleField();
39 
41  // Return the time-independent part of the electric field in point [b]P[/b].
42  virtual EVector Efield(const Point3D &P) const;
43 
45  // Return the electric field at time [b]t[/b] in point [b]P[/b].
46  virtual EVector Efield(const Point3D &P, double t) const;
47 
49  // Return the x-component of the electric field in A/m.
50  virtual double getEx() const;
51 
53  // Return the y-component of the electric field in A/m.
54  virtual double getEy() const;
55 
57  // Assign the x-component of the electric field in A/m.
58  virtual void setEx(double);
59 
61  // Assign the y-component of the electric field in A/m.
62  virtual void setEy(double);
63 
65  // Multiply the field by [b]scalar[/b].
66  virtual void scale(double scalar);
67 
68 private:
69 
70  // The field components.
71  double Ex, Ey;
72 };
73 
74 #endif // CLASSIC_EDipoleField_HH
A static homogeneous electrostatic field in the (x,y)-plane.
Definition: EDipoleField.h:30
A homogeneous electricstatic field.
Definition: ConstEField.h:30
virtual double getEy() const
Get component.
virtual void setEx(double)
Set component.
An electric field vector.
Definition: EMField.h:63
A point in 3 dimensions.
Definition: EMField.h:33
virtual ~EDipoleField()
virtual double getEx() const
Get component.
virtual EVector Efield(const Point3D &P) const
Get field.
EDipoleField()
Default constructor.
virtual void scale(double scalar)
Scale the field.
virtual void setEy(double)
Set component.