OPAL (Object Oriented Parallel Accelerator Library)
2021.1.99
OPAL
|
Interface for a single beam element. More...
#include <Component.h>
Public Member Functions | |
Component (const std::string &name) | |
Constructor with given name. More... | |
Component () | |
Component (const Component &right) | |
virtual | ~Component () |
virtual EMField & | getField ()=0 |
Return field. More... | |
virtual const EMField & | getField () const =0 |
Return field. More... | |
EVector | Efield (const Point3D &P) const |
Return the field in a point. More... | |
BVector | Bfield (const Point3D &P) const |
Return the field in a point. More... | |
EVector | Efield (const Point3D &P, double t) const |
Return the field in a point. More... | |
BVector | Bfield (const Point3D &P, double t) const |
Return the field in a point. More... | |
EBVectors | EBfield (const Point3D &P) const |
Return the field in a point. More... | |
EBVectors | EBfield (const Point3D &P, double t) const |
Return the field in a point. More... | |
virtual bool | apply (const size_t &i, const double &t, Vector_t &E, Vector_t &B) |
virtual bool | apply (const Vector_t &R, const Vector_t &P, const double &t, Vector_t &E, Vector_t &B) |
virtual bool | applyToReferenceParticle (const Vector_t &R, const Vector_t &P, const double &t, Vector_t &E, Vector_t &B) |
virtual bool | getPotential (const Vector_t &, const double &, Vector_t &, double &) |
virtual double | getDesignEnergy () const |
virtual void | setDesignEnergy (const double &energy, bool changeable=true) |
virtual void | initialise (PartBunchBase< double, 3 > *bunch, double &startField, double &endField)=0 |
virtual void | finalise ()=0 |
virtual bool | bends () const =0 |
virtual void | goOnline (const double &kineticEnergy) |
virtual void | goOffline () |
virtual bool | Online () |
virtual void | getDimensions (double &zBegin, double &zEnd) const =0 |
virtual ElementBase::ElementType | getType () const |
Get element type std::string. More... | |
virtual void | setComponentType (std::string) |
virtual std::string | getComponentType () const |
virtual const ElementBase & | getDesign () const |
Return design element. More... | |
virtual void | trackBunch (PartBunchBase< double, 3 > *bunch, const PartData &, bool revBeam, bool revTrack) const |
Track particle bunch. More... | |
virtual void | trackMap (FVps< double, 6 > &map, const PartData &, bool revBeam, bool revTrack) const |
Track a map. More... | |
void | setExitFaceSlope (const double &) |
![]() | |
ElementBase (const std::string &name) | |
Constructor with given name. More... | |
ElementBase () | |
ElementBase (const ElementBase &) | |
virtual | ~ElementBase () |
virtual const std::string & | getName () const |
Get element name. More... | |
virtual void | setName (const std::string &name) |
Set element name. More... | |
std::string | getTypeString () const |
virtual BGeometryBase & | getGeometry ()=0 |
Get geometry. More... | |
virtual const BGeometryBase & | getGeometry () const =0 |
Get geometry. More... | |
virtual double | getArcLength () const |
Get arc length. More... | |
virtual double | getElementLength () const |
Get design length. More... | |
virtual void | setElementLength (double length) |
Set design length. More... | |
virtual void | getElementDimensions (double &begin, double &end) const |
virtual double | getOrigin () const |
Get origin position. More... | |
virtual double | getEntrance () const |
Get entrance position. More... | |
virtual double | getExit () const |
Get exit position. More... | |
virtual Euclid3D | getTransform (double fromS, double toS) const |
Get transform. More... | |
virtual Euclid3D | getTransform (double s) const |
Get transform. More... | |
virtual Euclid3D | getTotalTransform () const |
Get transform. More... | |
virtual Euclid3D | getEntranceFrame () const |
Get transform. More... | |
virtual Euclid3D | getExitFrame () const |
Get transform. More... | |
virtual Euclid3D | getEntrancePatch () const |
Get patch. More... | |
virtual Euclid3D | getExitPatch () const |
Get patch. More... | |
virtual double | getAttribute (const std::string &aKey) const |
Get attribute value. More... | |
virtual bool | hasAttribute (const std::string &aKey) const |
Test for existence of an attribute. More... | |
virtual void | removeAttribute (const std::string &aKey) |
Remove an existing attribute. More... | |
virtual void | setAttribute (const std::string &aKey, double val) |
Set value of an attribute. More... | |
virtual Channel * | getChannel (const std::string &aKey, bool create=false) |
Construct a read/write channel. More... | |
virtual const ConstChannel * | getConstChannel (const std::string &aKey) const |
Construct a read-only channel. More... | |
virtual void | accept (BeamlineVisitor &visitor) const =0 |
Apply visitor. More... | |
virtual ElementBase * | clone () const =0 |
Return clone. More... | |
virtual ElementBase * | copyStructure () |
Make a structural copy. More... | |
bool | isSharable () const |
Test if the element can be shared. More... | |
virtual void | makeSharable () |
Set sharable flag. More... | |
bool | update (const AttributeSet &) |
Update element. More... | |
virtual void | setBoundaryGeometry (BoundaryGeometry *geo) |
virtual BoundaryGeometry * | getBoundaryGeometry () const |
return the attached boundary geometrt object if there is any More... | |
virtual bool | hasBoundaryGeometry () const |
virtual void | setWake (WakeFunction *wf) |
attach a wake field to the element More... | |
virtual WakeFunction * | getWake () const |
return the attached wake object if there is any More... | |
virtual bool | hasWake () const |
virtual void | setParticleMatterInteraction (ParticleMatterInteractionHandler *spys) |
virtual ParticleMatterInteractionHandler * | getParticleMatterInteraction () const |
virtual bool | hasParticleMatterInteraction () const |
void | setCSTrafoGlobal2Local (const CoordinateSystemTrafo &ori) |
CoordinateSystemTrafo | getCSTrafoGlobal2Local () const |
void | releasePosition () |
void | fixPosition () |
bool | isPositioned () const |
virtual CoordinateSystemTrafo | getEdgeToBegin () const |
virtual CoordinateSystemTrafo | getEdgeToEnd () const |
void | setAperture (const ApertureType &type, const std::vector< double > &args) |
std::pair< ElementBase::ApertureType, std::vector< double > > | getAperture () const |
virtual bool | isInside (const Vector_t &r) const |
void | setMisalignment (const CoordinateSystemTrafo &cst) |
void | getMisalignment (double &x, double &y, double &s) const |
CoordinateSystemTrafo | getMisalignment () const |
void | setActionRange (const std::queue< std::pair< double, double > > &range) |
void | setCurrentSCoordinate (double s) |
void | setRotationAboutZ (double rotation) |
Set rotation about z axis in bend frame. More... | |
double | getRotationAboutZ () const |
virtual BoundingBox | getBoundingBoxInLabCoords () const |
virtual int | getRequiredNumberOfTimeSteps () const |
void | setOutputFN (std::string fn) |
Set output filename. More... | |
std::string | getOutputFN () const |
Get output filename. More... | |
void | setElementPosition (double elemedge) |
Access to ELEMEDGE attribute. More... | |
double | getElementPosition () const |
bool | isElementPositionSet () const |
![]() | |
int | addReference () const |
Increment reference count. More... | |
int | removeReference () const |
Decrement the reference count. More... | |
bool | isShared () const |
Test for sharing. More... | |
Protected Attributes | |
double | exit_face_slope_m |
PartBunchBase< double, 3 > * | RefPartBunch_m |
bool | online_m |
![]() | |
bool | shareFlag |
CoordinateSystemTrafo | csTrafoGlobal2Local_m |
CoordinateSystemTrafo | misalignment_m |
std::pair< ApertureType, std::vector< double > > | aperture_m |
double | elementEdge_m |
double | rotationZAxis_m |
Static Protected Attributes | |
static const std::vector< double > | defaultAperture_m |
Additional Inherited Members | |
![]() | |
enum | ApertureType { RECTANGULAR , ELLIPTICAL , CONIC_RECTANGULAR , CONIC_ELLIPTICAL } |
enum | ElementType { BEAMLINE , CCOLLIMATOR , CORRECTOR , CYCLOTRON , DEGRADER , DRIFT , FLEXIBLECOLLIMATOR , MARKER , MONITOR , MPSPLITINTEGRATOR , MULTIPOLE , MULTIPOLET , OFFSET , PROBE , RBEND , RBEND3D , RFCAVITY , RING , SBEND3D , SBEND , SEPTUM , SOLENOID , SOURCE , STRIPPER , TRAVELINGWAVE , UNDULATOR , VACUUM , VARIABLERFCAVITY , ANY } |
![]() | |
static std::string | getTypeString (ElementType type) |
![]() | |
bool | isInsideTransverse (const Vector_t &r) const |
![]() | |
RCObject () | |
Default constructor. More... | |
RCObject (const RCObject &) | |
Copy constructor. More... | |
virtual | ~RCObject ()=0 |
RCObject & | operator= (const RCObject &right) |
Interface for a single beam element.
Definition at line 50 of file Component.h.
|
explicit |
Constructor with given name.
Definition at line 53 of file Component.cpp.
References defaultAperture_m, ElementBase::ELLIPTICAL, and ElementBase::setAperture().
Component::Component | ( | ) |
Definition at line 40 of file Component.cpp.
Component::Component | ( | const Component & | right | ) |
Definition at line 45 of file Component.cpp.
|
virtual |
Definition at line 63 of file Component.cpp.
Reimplemented in Ring, Cyclotron, VariableRFCavityFringeField, VariableRFCavity, TravelingWave, Source, Solenoid, ScalingFFAMagnet, SBend3D, RFCavity, RBend3D, PluginElement, MultipoleT, Multipole, Monitor, FlexibleCollimator, Bend2D, VerticalFFAMagnet, MultipoleTBase, Degrader, and Corrector.
Definition at line 99 of file Component.cpp.
References ElementBase::getElementLength(), ElementBase::isInsideTransverse(), PartBunchBase< T, Dim >::R, Attrib::Distribution::R, and RefPartBunch_m.
Referenced by RingSection::getFieldValue(), DumpEMFields::writeFieldLine(), and DumpFields::writeFieldThis().
|
virtual |
Reimplemented in VariableRFCavityFringeField, VariableRFCavity, TravelingWave, Solenoid, ScalingFFAMagnet, SBend3D, Ring, RFCavity, RBend3D, MultipoleT, Multipole, Bend2D, VerticalFFAMagnet, MultipoleTBase, Cyclotron, and Corrector.
Definition at line 110 of file Component.cpp.
References ElementBase::getElementLength(), ElementBase::isInsideTransverse(), and Attrib::Distribution::R.
|
virtual |
Reimplemented in VariableRFCavityFringeField, VariableRFCavity, TravelingWave, Solenoid, RFCavity, RBend3D, PluginElement, Multipole, Monitor, FlexibleCollimator, Bend2D, and Degrader.
Definition at line 121 of file Component.cpp.
References ElementBase::getElementLength(), ElementBase::isInsideTransverse(), and Attrib::Distribution::R.
|
pure virtual |
Implemented in VariableRFCavity, TravelingWave, Source, Solenoid, ScalingFFAMagnet, SBend3D, Ring, RFCavity, PluginElement, Offset, MultipoleT, Multipole, Monitor, Marker, FlexibleCollimator, Drift, VerticalFFAMagnet, Vacuum, Undulator, MultipoleTBase, Degrader, Cyclotron, Corrector, and BendBase.
Return the field in a point.
Definition at line 205 of file Component.h.
References EMField::Bfield(), and getField().
Return the field in a point.
Definition at line 211 of file Component.h.
References EMField::Bfield(), and getField().
Return the field in a point.
Definition at line 214 of file Component.h.
References EMField::EBfield(), and getField().
Return the field in a point.
Definition at line 217 of file Component.h.
References EMField::EBfield(), and getField().
Return the field in a point.
Definition at line 202 of file Component.h.
References EMField::Efield(), and getField().
Return the field in a point.
Definition at line 208 of file Component.h.
References EMField::Efield(), and getField().
|
pure virtual |
Implemented in VariableRFCavity, TravelingWave, Source, Solenoid, ScalingFFAMagnet, SBend3D, Ring, RFCavity, RBend3D, Offset, MultipoleT, Multipole, Monitor, Marker, FlexibleCollimator, Drift, Bend2D, PluginElement, VerticalFFAMagnet, Vacuum, Undulator, MultipoleTBase, Degrader, Cyclotron, and Corrector.
|
inlinevirtual |
Reimplemented in RFCavity.
Definition at line 165 of file Component.h.
|
virtual |
Return design element.
Definition at line 67 of file Component.cpp.
|
inlinevirtual |
Reimplemented in RFCavity, and BendBase.
Definition at line 234 of file Component.h.
|
pure virtual |
Implemented in TravelingWave, Source, Solenoid, Ring, RFCavity, RBend3D, PluginElement, MultipoleT, Multipole, Monitor, Marker, FlexibleCollimator, Drift, CCollimator, Vacuum, Undulator, MultipoleTBase, Degrader, Cyclotron, Corrector, Bend2D, VariableRFCavity, ScalingFFAMagnet, SBend3D, Offset, and VerticalFFAMagnet.
|
pure virtual |
Return field.
Implemented in SBend, RBend, Multipole, VariableRFCavity, ScalingFFAMagnet, SBend3D, Ring, RBend3D, Offset, MultipoleT, Corrector, VacuumRep, UndulatorRep, TravelingWaveRep, StripperRep, SourceRep, SolenoidRep, SingleMultipole< order >, SeptumRep, SBendRep, RFCavityRep, RBendRep, ProbeRep, MultipoleRep, MonitorRep, MarkerRep, FlexibleCollimatorRep, DriftRep, DegraderRep, CyclotronRep, CorrectorRep, CCollimatorRep, VerticalFFAMagnet, and MultipoleTBase.
|
pure virtual |
Return field.
Implemented in Corrector, SBend, RBend, Multipole, VariableRFCavity, ScalingFFAMagnet, SBend3D, Ring, RBend3D, Offset, MultipoleT, VacuumRep, UndulatorRep, TravelingWaveRep, StripperRep, SourceRep, SolenoidRep, SingleMultipole< order >, SeptumRep, SBendRep, RFCavityRep, RBendRep, ProbeRep, MultipoleRep, MonitorRep, MarkerRep, FlexibleCollimatorRep, DriftRep, DegraderRep, CyclotronRep, CorrectorRep, CCollimatorRep, VerticalFFAMagnet, and MultipoleTBase.
|
inlinevirtual |
Calculate the four-potential at some position relative to the component
R | position in the local coordinate system of the component |
t | time |
A | filled with the calculated magnetic vector potential |
phi | filled with the calculated electric potential Note that any existing values in A and phi may be overwritten by this method. |
Definition at line 130 of file Component.h.
|
virtual |
Get element type std::string.
Implements ElementBase.
Reimplemented in Bend2D, TravelingWave, Stripper, Source, Solenoid, Septum, SBend, RFCavity, RBend3D, RBend, Probe, Multipole, Monitor, Marker, FlexibleCollimator, Drift, CCollimator, Vacuum, Undulator, Degrader, Cyclotron, and Corrector.
Definition at line 95 of file Component.cpp.
References ElementBase::ANY.
|
virtual |
Reimplemented in TravelingWave, Source, Solenoid, RFCavity, RBend3D, Monitor, FlexibleCollimator, PluginElement, Vacuum, and Degrader.
Definition at line 87 of file Component.cpp.
References online_m.
|
virtual |
Reimplemented in TravelingWave, Source, Solenoid, RFCavity, RBend3D, Monitor, FlexibleCollimator, CCollimator, Bend2D, Vacuum, Degrader, and Corrector.
Definition at line 83 of file Component.cpp.
References online_m.
Referenced by PluginElement::initialise().
|
pure virtual |
Implemented in VariableRFCavityFringeField, VariableRFCavity, TravelingWave, Source, Solenoid, Septum, ScalingFFAMagnet, SBend3D, Ring, RFCavity, RBend3D, PluginElement, Offset, MultipoleTStraight, MultipoleTCurvedVarRadius, MultipoleTCurvedConstRadius, Multipole, Monitor, Marker, FlexibleCollimator, Drift, Bend2D, VerticalFFAMagnet, Vacuum, Undulator, Degrader, Cyclotron, Corrector, MultipoleT, and MultipoleTBase.
|
virtual |
Definition at line 91 of file Component.cpp.
References online_m.
|
inlinevirtual |
Reimplemented in RFCavity.
Definition at line 164 of file Component.h.
|
inlinevirtual |
Reimplemented in BendBase, RFCavity, and Corrector.
Definition at line 231 of file Component.h.
|
inline |
Definition at line 228 of file Component.h.
References exit_face_slope_m.
|
virtual |
Track particle bunch.
Definition at line 71 of file Component.cpp.
References ElementBase::getName().
Referenced by Tracker::visitComponent().
|
virtual |
Track a map.
Definition at line 77 of file Component.cpp.
References ElementBase::getName().
|
staticprotected |
Definition at line 190 of file Component.h.
Referenced by Component().
|
protected |
Definition at line 192 of file Component.h.
Referenced by setExitFaceSlope().
|
protected |
Definition at line 195 of file Component.h.
Referenced by Monitor::apply(), Source::apply(), Probe::doGoOffline(), Cyclotron::finalise(), Vacuum::finalise(), PluginElement::finalise(), Bend2D::finalise(), FlexibleCollimator::finalise(), Multipole::finalise(), Ring::finalise(), goOffline(), Degrader::goOffline(), Vacuum::goOffline(), PluginElement::goOffline(), FlexibleCollimator::goOffline(), RBend3D::goOffline(), RFCavity::goOffline(), Solenoid::goOffline(), Source::goOffline(), goOnline(), Degrader::goOnline(), Bend2D::goOnline(), CCollimator::goOnline(), FlexibleCollimator::goOnline(), Monitor::goOnline(), RBend3D::goOnline(), RFCavity::goOnline(), Solenoid::goOnline(), Source::goOnline(), TravelingWave::goOnline(), Ring::initialise(), Cyclotron::initialise(), Multipole::initialise(), Online(), Degrader::~Degrader(), FlexibleCollimator::~FlexibleCollimator(), and Vacuum::~Vacuum().
|
protected |
Definition at line 194 of file Component.h.
Referenced by apply(), Corrector::apply(), Degrader::apply(), MultipoleTBase::apply(), VerticalFFAMagnet::apply(), Bend2D::apply(), FlexibleCollimator::apply(), Monitor::apply(), Multipole::apply(), MultipoleT::apply(), RBend3D::apply(), RFCavity::apply(), SBend3D::apply(), ScalingFFAMagnet::apply(), Solenoid::apply(), Source::apply(), TravelingWave::apply(), VariableRFCavity::apply(), VariableRFCavityFringeField::apply(), Cyclotron::apply(), Degrader::applyToReferenceParticle(), Monitor::applyToReferenceParticle(), BendBase::calcDesignRadius(), BendBase::calcFieldAmplitude(), BendBase::calcGamma(), Bend2D::calculateBendAngle(), Bend2D::calculateRefTrajectory(), MultipoleTBase::finalise(), VerticalFFAMagnet::finalise(), MultipoleT::finalise(), Offset::finalise(), SBend3D::finalise(), ScalingFFAMagnet::finalise(), VariableRFCavity::finalise(), RBend::findChordLength(), Bend2D::findIdealBendParameters(), Corrector::goOnline(), Degrader::goOnline(), MultipoleT::initialise(), Degrader::initialise(), PluginElement::initialise(), Vacuum::initialise(), Corrector::initialise(), Cyclotron::initialise(), Undulator::initialise(), VerticalFFAMagnet::initialise(), Drift::initialise(), FlexibleCollimator::initialise(), Marker::initialise(), Monitor::initialise(), Multipole::initialise(), MultipoleTCurvedConstRadius::initialise(), MultipoleTCurvedVarRadius::initialise(), MultipoleTStraight::initialise(), Offset::initialise(), RBend3D::initialise(), RFCavity::initialise(), SBend3D::initialise(), ScalingFFAMagnet::initialise(), Solenoid::initialise(), Source::initialise(), TravelingWave::initialise(), VariableRFCavity::initialise(), VariableRFCavity::initNull(), Multipole::isFocusing(), MultipoleT::MultipoleT(), MultipoleTBase::MultipoleTBase(), MultipoleTCurvedConstRadius::MultipoleTCurvedConstRadius(), MultipoleTCurvedVarRadius::MultipoleTCurvedVarRadius(), MultipoleTStraight::MultipoleTStraight(), CCollimator::print(), FlexibleCollimator::print(), SBend3D::SBend3D(), ScalingFFAMagnet::ScalingFFAMagnet(), Corrector::setDesignEnergy(), Ring::setRefPartBunch(), Bend2D::setupPusher(), RFCavity::trackOnAxisParticle(), RBend3D::trackRefParticleThrough(), and VerticalFFAMagnet::VerticalFFAMagnet().