OPAL (Object Oriented Parallel Accelerator Library) 2022.1
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
31
32public:
33
35 // Constructs a null field.
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
62private:
63
64 // The field component.
65 double Bz;
66};
67
68#endif // CLASSIC_ConstBzField_HH
A homogenous magnetostatic field.
Definition: ConstBField.h:31
A homogeneous magnetostatic field in z-direction.
Definition: ConstBzField.h:30
virtual void scale(double scalar)
Scale the field.
ConstBzField()
Default constructor.
virtual ~ConstBzField()
virtual double getBz() const
Get component.
virtual void setBz(double Bz)
Set component.
virtual BVector Bfield(const Point3D &P) const
Get field.
A point in 3 dimensions.
Definition: EMField.h:33
A magnetic field vector.
Definition: EMField.h:97