OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
|
#include <Bend2D.h>
Public Member Functions | |
Bend2D (const std::string &name) | |
Constructor with given name. More... | |
Bend2D () | |
Bend2D (const Bend2D &) | |
virtual | ~Bend2D () |
virtual void | accept (BeamlineVisitor &) const =0 |
Apply visitor to Bend2D. More... | |
virtual void | addKR (int i, double t, Vector_t &K) |
virtual void | addKT (int i, double t, Vector_t &K) |
virtual bool | apply (const size_t &i, const double &t, Vector_t &E, Vector_t &B) |
Apply field to particles with coordinates in magnet frame. More... | |
virtual bool | apply (const Vector_t &R, const Vector_t &P, const double &t, Vector_t &E, Vector_t &B) |
Apply field to particles in beam frame. More... | |
virtual bool | applyToReferenceParticle (const Vector_t &R, const Vector_t &P, const double &t, Vector_t &E, Vector_t &B) |
virtual void | goOnline (const double &kineticEnergy) |
virtual void | finalise () |
virtual void | getDimensions (double &sBegin, double &sEnd) const |
virtual ElementBase::ElementType | getType () const =0 |
Get element type std::string. More... | |
virtual void | initialise (PartBunchBase< double, 3 > *bunch, double &startField, double &endField) |
double | getBendRadius () const |
double | getEffectiveCenter () const |
double | getEffectiveLength () const |
double | getStartElement () const |
void | setK1 (double k1) |
Set quadrupole field component. More... | |
void | setExitAngle (double exitAngle) |
virtual double | getExitAngle () const |
double | getMapLength () const |
std::vector< Vector_t > | getOutline () const |
MeshData | getSurfaceMesh () const |
virtual CoordinateSystemTrafo | getEdgeToEnd () const |
CoordinateSystemTrafo | getBeginToEnd_local () const |
virtual bool | isInside (const Vector_t &r) const |
void | setNSlices (const std::size_t &nSlices) |
std::size_t | getNSlices () const |
std::array< double, 2 > | getEntranceFringeFieldLength () const |
Get entrance fringe field length. More... | |
std::array< double, 2 > | getExitFringeFieldLength () const |
Get exit fringe field length. More... | |
![]() | |
BendBase () | |
BendBase (const BendBase &) | |
BendBase (const std::string &) | |
virtual bool | bends () const |
Indicates that element bends the beam. More... | |
void | setLength (double length) |
double | getLength () const |
double | getChordLength () const |
virtual void | setBendAngle (double angle) |
double | getBendAngle () const |
virtual void | setEntranceAngle (double entranceAngle) |
double | getEntranceAngle () const |
void | setFullGap (double) |
double | getFullGap () const |
virtual void | setDesignEnergy (const double &energy, bool changeable=true) |
double | getDesignEnergy () const |
std::vector< Vector_t > | getDesignPath () const |
void | setFieldAmplitude (double k0, double k0s) |
double | getFieldAmplitude () const |
void | setFieldMapFN (std::string fileName) |
std::string | getFieldMapFN () const |
![]() | |
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 | getPotential (const Vector_t &R, const double &t, Vector_t &A, double &phi) |
virtual void | goOffline () |
virtual bool | Online () |
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 ElementImage * | getImage () const |
Construct an image. 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... | |
virtual ElementBase * | makeAlignWrapper () |
Allow misalignment. More... | |
virtual ElementBase * | makeFieldWrapper () |
Allow field errors. More... | |
virtual ElementBase * | makeWrappers () |
Allow errors. More... | |
virtual ElementBase * | removeAlignWrapper () |
Remove align wrapper. More... | |
virtual const ElementBase * | removeAlignWrapper () const |
Remove align wrapper. More... | |
virtual ElementBase * | removeFieldWrapper () |
Remove field wrapper. More... | |
virtual const ElementBase * | removeFieldWrapper () const |
Remove field wrapper. More... | |
virtual ElementBase * | removeWrappers () |
Return the design element. More... | |
virtual const ElementBase * | removeWrappers () const |
Return the design element. 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 |
ElemType | getElType () const |
returns element type as enumeration needed in the envelope tracker More... | |
void | setElType (ElemType elt) |
set the element type as enumeration needed in the envelope tracker More... | |
void | setCSTrafoGlobal2Local (const CoordinateSystemTrafo &ori) |
CoordinateSystemTrafo | getCSTrafoGlobal2Local () const |
void | releasePosition () |
void | fixPosition () |
bool | isPositioned () const |
virtual CoordinateSystemTrafo | getEdgeToBegin () const |
void | setAperture (const ApertureType &type, const std::vector< double > &args) |
std::pair < ElementBase::ApertureType, std::vector< double > > | getAperture () const |
void | setMisalignment (double x, double y, double s) |
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 |
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 Member Functions | |
void | setMessageHeader (const std::string &header) |
double | getStartField () const |
Fieldmap * | getFieldmap () |
![]() | |
bool | isInsideTransverse (const Vector_t &r, double f=1) const |
![]() | |
RCObject () | |
Default constructor. More... | |
RCObject (const RCObject &) | |
Copy constructor. More... | |
virtual | ~RCObject ()=0 |
RCObject & | operator= (const RCObject &right) |
Private Member Functions | |
void | operator= (const Bend2D &) |
void | adjustFringeFields (double ratio) |
double | calculateBendAngle () |
void | calcEngeFunction (double zNormalized, const std::vector< double > &engeCoeff, int polyOrder, double &engeFunc, double &engeFuncDeriv, double &engeFuncSecDerivNorm) |
Vector_t | calcCentralField (const Vector_t &R, double deltaX) |
Vector_t | calcEntranceFringeField (const Vector_t &R, double deltaX) |
Vector_t | calcExitFringeField (const Vector_t &R, double deltaX) |
void | setupFringeWidths () |
bool | calculateMapField (const Vector_t &R, Vector_t &B) |
void | calculateRefTrajectory (double &angleX, double &angleY) |
double | estimateFieldAdjustmentStep (double actualBendAngle, double mass, double betaGamma) |
void | findBendEffectiveLength (double startField, double endField) |
void | findBendStrength (double mass, double gamma, double betaGamma, double charge) |
virtual bool | findChordLength (Inform &msg, double &chordLength)=0 |
bool | findIdealBendParameters (double chordLength) |
bool | initializeFieldMap (Inform &msg) |
bool | inMagnetCentralRegion (const Vector_t &R) const |
bool | inMagnetEntranceRegion (const Vector_t &R) const |
bool | inMagnetExitRegion (const Vector_t &R) const |
bool | isPositionInEntranceField (const Vector_t &R) const |
bool | isPositionInExitField (const Vector_t &R) const |
void | print (Inform &msg, double bendAngleX, double bendAngle) |
void | readFieldMap (Inform &msg) |
void | setBendEffectiveLength (double startField, double endField) |
void | setBendStrength () |
void | setEngeOriginDelta (double delta) |
void | setFieldCalcParam () |
void | setGapFromFieldMap () |
bool | setupBendGeometry (Inform &msg, double &startField, double &endField) |
bool | setupDefaultFieldMap (Inform &msg) |
void | setFieldBoundaries (double startField, double endField) |
void | setupPusher (PartBunchBase< double, 3 > *bunch) |
bool | treatAsDrift (Inform &msg, double chordlength) |
void | setCSTrafoToEntranceRegion (const CoordinateSystemTrafo &trafo) |
void | setCSTrafoToExitRegion (const CoordinateSystemTrafo &trafo) |
Vector_t | transformToEntranceRegion (const Vector_t &R) const |
Vector_t | transformToExitRegion (const Vector_t &R) const |
Private Attributes | |
std::string | messageHeader_m |
BorisPusher | pusher_m |
Fieldmap * | fieldmap_m |
through the bend. More... | |
const bool | fast_m = false |
Magnet field map. More... | |
double | designRadius_m |
Flag to turn on fast field calculation. More... | |
double | exitAngle_m |
Bend design radius (m). More... | |
double | fieldIndex_m |
and the exit face of the magnet (radians). More... | |
double | startField_m |
Dipole field index. More... | |
double | endField_m |
Start of magnet field map in s coordinates (m). More... | |
double | widthEntranceFringe_m |
End of magnet field map in s coordinates (m). More... | |
double | widthExitFringe_m |
bool | reinitialize_m |
double | entranceParameter1_m |
double | entranceParameter2_m |
double | entranceParameter3_m |
double | exitParameter1_m |
double | exitParameter2_m |
double | exitParameter3_m |
std::vector< double > | engeCoeffsEntry_m |
Enge coefficients for map entry and exit regions. More... | |
std::vector< double > | engeCoeffsExit_m |
gsl_spline ** | entryFieldValues_m |
gsl_spline ** | exitFieldValues_m |
gsl_interp_accel * | entryFieldAccel_m |
gsl_interp_accel * | exitFieldAccel_m |
double | deltaBeginEntry_m |
double | deltaEndEntry_m |
function origin where Enge function starts. More... | |
int | polyOrderEntry_m |
function origin that Enge function ends. More... | |
double | deltaBeginExit_m |
Enge function order for entry region. More... | |
double | deltaEndExit_m |
function origin that Enge function starts. More... | |
int | polyOrderExit_m |
function origin that Enge function ends. More... | |
double | cosEntranceAngle_m |
Enge function order for entry region. More... | |
double | sinEntranceAngle_m |
double | tanEntranceAngle_m |
double | tanExitAngle_m |
CoordinateSystemTrafo | beginToEnd_m |
CoordinateSystemTrafo | beginToEnd_lcs_m |
CoordinateSystemTrafo | toEntranceRegion_m |
CoordinateSystemTrafo | toExitRegion_m |
CoordinateSystemTrafo | computeAngleTrafo_m |
double | maxAngle_m |
std::size_t | nSlices_m |
|
explicit |
Constructor with given name.
Definition at line 91 of file Bend2D.cpp.
References isDipole, and ElementBase::setElType().
Bend2D::Bend2D | ( | ) |
Definition at line 40 of file Bend2D.cpp.
Bend2D::Bend2D | ( | const Bend2D & | right | ) |
Definition at line 44 of file Bend2D.cpp.
References isDipole, and ElementBase::setElType().
|
virtual |
Definition at line 131 of file Bend2D.cpp.
References entryFieldAccel_m, entryFieldValues_m, exitFieldAccel_m, and exitFieldValues_m.
|
pure virtual |
Apply visitor to Bend2D.
Implements ElementBase.
Implemented in RBend, SBend, RBendWrapper, and SBendWrapper.
|
inlinevirtual |
|
inlinevirtual |
|
private |
Definition at line 241 of file Bend2D.cpp.
References abs(), BendBase::chordLength_m, entranceParameter1_m, entranceParameter2_m, entranceParameter3_m, exitParameter1_m, exitParameter2_m, exitParameter3_m, findChordLength(), and setupFringeWidths().
Referenced by setGapFromFieldMap().
Apply field to particles with coordinates in magnet frame.
Reimplemented from Component.
Reimplemented in SectorFieldMapComponent.
Definition at line 155 of file Bend2D.cpp.
References PartBunchBase< T, Dim >::R, and Component::RefPartBunch_m.
Referenced by applyToReferenceParticle().
|
virtual |
Apply field to particles in beam frame.
Reimplemented from Component.
Reimplemented in SectorFieldMapComponent.
Definition at line 163 of file Bend2D.cpp.
References calculateMapField(), designRadius_m, BendBase::fieldAmplitude_m, Attrib::Distribution::R, and X.
|
virtual |
Reimplemented from Component.
Definition at line 186 of file Bend2D.cpp.
References apply().
Definition at line 365 of file Bend2D.cpp.
Referenced by calculateMapField().
|
private |
Definition at line 301 of file Bend2D.cpp.
References exp(), BendBase::gap_m, matheval::detail::math::isinf(), matheval::detail::math::isnan(), and pow().
Referenced by readFieldMap().
Definition at line 384 of file Bend2D.cpp.
References entranceParameter1_m, entranceParameter2_m, entranceParameter3_m, entryFieldAccel_m, entryFieldValues_m, pow(), CoordinateSystemTrafo::rotateFrom(), and CoordinateSystemTrafo::transformTo().
Referenced by calculateMapField().
Definition at line 421 of file Bend2D.cpp.
References exitFieldAccel_m, exitFieldValues_m, exitParameter1_m, exitParameter2_m, exitParameter3_m, getBeginToEnd_local(), pow(), CoordinateSystemTrafo::rotateFrom(), and CoordinateSystemTrafo::transformTo().
Referenced by calculateMapField().
|
private |
Definition at line 259 of file Bend2D.cpp.
References atan2(), Physics::c, calculateMapField(), cos(), deltaBeginEntry_m, BendBase::designEnergy_m, endField_m, BendBase::entranceAngle_m, euclidean_norm(), BendBase::fieldAmplitude_m, PartBunchBase< T, Dim >::getdT(), PartBunchBase< T, Dim >::getM(), BorisPusher::kick(), pow(), BorisPusher::push(), pusher_m, Component::RefPartBunch_m, sin(), sqrt(), startField_m, tan(), and X.
Referenced by findBendEffectiveLength(), findBendStrength(), and setBendEffectiveLength().
Definition at line 457 of file Bend2D.cpp.
References abs(), calcCentralField(), calcEntranceFringeField(), calcExitFringeField(), cosEntranceAngle_m, designRadius_m, BendBase::gap_m, getBeginToEnd_local(), inMagnetCentralRegion(), inMagnetEntranceRegion(), inMagnetExitRegion(), isPositionInEntranceField(), isPositionInExitField(), Attrib::Distribution::R, sinEntranceAngle_m, CoordinateSystemTrafo::transformTo(), transformToEntranceRegion(), and transformToExitRegion().
Referenced by apply(), calculateBendAngle(), and calculateRefTrajectory().
|
private |
Definition at line 520 of file Bend2D.cpp.
References atan2(), Physics::c, calculateMapField(), cos(), deltaBeginEntry_m, BendBase::designEnergy_m, endField_m, endl(), BendBase::entranceAngle_m, BendBase::fieldAmplitude_m, PartBunchBase< T, Dim >::getdT(), OpalData::getInstance(), PartBunchBase< T, Dim >::getM(), ElementBase::getName(), BorisPusher::kick(), IpplInfo::myNode(), BorisPusher::push(), pusher_m, Component::RefPartBunch_m, BendBase::refTrajMap_m, ElementBase::rotationZAxis_m, sin(), sqrt(), startField_m, tan(), Options::writeBendTrajectories, and X.
Referenced by initialise().
|
private |
Definition at line 587 of file Bend2D.cpp.
References abs(), BendBase::angle_m, Physics::c, designRadius_m, BendBase::fieldAmplitude_m, pow(), and sqrt().
Referenced by findBendStrength().
|
inlinevirtual |
Implements Component.
Reimplemented in SectorFieldMapComponent.
Definition at line 299 of file Bend2D.h.
References Component::online_m.
|
private |
Definition at line 605 of file Bend2D.cpp.
References abs(), BendBase::angle_m, calculateBendAngle(), Physics::e, BendBase::gap_m, setEngeOriginDelta(), setFieldBoundaries(), and setFieldCalcParam().
Referenced by setBendEffectiveLength().
|
private |
Definition at line 695 of file Bend2D.cpp.
References abs(), BendBase::angle_m, calculateBendAngle(), Physics::e, estimateFieldAdjustmentStep(), BendBase::fieldAmplitude_m, and Physics::rad2deg.
Referenced by setBendStrength().
|
privatepure virtual |
Implemented in RBend, and SBend.
Referenced by adjustFringeFields(), setEngeOriginDelta(), and setupBendGeometry().
|
private |
Definition at line 776 of file Bend2D.cpp.
References abs(), BendBase::angle_m, asin(), atan2(), BendBase::bX_m, BendBase::bY_m, Physics::c, copysign(), BendBase::designEnergy_m, designRadius_m, BendBase::entranceAngle_m, exitAngle_m, BendBase::fieldAmplitude_m, PartBunchBase< T, Dim >::getM(), PartBunchBase< T, Dim >::getQ(), Physics::pi, pow(), Component::RefPartBunch_m, ElementBase::rotationZAxis_m, setExitAngle(), sin(), and sqrt().
Referenced by setupBendGeometry().
|
inline |
Definition at line 382 of file Bend2D.h.
References beginToEnd_lcs_m.
Referenced by calcExitFringeField(), calculateMapField(), getOutline(), getSurfaceMesh(), inMagnetCentralRegion(), inMagnetExitRegion(), isPositionInExitField(), OpalBeamline::save3DLattice(), and setFieldCalcParam().
|
inline |
Definition at line 310 of file Bend2D.h.
References designRadius_m.
Referenced by CSRIGFWakeFunction::initialize(), and CSRWakeFunction::initialize().
|
inlinevirtual |
Implements Component.
Reimplemented in SectorFieldMapComponent.
Definition at line 304 of file Bend2D.h.
References endField_m, and startField_m.
Referenced by CSRIGFWakeFunction::initialize(), and CSRWakeFunction::initialize().
|
inlinevirtual |
|
inline |
Definition at line 315 of file Bend2D.h.
References BendBase::angle_m, designRadius_m, and ElementBase::elementEdge_m.
Referenced by CSRIGFWakeFunction::initialize(), and CSRWakeFunction::initialize().
|
inline |
Definition at line 320 of file Bend2D.h.
References BendBase::angle_m, and designRadius_m.
Referenced by CSRIGFWakeFunction::initialize(), and CSRWakeFunction::initialize().
std::array< double, 2 > Bend2D::getEntranceFringeFieldLength | ( | ) | const |
Get entrance fringe field length.
Definition at line 1695 of file Bend2D.cpp.
References entranceParameter1_m, entranceParameter2_m, entranceParameter3_m, fieldmap_m, and Fieldmap::get1DProfile1EntranceParam().
|
inlinevirtual |
Implements BendBase.
Definition at line 357 of file Bend2D.h.
References exitAngle_m.
Referenced by OpalBeamline::save3DInput(), and ThickTracker::visitSBend().
std::array< double, 2 > Bend2D::getExitFringeFieldLength | ( | ) | const |
Get exit fringe field length.
Definition at line 1715 of file Bend2D.cpp.
References exitParameter1_m, exitParameter2_m, exitParameter3_m, fieldmap_m, and Fieldmap::get1DProfile1ExitParam().
|
inlineprotected |
Definition at line 351 of file Bend2D.h.
References fieldmap_m.
Referenced by RBend::addKR(), and RBend::addKT().
|
inline |
Definition at line 370 of file Bend2D.h.
References entranceParameter2_m, and exitParameter2_m.
std::size_t Bend2D::getNSlices | ( | ) | const |
Definition at line 1689 of file Bend2D.cpp.
References nSlices_m.
Referenced by ThickTracker::visitSBend().
std::vector< Vector_t > Bend2D::getOutline | ( | ) | const |
Definition at line 1332 of file Bend2D.cpp.
References abs(), ElementBase::aperture_m, atan2(), ceil(), cos(), cosEntranceAngle_m, Physics::deg2rad, designRadius_m, dot(), endl(), entranceParameter1_m, exitParameter3_m, fmod(), getBeginToEnd_local(), OpalData::getInstance(), ElementBase::getName(), getQuaternion(), max(), IpplInfo::myNode(), pow(), Attrib::Distribution::R, Quaternion::rotate(), sin(), sinEntranceAngle_m, tanEntranceAngle_m, tanExitAngle_m, CoordinateSystemTrafo::transformFrom(), CoordinateSystemTrafo::transformTo(), Physics::two_pi, widthEntranceFringe_m, widthExitFringe_m, and Options::writeBendTrajectories.
Referenced by getSurfaceMesh().
|
inline |
Definition at line 325 of file Bend2D.h.
References ElementBase::elementEdge_m.
|
inlineprotected |
Definition at line 345 of file Bend2D.h.
References startField_m.
Referenced by RBend::addKR(), and RBend::addKT().
MeshData Bend2D::getSurfaceMesh | ( | ) | const |
Definition at line 1435 of file Bend2D.cpp.
References abs(), BendBase::angle_m, ElementBase::aperture_m, asin(), cos(), cosEntranceAngle_m, cross(), MeshData::decorations_m, designRadius_m, det(), dot(), Physics::e, BendBase::entranceAngle_m, entranceParameter1_m, entranceParameter3_m, euclidean_norm(), exitAngle_m, exitParameter1_m, exitParameter3_m, getBeginToEnd_local(), BendBase::getFullGap(), getOutline(), getType(), pow(), Attrib::Distribution::R, ElementBase::RBEND, Quaternion::rotate(), CoordinateSystemTrafo::rotateFrom(), sin(), sinEntranceAngle_m, T, tanEntranceAngle_m, tanExitAngle_m, toEntranceRegion_m, toExitRegion_m, CoordinateSystemTrafo::transformFrom(), CoordinateSystemTrafo::transformTo(), MeshData::triangles_m, and MeshData::vertices_m.
Referenced by MeshGenerator::add().
|
pure virtual |
Get element type std::string.
Reimplemented from Component.
Implemented in RBend, SBend, RBendWrapper, and SBendWrapper.
Referenced by getSurfaceMesh(), and setupBendGeometry().
|
virtual |
Reimplemented from Component.
Definition at line 194 of file Bend2D.cpp.
References Component::online_m.
|
virtual |
Implements Component.
Reimplemented in SectorFieldMapComponent.
Definition at line 198 of file Bend2D.cpp.
References calculateRefTrajectory(), ElementBase::elementEdge_m, endField_m, endl(), ERRORMSG, BendBase::fileName_m, ElementBase::getName(), gmsg, initializeFieldMap(), level2(), messageHeader_m, name, print(), readFieldMap(), setupBendGeometry(), setupFringeWidths(), setupPusher(), startField_m, and Util::toUpper().
|
private |
Definition at line 818 of file Bend2D.cpp.
References fast_m, fieldmap_m, BendBase::fileName_m, Fieldmap::getFieldmap(), and setupDefaultFieldMap().
Referenced by initialise().
|
private |
Definition at line 833 of file Bend2D.cpp.
References abs(), ElementBase::aperture_m, atan2(), computeAngleTrafo_m, cosEntranceAngle_m, designRadius_m, euclidean_norm(), fmod(), getBeginToEnd_local(), maxAngle_m, Attrib::Distribution::R, sinEntranceAngle_m, CoordinateSystemTrafo::transformTo(), and Physics::two_pi.
Referenced by calculateMapField(), and isInside().
|
private |
Definition at line 851 of file Bend2D.cpp.
References abs(), ElementBase::aperture_m, entranceParameter1_m, and Attrib::Distribution::R.
Referenced by calculateMapField(), and isInside().
|
private |
Definition at line 858 of file Bend2D.cpp.
References abs(), ElementBase::aperture_m, exitParameter3_m, getBeginToEnd_local(), and CoordinateSystemTrafo::transformTo().
Referenced by calculateMapField(), and isInside().
|
virtual |
Reimplemented from ElementBase.
Definition at line 1663 of file Bend2D.cpp.
References abs(), BendBase::gap_m, inMagnetCentralRegion(), inMagnetEntranceRegion(), inMagnetExitRegion(), and Attrib::Distribution::R.
|
private |
Definition at line 867 of file Bend2D.cpp.
References entranceParameter1_m, entranceParameter3_m, polyOrderEntry_m, and Attrib::Distribution::R.
Referenced by calculateMapField().
|
private |
Definition at line 874 of file Bend2D.cpp.
References exitParameter1_m, exitParameter3_m, getBeginToEnd_local(), polyOrderExit_m, and CoordinateSystemTrafo::transformTo().
Referenced by calculateMapField().
|
private |
|
private |
Definition at line 882 of file Bend2D.cpp.
References BendBase::angle_m, BendBase::designEnergy_m, designRadius_m, ElementBase::elementEdge_m, endField_m, endl(), engeCoeffsEntry_m, engeCoeffsExit_m, BendBase::entranceAngle_m, entranceParameter1_m, entranceParameter2_m, entranceParameter3_m, exitAngle_m, exitParameter1_m, exitParameter2_m, exitParameter3_m, BendBase::fieldAmplitude_m, fieldIndex_m, BendBase::fileName_m, BendBase::gap_m, level2(), Physics::pi, polyOrderEntry_m, polyOrderExit_m, ElementBase::rotationZAxis_m, and startField_m.
Referenced by initialise().
|
private |
Definition at line 982 of file Bend2D.cpp.
References abs(), Physics::c, calcEngeFunction(), ceil(), Physics::e, engeCoeffsEntry_m, engeCoeffsExit_m, entranceParameter1_m, entranceParameter2_m, entranceParameter3_m, entryFieldAccel_m, entryFieldValues_m, exitFieldAccel_m, exitFieldValues_m, exitParameter1_m, exitParameter2_m, exitParameter3_m, fieldmap_m, BendBase::fileName_m, BendBase::gap_m, Fieldmap::get1DProfile1EngeCoeffs(), Fieldmap::get1DProfile1EntranceParam(), Fieldmap::get1DProfile1ExitParam(), Fieldmap::getInfo(), ElementBase::getName(), level2(), polyOrderEntry_m, polyOrderExit_m, Fieldmap::readMap(), and setGapFromFieldMap().
Referenced by initialise().
|
private |
Definition at line 1062 of file Bend2D.cpp.
References abs(), BendBase::angle_m, calculateBendAngle(), Physics::e, and findBendEffectiveLength().
Referenced by setupBendGeometry().
|
private |
Definition at line 1074 of file Bend2D.cpp.
References abs(), Physics::c, BendBase::designEnergy_m, designRadius_m, BendBase::fieldAmplitude_m, findBendStrength(), PartBunchBase< T, Dim >::getM(), PartBunchBase< T, Dim >::getQ(), pow(), Component::RefPartBunch_m, and sqrt().
Referenced by setupBendGeometry().
|
inlineprivate |
Definition at line 388 of file Bend2D.h.
References toEntranceRegion_m.
|
inlineprivate |
Definition at line 393 of file Bend2D.h.
References toExitRegion_m.
|
private |
Definition at line 1090 of file Bend2D.cpp.
References abs(), BendBase::chordLength_m, entranceParameter1_m, entranceParameter2_m, entranceParameter3_m, exitParameter1_m, exitParameter2_m, exitParameter3_m, findChordLength(), and setupFringeWidths().
Referenced by findBendEffectiveLength().
|
inline |
Definition at line 363 of file Bend2D.h.
References exitAngle_m, tan(), and tanExitAngle_m.
Referenced by findIdealBendParameters(), RBend::setBendAngle(), RBend::setEntranceAngle(), and OpalSBend::update().
|
private |
Definition at line 1280 of file Bend2D.cpp.
References BendBase::angle_m, cos(), deltaBeginEntry_m, deltaEndExit_m, designRadius_m, endField_m, BendBase::entranceAngle_m, exitAngle_m, and startField_m.
Referenced by findBendEffectiveLength(), and setupBendGeometry().
|
private |
Definition at line 1112 of file Bend2D.cpp.
References abs(), ElementBase::aperture_m, atan2(), beginToEnd_lcs_m, beginToEnd_m, computeAngleTrafo_m, Quaternion::conjugate(), cos(), cosEntranceAngle_m, deltaBeginEntry_m, deltaBeginExit_m, deltaEndEntry_m, deltaEndExit_m, designRadius_m, dot(), BendBase::entranceAngle_m, entranceParameter1_m, entranceParameter2_m, entranceParameter3_m, exitAngle_m, exitParameter1_m, exitParameter2_m, exitParameter3_m, fmod(), getBeginToEnd_local(), BendBase::getBendAngle(), BendBase::getChordLength(), BendBase::getEntranceAngle(), getQuaternion(), ElementBase::getRotationAboutZ(), maxAngle_m, pow(), Attrib::Distribution::R, Quaternion::rotate(), sin(), sinEntranceAngle_m, tan(), tanEntranceAngle_m, toEntranceRegion_m, toExitRegion_m, CoordinateSystemTrafo::transformFrom(), CoordinateSystemTrafo::transformTo(), and Physics::two_pi.
Referenced by findBendEffectiveLength(), and setupBendGeometry().
|
private |
Definition at line 1204 of file Bend2D.cpp.
References adjustFringeFields(), fieldmap_m, BendBase::gap_m, and Fieldmap::getFieldGap().
Referenced by readFieldMap().
|
inline |
Set quadrupole field component.
Definition at line 330 of file Bend2D.h.
References abs(), and fieldIndex_m.
Referenced by OpalSBend::update(), and OpalRBend::update().
|
inlineprotected |
Definition at line 339 of file Bend2D.h.
References messageHeader_m.
Referenced by RBend::RBend(), and SBend::SBend().
void Bend2D::setNSlices | ( | const std::size_t & | nSlices | ) |
Definition at line 1684 of file Bend2D.cpp.
References nSlices_m.
Referenced by OpalSBend::update(), and OpalRBend::update().
|
private |
Definition at line 1213 of file Bend2D.cpp.
References ElementBase::aperture_m, BendBase::chordLength_m, designRadius_m, ElementBase::elementEdge_m, endField_m, BendBase::fileName_m, findChordLength(), findIdealBendParameters(), BendBase::getEntranceAngle(), getType(), ElementBase::RBEND, reinitialize_m, setBendEffectiveLength(), setBendStrength(), BendBase::setEntranceAngle(), setFieldBoundaries(), setFieldCalcParam(), startField_m, and treatAsDrift().
Referenced by initialise().
|
private |
Definition at line 1264 of file Bend2D.cpp.
References endl(), ERRORMSG, and BendBase::length_m.
Referenced by initializeFieldMap().
|
private |
Definition at line 1677 of file Bend2D.cpp.
References ElementBase::aperture_m, entranceParameter1_m, entranceParameter3_m, exitParameter1_m, exitParameter3_m, min(), widthEntranceFringe_m, and widthExitFringe_m.
Referenced by adjustFringeFields(), initialise(), and setEngeOriginDelta().
|
private |
Definition at line 1288 of file Bend2D.cpp.
References PartBunchBase< T, Dim >::getReference(), BorisPusher::initialise(), pusher_m, and Component::RefPartBunch_m.
Referenced by initialise().
Definition at line 398 of file Bend2D.h.
References toEntranceRegion_m, and CoordinateSystemTrafo::transformTo().
Referenced by calculateMapField().
Definition at line 403 of file Bend2D.h.
References toExitRegion_m, and CoordinateSystemTrafo::transformTo().
Referenced by calculateMapField().
|
private |
Definition at line 1295 of file Bend2D.cpp.
References abs(), BendBase::angle_m, BendBase::bX_m, BendBase::bY_m, Physics::c, BendBase::designEnergy_m, designRadius_m, endl(), BendBase::fieldAmplitude_m, PartBunchBase< T, Dim >::getM(), pow(), Component::RefPartBunch_m, sqrt(), and WARNMSG.
Referenced by setupBendGeometry().
|
private |
Definition at line 287 of file Bend2D.h.
Referenced by getBeginToEnd_local(), and setFieldCalcParam().
|
private |
Definition at line 286 of file Bend2D.h.
Referenced by getEdgeToEnd(), and setFieldCalcParam().
|
private |
Definition at line 291 of file Bend2D.h.
Referenced by inMagnetCentralRegion(), and setFieldCalcParam().
|
private |
Enge function order for entry region.
Definition at line 281 of file Bend2D.h.
Referenced by calculateMapField(), getOutline(), getSurfaceMesh(), inMagnetCentralRegion(), and setFieldCalcParam().
|
private |
Definition at line 269 of file Bend2D.h.
Referenced by calculateBendAngle(), calculateRefTrajectory(), setFieldBoundaries(), and setFieldCalcParam().
|
private |
Enge function order for entry region.
Definition at line 275 of file Bend2D.h.
Referenced by setFieldCalcParam().
|
private |
function origin where Enge function starts.
Perpendicular distance from entrance Enge
Definition at line 271 of file Bend2D.h.
Referenced by setFieldCalcParam().
|
private |
function origin that Enge function starts.
Perpendicular distance from exit Enge
Definition at line 277 of file Bend2D.h.
Referenced by setFieldBoundaries(), and setFieldCalcParam().
|
private |
Flag to turn on fast field calculation.
Definition at line 218 of file Bend2D.h.
Referenced by apply(), calculateMapField(), estimateFieldAdjustmentStep(), findIdealBendParameters(), getBendRadius(), getEffectiveCenter(), getEffectiveLength(), getOutline(), getSurfaceMesh(), inMagnetCentralRegion(), print(), setBendStrength(), setFieldBoundaries(), setFieldCalcParam(), setupBendGeometry(), and treatAsDrift().
|
private |
Start of magnet field map in s coordinates (m).
Definition at line 225 of file Bend2D.h.
Referenced by calculateBendAngle(), calculateRefTrajectory(), getDimensions(), initialise(), print(), setFieldBoundaries(), and setupBendGeometry().
|
private |
Enge coefficients for map entry and exit regions.
Definition at line 257 of file Bend2D.h.
Referenced by print(), and readFieldMap().
|
private |
Definition at line 258 of file Bend2D.h.
Referenced by print(), and readFieldMap().
|
private |
Definition at line 249 of file Bend2D.h.
Referenced by adjustFringeFields(), calcEntranceFringeField(), getEntranceFringeFieldLength(), getOutline(), getSurfaceMesh(), inMagnetEntranceRegion(), isPositionInEntranceField(), print(), readFieldMap(), setEngeOriginDelta(), setFieldCalcParam(), and setupFringeWidths().
|
private |
Definition at line 250 of file Bend2D.h.
Referenced by adjustFringeFields(), calcEntranceFringeField(), getEntranceFringeFieldLength(), getMapLength(), print(), readFieldMap(), setEngeOriginDelta(), and setFieldCalcParam().
|
private |
Definition at line 251 of file Bend2D.h.
Referenced by adjustFringeFields(), calcEntranceFringeField(), getEntranceFringeFieldLength(), getSurfaceMesh(), isPositionInEntranceField(), print(), readFieldMap(), setEngeOriginDelta(), setFieldCalcParam(), and setupFringeWidths().
|
private |
Definition at line 262 of file Bend2D.h.
Referenced by calcEntranceFringeField(), readFieldMap(), and ~Bend2D().
|
private |
Definition at line 260 of file Bend2D.h.
Referenced by calcEntranceFringeField(), readFieldMap(), and ~Bend2D().
|
private |
Bend design radius (m).
and the entrance face of the magnet (radians).
Definition at line 221 of file Bend2D.h.
Referenced by findIdealBendParameters(), getExitAngle(), getSurfaceMesh(), print(), setExitAngle(), setFieldBoundaries(), and setFieldCalcParam().
|
private |
Definition at line 263 of file Bend2D.h.
Referenced by calcExitFringeField(), readFieldMap(), and ~Bend2D().
|
private |
Definition at line 261 of file Bend2D.h.
Referenced by calcExitFringeField(), readFieldMap(), and ~Bend2D().
|
private |
Definition at line 252 of file Bend2D.h.
Referenced by adjustFringeFields(), calcExitFringeField(), getExitFringeFieldLength(), getSurfaceMesh(), isPositionInExitField(), print(), readFieldMap(), setEngeOriginDelta(), setFieldCalcParam(), and setupFringeWidths().
|
private |
Definition at line 253 of file Bend2D.h.
Referenced by adjustFringeFields(), calcExitFringeField(), getExitFringeFieldLength(), getMapLength(), print(), readFieldMap(), setEngeOriginDelta(), and setFieldCalcParam().
|
private |
Definition at line 254 of file Bend2D.h.
Referenced by adjustFringeFields(), calcExitFringeField(), getExitFringeFieldLength(), getOutline(), getSurfaceMesh(), inMagnetExitRegion(), isPositionInExitField(), print(), readFieldMap(), setEngeOriginDelta(), setFieldCalcParam(), and setupFringeWidths().
|
private |
|
private |
|
private |
through the bend.
Pusher used to integrate reference particle
Definition at line 215 of file Bend2D.h.
Referenced by getEntranceFringeFieldLength(), getExitFringeFieldLength(), getFieldmap(), initializeFieldMap(), readFieldMap(), and setGapFromFieldMap().
|
private |
Definition at line 292 of file Bend2D.h.
Referenced by inMagnetCentralRegion(), and setFieldCalcParam().
|
private |
Definition at line 210 of file Bend2D.h.
Referenced by initialise(), and setMessageHeader().
|
private |
Definition at line 294 of file Bend2D.h.
Referenced by getNSlices(), and setNSlices().
|
private |
function origin that Enge function ends.
Perpendicular distance from entrance Enge
Definition at line 273 of file Bend2D.h.
Referenced by isPositionInEntranceField(), print(), and readFieldMap().
|
private |
function origin that Enge function ends.
Perpendicular distance from exit Enge
Definition at line 279 of file Bend2D.h.
Referenced by isPositionInExitField(), print(), and readFieldMap().
|
private |
Definition at line 212 of file Bend2D.h.
Referenced by calculateBendAngle(), calculateRefTrajectory(), and setupPusher().
|
private |
Definition at line 236 of file Bend2D.h.
Referenced by setupBendGeometry().
|
private |
Definition at line 282 of file Bend2D.h.
Referenced by calculateMapField(), getOutline(), getSurfaceMesh(), inMagnetCentralRegion(), and setFieldCalcParam().
|
private |
Dipole field index.
Definition at line 224 of file Bend2D.h.
Referenced by calculateBendAngle(), calculateRefTrajectory(), getDimensions(), getStartField(), initialise(), print(), setFieldBoundaries(), and setupBendGeometry().
|
private |
Definition at line 283 of file Bend2D.h.
Referenced by getOutline(), getSurfaceMesh(), and setFieldCalcParam().
|
private |
Definition at line 284 of file Bend2D.h.
Referenced by getOutline(), getSurfaceMesh(), and setExitAngle().
|
private |
Definition at line 288 of file Bend2D.h.
Referenced by getSurfaceMesh(), setCSTrafoToEntranceRegion(), setFieldCalcParam(), and transformToEntranceRegion().
|
private |
Definition at line 289 of file Bend2D.h.
Referenced by getSurfaceMesh(), setCSTrafoToExitRegion(), setFieldCalcParam(), and transformToExitRegion().
|
private |
End of magnet field map in s coordinates (m).
Definition at line 227 of file Bend2D.h.
Referenced by getOutline(), and setupFringeWidths().
|
private |
Definition at line 228 of file Bend2D.h.
Referenced by getOutline(), and setupFringeWidths().