OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
ConstEzField.cpp
Go to the documentation of this file.
1 // ------------------------------------------------------------------------
2 // $RCSfile: ConstEzField.cpp,v $
3 // ------------------------------------------------------------------------
4 // $Revision: 1.1.1.1 $
5 // ------------------------------------------------------------------------
6 // Copyright: see Copyright.readme
7 // ------------------------------------------------------------------------
8 //
9 // Class: ConstEzField
10 // A static electric field of constant value in z-direction.
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/ConstEzField.h"
22 
23 
24 // Class ConstEzField
25 // ------------------------------------------------------------------------
26 
28 {}
29 
30 
32 {}
33 
34 
36  return EVector(0.0, 0.0, Ez);
37 }
38 
39 
40 EVector ConstEzField::Efield(const Point3D &P, double) const {
41  return EVector(0.0, 0.0, Ez);
42 }
43 
44 
45 double ConstEzField::getEz() const {
46  return Ez;
47 }
48 
49 
50 void ConstEzField::setEz(double value) {
51  Ez = value;
52 }
53 
54 
55 void ConstEzField::scale(double scalar) {
56  Ez *= scalar;
57 }
An electric field vector.
Definition: EMField.h:63
A point in 3 dimensions.
Definition: EMField.h:33
ConstEzField()
Default constructor.
virtual void scale(double scalar)
Scale the field.
virtual void setEz(double)
Set component.
virtual ~ConstEzField()
virtual EVector Efield(const Point3D &P) const
Get field.
virtual double getEz() const
Get component.