OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
ConstBzField.h
Go to the documentation of this file.
1 #ifndef CLASSIC_ConstBzField_HH
2 #define CLASSIC_ConstBzField_HH
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: ConstBzField.h,v $
6 // ------------------------------------------------------------------------
7 // $Revision: 1.1.1.1 $
8 // ------------------------------------------------------------------------
9 // Copyright: see Copyright.readme
10 // ------------------------------------------------------------------------
11 //
12 // Class: ConstBzField
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/ConstBField.h"
24 
25 
26 // Class ConstBzField
27 // ------------------------------------------------------------------------
29 
30 class ConstBzField: public ConstBField {
31 
32 public:
33 
35  // Constructs a null field.
36  ConstBzField();
37 
38  virtual ~ConstBzField();
39 
41  // Return the time-independent part of the magnetic field in point [b]P[/b].
42  // This override forces implementation in derived classes.
43  virtual BVector Bfield(const Point3D &P) const;
44 
46  // Return the magnetic field at time [b]t[/b] in point [b]P[/b].
47  // This override forces implementation in derived classes.
48  virtual BVector Bfield(const Point3D &P, double t) const;
49 
51  // Return the z-component of the magnetic field in T.
52  virtual double getBz() const;
53 
55  // Assign the z-component of the magnetic field in T.
56  virtual void setBz(double Bz);
57 
59  // Multiply the field by [b]scalar[/b].
60  virtual void scale(double scalar);
61 
62 private:
63 
64  // The field component.
65  double Bz;
66 };
67 
68 #endif // CLASSIC_ConstBzField_HH
A magnetic field vector.
Definition: EMField.h:97
ConstBzField()
Default constructor.
A point in 3 dimensions.
Definition: EMField.h:33
virtual double getBz() const
Get component.
virtual BVector Bfield(const Point3D &P) const
Get field.
A homogeneous magnetostatic field in z-direction.
Definition: ConstBzField.h:30
virtual ~ConstBzField()
virtual void scale(double scalar)
Scale the field.
virtual void setBz(double Bz)
Set component.
A homogenous magnetostatic field.
Definition: ConstBField.h:31