OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
BMultipoleField Class Reference

The magnetic field of a multipole. More...

#include <BMultipoleField.h>

Inheritance diagram for BMultipoleField:
Collaboration diagram for BMultipoleField:

Classes

struct  Pair

Public Member Functions

 BMultipoleField ()
 Default constructor.
 BMultipoleField (const BMultipoleField &)
virtual ~BMultipoleField ()
BMultipoleFieldoperator= (const BMultipoleField &)
virtual BVector Bfield (const Point3D &P) const
 Get field.
virtual BVector Bfield (const Point3D &P, double t) const
 Get field.
double getNormalComponent (int n) const
 Get component.
double getSkewComponent (int n) const
 Get component.
void setNormalComponent (int n, double Bn)
 Set component.
void setSkewComponent (int n, double Bn)
 Set component.
double normal (int) const
 Get component.
double skew (int) const
 Get component.
double & normal (int)
 Get component.
double & skew (int)
 Get component.
BMultipoleFieldaddField (const BMultipoleField &field)
 Add to field.
BMultipoleFieldsubtractField (const BMultipoleField &field)
 Subtract from field.
void scale (double scalar)
 Scale the field.
int order () const
 Return order.
virtual EVector Efield (const Point3D &P) const
 Get field.
virtual EVector Efield (const Point3D &P, double t) const
 Get field.
virtual EBVectors EBfield (const Point3D &P) const
 Get field.
virtual EBVectors EBfield (const Point3D &P, double t) const
 Get field.

Static Public Attributes

static const EVector ZeroEfield
 The constant representing a zero electric field.
static const BVector ZeroBfield
 The constant representing a zero magnetic field.
static const EBVectors ZeroEBfield
 The constant representing a zero electromagnetic field.

Private Member Functions

void reserve (int n)

Private Attributes

Pairpairs
int itsOrder

Detailed Description

The magnetic field of a multipole.

Definition at line 36 of file BMultipoleField.h.

Constructor & Destructor Documentation

◆ BMultipoleField() [1/2]

BMultipoleField::BMultipoleField ( )

Default constructor.

Definition at line 85 of file BMultipoleField.cpp.

References itsOrder, and pairs.

Referenced by addField(), BMultipoleField(), operator=(), and subtractField().

◆ BMultipoleField() [2/2]

BMultipoleField::BMultipoleField ( const BMultipoleField & rhs)

Definition at line 91 of file BMultipoleField.cpp.

References BMultipoleField(), itsOrder, and pairs.

Here is the call graph for this function:

◆ ~BMultipoleField()

BMultipoleField::~BMultipoleField ( )
virtual

Definition at line 104 of file BMultipoleField.cpp.

References pairs.

Member Function Documentation

◆ addField()

BMultipoleField & BMultipoleField::addField ( const BMultipoleField & field)

Add to field.

Definition at line 166 of file BMultipoleField.cpp.

References BMultipoleField(), itsOrder, pairs, and reserve().

Here is the call graph for this function:

◆ Bfield() [1/2]

BVector BMultipoleField::Bfield ( const Point3D & P) const
virtual

Get field.

Reimplemented from EMField.

Definition at line 126 of file BMultipoleField.cpp.

References Point3D::getX(), Point3D::getY(), itsOrder, pairs, and X.

Referenced by Bfield().

Here is the call graph for this function:

◆ Bfield() [2/2]

BVector BMultipoleField::Bfield ( const Point3D & P,
double t ) const
virtual

Get field.

Reimplemented from EMField.

Definition at line 139 of file BMultipoleField.cpp.

References Bfield().

Here is the call graph for this function:

◆ EBfield() [1/2]

EBVectors EMField::EBfield ( const Point3D & P) const
virtualinherited

Get field.

Definition at line 183 of file EMField.cpp.

References Bfield(), Efield(), and X.

Referenced by Component::EBfield(), Component::EBfield(), and EBfield().

Here is the call graph for this function:

◆ EBfield() [2/2]

EBVectors EMField::EBfield ( const Point3D & P,
double t ) const
virtualinherited

Get field.

Definition at line 188 of file EMField.cpp.

References EBfield(), and X.

Here is the call graph for this function:

◆ Efield() [1/2]

EVector EMField::Efield ( const Point3D & P) const
virtualinherited

Get field.

Reimplemented in ConstEzField, and OscillatingField< ConstEzField >.

Definition at line 163 of file EMField.cpp.

References ZeroEfield.

Referenced by EBfield(), Component::Efield(), Component::Efield(), and Efield().

◆ Efield() [2/2]

EVector EMField::Efield ( const Point3D & P,
double t ) const
virtualinherited

Get field.

Reimplemented in ConstEzField, and OscillatingField< ConstEzField >.

Definition at line 173 of file EMField.cpp.

References Efield(), and X.

Here is the call graph for this function:

◆ getNormalComponent()

double BMultipoleField::getNormalComponent ( int n) const
inline

Get component.

Definition at line 161 of file BMultipoleField.h.

References itsOrder, and pairs.

Referenced by RBend::getNormalComponent(), SBend::getNormalComponent(), and ThickTracker::visitMultipole().

◆ getSkewComponent()

double BMultipoleField::getSkewComponent ( int n) const
inline

Get component.

Definition at line 170 of file BMultipoleField.h.

References itsOrder, and pairs.

Referenced by RBend::getSkewComponent(), and SBend::getSkewComponent().

◆ normal() [1/2]

double & BMultipoleField::normal ( int n)
inline

Get component.

Definition at line 179 of file BMultipoleField.h.

References pairs.

◆ normal() [2/2]

◆ operator=()

BMultipoleField & BMultipoleField::operator= ( const BMultipoleField & rhs)

Definition at line 109 of file BMultipoleField.cpp.

References BMultipoleField(), itsOrder, and pairs.

Here is the call graph for this function:

◆ order()

◆ reserve()

void BMultipoleField::reserve ( int n)
private

Definition at line 187 of file BMultipoleField.cpp.

References itsOrder, and pairs.

Referenced by addField(), setNormalComponent(), setSkewComponent(), and subtractField().

◆ scale()

void BMultipoleField::scale ( double scalar)
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*=().

◆ setNormalComponent()

void BMultipoleField::setNormalComponent ( int n,
double Bn )

Set component.

Definition at line 144 of file BMultipoleField.cpp.

References itsOrder, pairs, and reserve().

Referenced by BSingleMultipoleField< order >::operator BMultipoleField(), RBend::setNormalComponent(), SBend::setNormalComponent(), OpalMultipole::update(), OpalOctupole::update(), OpalQuadrupole::update(), OpalRBend::update(), OpalSBend::update(), and OpalSextupole::update().

Here is the call graph for this function:

◆ setSkewComponent()

void BMultipoleField::setSkewComponent ( int n,
double Bn )

Set component.

Definition at line 155 of file BMultipoleField.cpp.

References a, itsOrder, 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().

Here is the call graph for this function:

◆ skew() [1/2]

double & BMultipoleField::skew ( int n)
inline

Get component.

Definition at line 183 of file BMultipoleField.h.

References pairs.

◆ skew() [2/2]

◆ subtractField()

BMultipoleField & BMultipoleField::subtractField ( const BMultipoleField & field)

Subtract from field.

Definition at line 173 of file BMultipoleField.cpp.

References BMultipoleField(), itsOrder, pairs, and reserve().

Here is the call graph for this function:

Member Data Documentation

◆ itsOrder

◆ pairs

◆ ZeroBfield

const BVector EMField::ZeroBfield
staticinherited

The constant representing a zero magnetic field.

Definition at line 239 of file EMField.h.

Referenced by Bfield().

◆ ZeroEBfield

const EBVectors EMField::ZeroEBfield
staticinherited

The constant representing a zero electromagnetic field.

Definition at line 242 of file EMField.h.

◆ ZeroEfield

const EVector EMField::ZeroEfield
staticinherited

The constant representing a zero electric field.

Definition at line 236 of file EMField.h.

Referenced by Efield().


The documentation for this class was generated from the following files: