OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
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// Class ConstBzField
24// ------------------------------------------------------------------------
25
27
29
30BVector ConstBzField::Bfield(const Point3D&) const { return BVector(0.0, 0.0, Bz); }
31
32BVector ConstBzField::Bfield(const Point3D& /*X*/, double) const { return BVector(0.0, 0.0, Bz); }
33
34double ConstBzField::getBz() const { return Bz; }
35
36void ConstBzField::setBz(double value) { Bz = value; }
37
38void ConstBzField::scale(double scalar) { Bz *= scalar; }
A magnetic field vector.
Definition EMField.h:88
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:32