OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
EDipoleField.cpp
Go to the documentation of this file.
1 // ------------------------------------------------------------------------
2 // $RCSfile: EDipoleField.cpp,v $
3 // ------------------------------------------------------------------------
4 // $Revision: 1.1.1.1 $
5 // ------------------------------------------------------------------------
6 // Copyright: see Copyright.readme
7 // ------------------------------------------------------------------------
8 //
9 // Class: EDipoleField
10 // An electrostatic dipole field in the (x,y)-plane.
11 //
12 // ------------------------------------------------------------------------
13 // Class category: Fields
14 // ------------------------------------------------------------------------
15 //
16 // $Date: 2000/03/27 09:32:35 $
17 // $Author: fci $
18 //
19 // ------------------------------------------------------------------------
20 
21 #include "Fields/EDipoleField.h"
22 
23 
24 // Class EDipoleField
25 // ------------------------------------------------------------------------
26 
28 {}
29 
30 
32 {}
33 
34 
36  return EVector(Ex, Ey, 0.0);
37 }
38 
39 
40 EVector EDipoleField::Efield(const Point3D &P, double) const {
41  return EVector(Ex, Ey, 0.0);
42 }
43 
44 
45 double EDipoleField::getEx() const {
46  return Ex;
47 }
48 
49 double EDipoleField::getEy() const {
50  return Ey;
51 }
52 
53 
54 void EDipoleField::setEx(double value) {
55  Ex = value;
56 }
57 
58 
59 void EDipoleField::setEy(double value) {
60  Ey = value;
61 }
62 
63 
64 void EDipoleField::scale(double scalar) {
65  Ex *= scalar;
66  Ey *= scalar;
67 }
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.