OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
|
Build a map using the linear map around the design orbit for each element. More...
#include <IdealMapper.h>
Public Member Functions | |
IdealMapper (const Beamline &beamline, const PartData &, bool revBeam, bool revTrack) | |
Constructor. More... | |
virtual | ~IdealMapper () |
virtual void | getMatrix (FMatrix< double, 6, 6 > &) const |
Return the linear part of the accumulated map. More... | |
virtual void | setMatrix (const FMatrix< double, 6, 6 > &) |
Reset the linear part of the accumulated map for restart. More... | |
virtual void | visitCorrector (const Corrector &) |
Apply the algorithm to a Corrector. More... | |
virtual void | visitPatch (const Patch &pat) |
Apply the algorithm to a patch. More... | |
virtual void | visitSeparator (const Separator &) |
Apply the algorithm to a Separator. More... | |
virtual void | visitAlignWrapper (const AlignWrapper &) |
Apply the algorithm to an offset beamline object wrapper. More... | |
virtual void | visitCorrectorWrapper (const CorrectorWrapper &) |
Apply the algorithm to an corrector wrapper.. More... | |
virtual void | visitMultipoleWrapper (const MultipoleWrapper &) |
Apply the algorithm to an multipole wrapper.. More... | |
virtual void | visitRBendWrapper (const RBendWrapper &) |
Apply the algorithm to an RBend wrapper.. More... | |
virtual void | visitSBendWrapper (const SBendWrapper &) |
Apply the algorithm to an SBend wrapper.. More... | |
![]() | |
LinearMapper (const Beamline &beamline, const PartData &, bool revBeam, bool revTrack) | |
Constructor. More... | |
virtual | ~LinearMapper () |
virtual void | getMap (LinearMap< double, 6 > &) const |
Return the linear part of the accumulated map. More... | |
virtual void | getMap (FVps< double, 6 > &) const |
Return the full map accumulated so far. More... | |
virtual void | setMap (const LinearMap< double, 6 > &) |
Reset the linear part of the accumulated map for restart. More... | |
virtual void | setMap (const FVps< double, 6 > &) |
Reset the full map for restart. More... | |
virtual void | visitBeamBeam (const BeamBeam &) |
Apply the algorithm to a BeamBeam. More... | |
virtual void | visitBeamStripping (const BeamStripping &) |
Apply the algorithm to a beam stripping. More... | |
virtual void | visitCCollimator (const CCollimator &) |
Apply the algorithm to a collimator. More... | |
virtual void | visitComponent (const Component &) |
Apply the algorithm to an arbitrary component. More... | |
virtual void | visitDegrader (const Degrader &) |
Apply the algorithm to a drift. More... | |
virtual void | visitDiagnostic (const Diagnostic &) |
Apply the algorithm to a Diagnostic. More... | |
virtual void | visitDrift (const Drift &) |
Apply the algorithm to a Drift. More... | |
virtual void | visitFlexibleCollimator (const FlexibleCollimator &) |
Apply the algorithm to a flexible collimator. More... | |
virtual void | visitLambertson (const Lambertson &) |
Apply the algorithm to a Lambertson. More... | |
virtual void | visitMarker (const Marker &) |
Apply the algorithm to a Marker. More... | |
virtual void | visitMonitor (const Monitor &) |
Apply the algorithm to a Monitor. More... | |
virtual void | visitMultipole (const Multipole &) |
Apply the algorithm to a Multipole. More... | |
virtual void | visitProbe (const Probe &prob) |
Apply the algorithm to a probe. More... | |
virtual void | visitRBend0 (const RBend &) |
Apply the algorithm to a RBend. More... | |
virtual void | visitRBend (const RBend &) |
Apply the algorithm to a rectangular bend. More... | |
virtual void | visitRFCavity (const RFCavity &) |
Apply the algorithm to a RFCavity. More... | |
virtual void | visitRFQuadrupole (const RFQuadrupole &) |
Apply the algorithm to a RFQuadrupole. More... | |
virtual void | visitSBend (const SBend &) |
Apply the algorithm to a SBend. More... | |
virtual void | visitSeptum (const Septum &) |
Apply the algorithm to a Septum. More... | |
virtual void | visitSolenoid (const Solenoid &) |
Apply the algorithm to a Solenoid. More... | |
virtual void | visitParallelPlate (const ParallelPlate &) |
Apply the algorithm to a ParallelPlate. More... | |
virtual void | visitCyclotronValley (const CyclotronValley &) |
Apply the algorithm to a CyclotronValley. More... | |
virtual void | visitMapIntegrator (const MapIntegrator &) |
Apply the algorithm to an integrator capable of mapping. More... | |
![]() | |
AbstractMapper (const Beamline &bl, const PartData &data, bool revBeam, bool revTrack) | |
Constructor. More... | |
virtual | ~AbstractMapper () |
![]() | |
DefaultVisitor (const Beamline &beamline, bool backBeam, bool backTrack) | |
Constructor. More... | |
virtual | ~DefaultVisitor ()=0 |
virtual void | execute () |
Apply the algorithm to the top-level beamline. More... | |
virtual void | visitCyclotron (const Cyclotron &) |
Apply the algorithm to an cyclotron. More... | |
virtual void | visitRing (const Ring &) |
Apply the algorithm to an opal ring.. More... | |
virtual void | visitMultipoleT (const MultipoleT &) |
Apply the algorithm to a multipoleT. More... | |
virtual void | visitMultipoleTStraight (const MultipoleTStraight &) |
Apply the algorithm to a multipoleTStraight. More... | |
virtual void | visitMultipoleTCurvedConstRadius (const MultipoleTCurvedConstRadius &) |
Apply the algorithm to a multipoleTCurvedConstRadius. More... | |
virtual void | visitMultipoleTCurvedVarRadius (const MultipoleTCurvedVarRadius &) |
Apply the algorithm to a multipoleTCurvedVarRadius. More... | |
virtual void | visitOffset (const Offset &) |
Apply the algorithm to an Offset. More... | |
virtual void | visitRBend3D (const RBend3D &) |
Apply the algorithm to a rectangular bend. More... | |
virtual void | visitVariableRFCavity (const VariableRFCavity &vcav) |
Apply the algorithm to a RF cavity. More... | |
virtual void | visitVariableRFCavityFringeField (const VariableRFCavityFringeField &vcav) |
Apply the algorithm to a RF cavity. More... | |
virtual void | visitTravelingWave (const TravelingWave &) |
Apply the algorithm to a RF cavity. More... | |
virtual void | visitSBend3D (const SBend3D &) |
Apply the algorithm to a sector bend. More... | |
virtual void | visitScalingFFAMagnet (const ScalingFFAMagnet &) |
Apply the algorithm to a scaling FFA magnet. More... | |
virtual void | visitVerticalFFAMagnet (const VerticalFFAMagnet &) |
Apply the algorithm to a RF cavity. More... | |
virtual void | visitSource (const Source &) |
Apply the algorithm to a source. More... | |
virtual void | visitStripper (const Stripper &) |
Apply the algorithm to a charge stripper. More... | |
virtual void | visitBeamline (const Beamline &) |
Apply the algorithm to a beam line. More... | |
virtual void | visitFlaggedElmPtr (const FlaggedElmPtr &) |
Apply the algorithm to a FlaggedElmPtr. More... | |
virtual void | visitCyclotronWrapper (const CyclotronWrapper &) |
Apply the algorithm to an cyclotron wrapper.. More... | |
virtual void | visitIntegrator (const Integrator &) |
Apply the algorithm to a generic integrator. More... | |
virtual void | visitTrackIntegrator (const TrackIntegrator &) |
Apply the algorithm to an integrator capable of tracking. More... | |
![]() | |
BeamlineVisitor () | |
virtual | ~BeamlineVisitor () |
Protected Member Functions | |
virtual void | applyMultipoleBody (double length, double refLength, const BMultipoleField &field, double scale) |
virtual void | applySBendBody (double length, double refLength, double h, const BMultipoleField &field, double scale) |
virtual void | applyThinMultipole (const BMultipoleField &field, double factor) |
Thin multipole kick. More... | |
virtual void | applyThinSBend (const BMultipoleField &field, double scale, double h) |
Thin SBend kick. More... | |
virtual void | applyTransform (const Euclid3D &, double refLength) |
Apply transform. More... | |
![]() | |
void | applyDrift (double length) |
Apply drift length. More... | |
void | applyEntranceFringe (double edge, const BMultipoleField &field, double scale) |
Transforms fringing fields. More... | |
void | applyExitFringe (double edge, const BMultipoleField &field, double scale) |
void | applyLinearMap (double length, double refLength, double h, const FTps< double, 2 > &Fx, const FTps< double, 2 > &Fy) |
Apply linear map, defined by the linear expansions Fx and Fy. More... | |
void | applyMultipoleBody (double length, double refLength, const BMultipoleField &field, double scale) |
Apply body of SBend. More... | |
void | applySBendBody (double length, double refLength, double h, const BMultipoleField &field, double scale) |
Apply thin multipole kick (integrated over length) to all particles. More... | |
void | applyThinMultipole (const BMultipoleField &field, double factor) |
Thin multipole kick. More... | |
void | applyTransform (const Euclid3D &, double refLength) |
Apply transform. More... | |
FTps< double, 2 > | buildSBendVectorPotential (const BMultipoleField &, double h) |
Construct the vector potential for a SBend. More... | |
![]() | |
FTps< double, 6 > | buildMultipoleVectorPotential (const BMultipoleField &) |
Construct the vector potential for a Multipole. More... | |
FTps< double, 6 > | buildSBendVectorPotential (const BMultipoleField &, double h) |
Construct the vector potential for an SBend. More... | |
Private Member Functions | |
IdealMapper () | |
IdealMapper (const IdealMapper &) | |
void | operator= (const IdealMapper &) |
void | applyLinearMap (double length, double kx, double ks, double ky) |
Apply linear map, defined by the linear coefficients. More... | |
Static Private Member Functions | |
static void | makeFocus (double k, double L, double &c, double &s) |
Helper function for finding first-order coefficients. More... | |
Additional Inherited Members | |
![]() | |
enum | { X, PX, Y, PY, T, PT } |
![]() | |
LinearMap< double, 6 > | itsMap |
![]() | |
const PartData | itsReference |
The reference information. More... | |
![]() | |
const Beamline & | itsLine |
bool | back_beam |
bool | back_track |
bool | back_path |
double | flip_B |
double | flip_s |
Build a map using the linear map around the design orbit for each element.
Definition at line 69 of file IdealMapper.h.
IdealMapper::IdealMapper | ( | const Beamline & | beamline, |
const PartData & | reference, | ||
bool | revBeam, | ||
bool | revTrack | ||
) |
Constructor.
Definition at line 47 of file IdealMapper.cpp.
|
virtual |
Definition at line 53 of file IdealMapper.cpp.
|
private |
|
private |
|
private |
|
protectedvirtual |
Definition at line 186 of file IdealMapper.cpp.
References BMultipoleField::normal(), and BMultipoleField::skew().
|
protectedvirtual |
Definition at line 195 of file IdealMapper.cpp.
References BMultipoleField::normal(), and BMultipoleField::skew().
|
protectedvirtual |
Thin multipole kick.
Definition at line 205 of file IdealMapper.cpp.
References BMultipoleField::normal(), BMultipoleField::order(), PX, PY, BMultipoleField::skew(), X, and Y.
|
protectedvirtual |
Thin SBend kick.
Definition at line 216 of file IdealMapper.cpp.
References BMultipoleField::normal(), PX, PY, BMultipoleField::skew(), X, and Y.
|
protectedvirtual |
Apply transform.
Definition at line 225 of file IdealMapper.cpp.
References LinearMapper::applyDrift(), Euclid3D::getZ(), LinearMapper::itsMap, Euclid3D::M(), AbstractMapper::PX, and AbstractMapper::PY.
|
virtual |
Return the linear part of the accumulated map.
Definition at line 57 of file IdealMapper.cpp.
References LinearMapper::itsMap, and LinearMap< T, N >::linearTerms().
Referenced by CorrectionBase::setupTables().
|
staticprivate |
Helper function for finding first-order coefficients.
Definition at line 114 of file IdealMapper.cpp.
References abs(), cos(), cosh(), Physics::e, sin(), sinh(), and sqrt().
|
private |
|
virtual |
Reset the linear part of the accumulated map for restart.
Definition at line 62 of file IdealMapper.cpp.
References LinearMapper::itsMap.
|
virtual |
Apply the algorithm to an offset beamline object wrapper.
Reimplemented from LinearMapper.
Definition at line 84 of file IdealMapper.cpp.
References ElementBase::accept(), and AlignWrapper::getElement().
|
virtual |
Apply the algorithm to a Corrector.
Reimplemented from LinearMapper.
Definition at line 67 of file IdealMapper.cpp.
References LinearMapper::applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().
Referenced by visitCorrectorWrapper().
|
virtual |
Apply the algorithm to an corrector wrapper..
Reimplemented from DefaultVisitor.
Definition at line 90 of file IdealMapper.cpp.
References CorrectorWrapper::getDesign(), and visitCorrector().
|
virtual |
Apply the algorithm to an multipole wrapper..
Reimplemented from DefaultVisitor.
Definition at line 96 of file IdealMapper.cpp.
References MultipoleWrapper::getDesign(), and LinearMapper::visitMultipole().
|
virtual |
Apply the algorithm to a patch.
Reimplemented from LinearMapper.
Definition at line 73 of file IdealMapper.cpp.
|
virtual |
Apply the algorithm to an RBend wrapper..
Reimplemented from DefaultVisitor.
Definition at line 102 of file IdealMapper.cpp.
References RBendWrapper::getDesign(), and LinearMapper::visitRBend().
|
virtual |
Apply the algorithm to an SBend wrapper..
Reimplemented from DefaultVisitor.
Definition at line 108 of file IdealMapper.cpp.
References SBendWrapper::getDesign(), and LinearMapper::visitSBend().
|
virtual |
Apply the algorithm to a Separator.
Reimplemented from LinearMapper.
Definition at line 78 of file IdealMapper.cpp.
References LinearMapper::applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().