|
OPAL (Object Oriented Parallel Accelerator Library)
2021.1.99
OPAL
|
The magnetic field of a multipole. More...
#include <BMultipoleField.h>


Classes | |
| struct | Pair |
Public Member Functions | |
| BMultipoleField () | |
| Default constructor. More... | |
| BMultipoleField (const BMultipoleField &) | |
| virtual | ~BMultipoleField () |
| BMultipoleField & | operator= (const BMultipoleField &) |
| virtual BVector | Bfield (const Point3D &P) const |
| Get field. More... | |
| virtual BVector | Bfield (const Point3D &P, double t) const |
| Get field. More... | |
| double | getNormalComponent (int n) const |
| Get component. More... | |
| double | getSkewComponent (int n) const |
| Get component. More... | |
| void | setNormalComponent (int n, double Bn) |
| Set component. More... | |
| void | setSkewComponent (int n, double Bn) |
| Set component. More... | |
| double | normal (int) const |
| Get component. More... | |
| double | skew (int) const |
| Get component. More... | |
| double & | normal (int) |
| Get component. More... | |
| double & | skew (int) |
| Get component. More... | |
| BMultipoleField & | addField (const BMultipoleField &field) |
| Add to field. More... | |
| BMultipoleField & | subtractField (const BMultipoleField &field) |
| Subtract from field. More... | |
| void | scale (double scalar) |
| Scale the field. More... | |
| int | order () const |
| Return order. More... | |
Public Member Functions inherited from StaticMagneticField | |
| StaticMagneticField () | |
| virtual | ~StaticMagneticField () |
Public Member Functions inherited from EMField | |
| EMField () | |
| Default constructor. More... | |
| EMField (const EMField &right) | |
| virtual | ~EMField () |
| const EMField & | operator= (const EMField &right) |
| virtual EVector | Efield (const Point3D &P) const |
| Get field. More... | |
| virtual EVector | Efield (const Point3D &P, double t) const |
| Get field. More... | |
| virtual EBVectors | EBfield (const Point3D &P) const |
| Get field. More... | |
| virtual EBVectors | EBfield (const Point3D &P, double t) const |
| Get field. More... | |
Private Member Functions | |
| void | reserve (int n) |
Private Attributes | |
| Pair * | pairs |
| int | itsOrder |
Additional Inherited Members | |
Static Public Attributes inherited from EMField | |
| static const EVector | ZeroEfield |
| The constant representing a zero electric field. More... | |
| static const BVector | ZeroBfield |
| The constant representing a zero magnetic field. More... | |
| static const EBVectors | ZeroEBfield |
| The constant representing a zero electromagnetic field. More... | |
The magnetic field of a multipole.
Definition at line 36 of file BMultipoleField.h.
| BMultipoleField::BMultipoleField | ( | ) |
Default constructor.
Definition at line 85 of file BMultipoleField.cpp.
| BMultipoleField::BMultipoleField | ( | const BMultipoleField & | rhs | ) |
Definition at line 91 of file BMultipoleField.cpp.
|
virtual |
Definition at line 104 of file BMultipoleField.cpp.
References pairs.
| BMultipoleField & BMultipoleField::addField | ( | const BMultipoleField & | field | ) |
Add to field.
Definition at line 166 of file BMultipoleField.cpp.
References itsOrder, pairs, and reserve().

Get field.
Reimplemented from EMField.
Definition at line 126 of file BMultipoleField.cpp.
References Point3D::getX(), Point3D::getY(), imag(), itsOrder, pairs, real(), and X.
Referenced by Bfield().

Get field.
Reimplemented from EMField.
Definition at line 139 of file BMultipoleField.cpp.
References Bfield().

|
inline |
Get component.
Definition at line 161 of file BMultipoleField.h.
References BMultipoleField::Pair::B, itsOrder, Hypervolume::n, and pairs.
Referenced by RBendRep::getB(), SBendRep::getB(), RBend::getNormalComponent(), SBend::getNormalComponent(), and ThickTracker::visitMultipole().
|
inline |
Get component.
Definition at line 170 of file BMultipoleField.h.
References BMultipoleField::Pair::A, itsOrder, Hypervolume::n, and pairs.
Referenced by RBend::getSkewComponent(), and SBend::getSkewComponent().
|
inline |
Get component.
Definition at line 179 of file BMultipoleField.h.
References BMultipoleField::Pair::B, Hypervolume::n, and pairs.
|
inline |
Get component.
Definition at line 187 of file BMultipoleField.h.
References BMultipoleField::Pair::B, Hypervolume::n, and pairs.
Referenced by Tracker::applyThinMultipole(), Tracker::buildMultipoleVectorPotential(), Tracker::buildMultipoleVectorPotential2D(), Tracker::buildSBendVectorPotential(), Tracker::buildSBendVectorPotential2D(), and BMultipoleField::Pair::Pair().
| BMultipoleField & BMultipoleField::operator= | ( | const BMultipoleField & | rhs | ) |
Definition at line 109 of file BMultipoleField.cpp.
|
inline |
Return order.
Definition at line 156 of file BMultipoleField.h.
References itsOrder.
Referenced by Tracker::applyThinMultipole(), Tracker::buildMultipoleVectorPotential(), Tracker::buildMultipoleVectorPotential2D(), Tracker::buildSBendVectorPotential(), and Tracker::buildSBendVectorPotential2D().
|
private |
Definition at line 187 of file BMultipoleField.cpp.
References itsOrder, Hypervolume::n, and pairs.
Referenced by addField(), setNormalComponent(), setSkewComponent(), and subtractField().
|
virtual |
Scale the field.
Implements EMField.
Definition at line 180 of file BMultipoleField.cpp.
References itsOrder, and pairs.
Referenced by BMultipoleField::Pair::operator*(), and BMultipoleField::Pair::operator*=().
| void BMultipoleField::setNormalComponent | ( | int | n, |
| double | Bn | ||
| ) |
Set component.
Definition at line 144 of file BMultipoleField.cpp.
References BMultipoleField::Pair::B, itsOrder, Hypervolume::n, pairs, and reserve().
Referenced by BSingleMultipoleField< order >::operator BMultipoleField(), RBendRep::setB(), SBendRep::setB(), RBend::setNormalComponent(), SBend::setNormalComponent(), OpalMultipole::update(), OpalOctupole::update(), OpalQuadrupole::update(), OpalRBend::update(), OpalSBend::update(), and OpalSextupole::update().

| void BMultipoleField::setSkewComponent | ( | int | n, |
| double | Bn | ||
| ) |
Set component.
Definition at line 155 of file BMultipoleField.cpp.
References a, BMultipoleField::Pair::A, itsOrder, Hypervolume::n, pairs, and reserve().
Referenced by BSingleMultipoleField< order >::operator BMultipoleField(), RBend::setSkewComponent(), SBend::setSkewComponent(), OpalMultipole::update(), OpalOctupole::update(), OpalQuadrupole::update(), OpalRBend::update(), OpalSBend::update(), and OpalSextupole::update().

|
inline |
Get component.
Definition at line 183 of file BMultipoleField.h.
References BMultipoleField::Pair::A, Hypervolume::n, and pairs.
|
inline |
Get component.
Definition at line 191 of file BMultipoleField.h.
References BMultipoleField::Pair::A, Hypervolume::n, and pairs.
Referenced by Tracker::applyThinMultipole(), Tracker::buildMultipoleVectorPotential(), Tracker::buildMultipoleVectorPotential2D(), Tracker::buildSBendVectorPotential(), and Tracker::buildSBendVectorPotential2D().
| BMultipoleField & BMultipoleField::subtractField | ( | const BMultipoleField & | field | ) |
Subtract from field.
Definition at line 173 of file BMultipoleField.cpp.
References itsOrder, pairs, and reserve().

|
private |
Definition at line 149 of file BMultipoleField.h.
Referenced by addField(), Bfield(), BMultipoleField(), getNormalComponent(), getSkewComponent(), operator=(), order(), reserve(), scale(), setNormalComponent(), setSkewComponent(), and subtractField().
|
private |
Definition at line 146 of file BMultipoleField.h.
Referenced by addField(), Bfield(), BMultipoleField(), getNormalComponent(), getSkewComponent(), normal(), operator=(), reserve(), scale(), setNormalComponent(), setSkewComponent(), skew(), subtractField(), and ~BMultipoleField().