OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
ConstEzField.h
Go to the documentation of this file.
1 #ifndef CLASSIC_ConstEzField_HH
2 #define CLASSIC_ConstEzField_HH
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: ConstEzField.h,v $
6 // ------------------------------------------------------------------------
7 // $Revision: 1.1.1.1 $
8 // ------------------------------------------------------------------------
9 // Copyright: see Copyright.readme
10 // ------------------------------------------------------------------------
11 //
12 // Class: ConstEzField
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 ConstEzField
27 // ------------------------------------------------------------------------
29 
31 
32 public:
33 
35  // Constructs a null field.
36  ConstEzField();
37 
38  virtual ~ConstEzField();
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 getEz() const;
51 
53  // Assign the z-component of the electric field in A/m.
54  virtual void setEz(double);
55 
57  // Multiply the field by [b]scalar[/b].
58  virtual void scale(double scalar);
59 
60 private:
61 
62  // The field components.
63  double Ez;
64 };
65 
66 #endif // CLASSIC_ConstEzField_HH
An electric field vector.
Definition: EMField.h:63
A point in 3 dimensions.
Definition: EMField.h:33
Abstract base class for static electric fields.
ConstEzField()
Default constructor.
virtual void scale(double scalar)
Scale the field.
virtual void setEz(double)
Set component.
A homogeneous electrostatic field in z-direction.
Definition: ConstEzField.h:30
virtual ~ConstEzField()
virtual EVector Efield(const Point3D &P) const
Get field.
virtual double getEz() const
Get component.