OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
ConstBzField.cpp
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2// $RCSfile: ConstBzField.cpp,v $
3// ------------------------------------------------------------------------
4// $Revision: 1.1.1.1 $
5// ------------------------------------------------------------------------
6// Copyright: see Copyright.readme
7// ------------------------------------------------------------------------
8//
9// Class: ConstBzField
10// A static magnetic 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/ConstBzField.h"
22
23
24// Class ConstBzField
25// ------------------------------------------------------------------------
26
28{}
29
30
32{}
33
34
36 return BVector(0.0, 0.0, Bz);
37}
38
39
40BVector ConstBzField::Bfield(const Point3D &/*X*/, double) const {
41 return BVector(0.0, 0.0, Bz);
42}
43
44
45double ConstBzField::getBz() const {
46 return Bz;
47}
48
49void ConstBzField::setBz(double value) {
50 Bz = value;
51}
52
53
54void ConstBzField::scale(double scalar) {
55 Bz *= scalar;
56}
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