OPAL (Object Oriented Parallel Accelerator Library)
2021.1.99
OPAL
src
src
Classic
Fields
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
27
ConstBzField::ConstBzField
()
28
{}
29
30
31
ConstBzField::~ConstBzField
()
32
{}
33
34
35
BVector
ConstBzField::Bfield
(
const
Point3D
&)
const
{
36
return
BVector
(0.0, 0.0,
Bz
);
37
}
38
39
40
BVector
ConstBzField::Bfield
(
const
Point3D
&
/*X*/
,
double
)
const
{
41
return
BVector
(0.0, 0.0,
Bz
);
42
}
43
44
45
double
ConstBzField::getBz
()
const
{
46
return
Bz
;
47
}
48
49
void
ConstBzField::setBz
(
double
value) {
50
Bz
= value;
51
}
52
53
54
void
ConstBzField::scale
(
double
scalar) {
55
Bz
*= scalar;
56
}
ConstBzField.h
ConstBzField::scale
virtual void scale(double scalar)
Scale the field.
Definition:
ConstBzField.cpp:54
ConstBzField::ConstBzField
ConstBzField()
Default constructor.
Definition:
ConstBzField.cpp:27
ConstBzField::~ConstBzField
virtual ~ConstBzField()
Definition:
ConstBzField.cpp:31
ConstBzField::getBz
virtual double getBz() const
Get component.
Definition:
ConstBzField.cpp:45
ConstBzField::Bz
double Bz
Definition:
ConstBzField.h:65
ConstBzField::setBz
virtual void setBz(double Bz)
Set component.
Definition:
ConstBzField.cpp:49
ConstBzField::Bfield
virtual BVector Bfield(const Point3D &P) const
Get field.
Definition:
ConstBzField.cpp:35
Point3D
A point in 3 dimensions.
Definition:
EMField.h:33
BVector
A magnetic field vector.
Definition:
EMField.h:97
Generated on Wed Aug 25 2021 16:41:02 for OPAL (Object Oriented Parallel Accelerator Library) by
1.9.1