OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
|
Build a Lie-algebraic map using a finite-length lens for each elements. More...
#include <LieMapper.h>
Public Member Functions | |
LieMapper (const Beamline &bl, const PartData &data, bool backBeam, bool backTrack, int order) | |
Constructor. More... | |
virtual | ~LieMapper () |
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 accumulated map. More... | |
virtual void | getMap (DragtFinnMap< 3 > &) 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 accumulated map for restart. More... | |
virtual void | setMap (const DragtFinnMap< 3 > &) |
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 BeamStripping. More... | |
virtual void | visitCCollimator (const CCollimator &) |
Apply the algorithm to a Collimator. More... | |
virtual void | visitComponent (const Component &) |
Apply the algorithm to a Component. More... | |
virtual void | visitCorrector (const Corrector &) |
Apply the algorithm to a Corrector. More... | |
virtual void | visitDegrader (const Degrader &) |
Apply the algorithm to a Degrader. 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 | visitPatch (const Patch &) |
Apply the algorithm to a Patch. More... | |
virtual void | visitProbe (const Probe &) |
Apply the algorithm to a Probe. More... | |
virtual void | visitRBend (const RBend &) |
Apply the algorithm to a RBend. 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 | visitSeparator (const Separator &) |
Apply the algorithm to a Separator. 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... | |
![]() | |
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 | visitAlignWrapper (const AlignWrapper &) |
Apply the algorithm to an align wrapper.. More... | |
virtual void | visitCorrectorWrapper (const CorrectorWrapper &) |
Apply the algorithm to an corrector wrapper.. More... | |
virtual void | visitCyclotronWrapper (const CyclotronWrapper &) |
Apply the algorithm to an cyclotron 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... | |
virtual void | visitIntegrator (const Integrator &) |
Apply the algorithm to a generic integrator. More... | |
virtual void | visitMapIntegrator (const MapIntegrator &) |
Apply the algorithm to an integrator capable of mapping. More... | |
virtual void | visitTrackIntegrator (const TrackIntegrator &) |
Apply the algorithm to an integrator capable of tracking. More... | |
![]() | |
BeamlineVisitor () | |
virtual | ~BeamlineVisitor () |
Private Member Functions | |
LieMapper () | |
LieMapper (const LieMapper &) | |
void | operator= (const LieMapper &) |
void | applyDrift (double length) |
void | applyEntranceFringe (double edge, double curve, const BMultipoleField &field, double scale) |
void | applyExitFringe (double edge, double curve, const BMultipoleField &field, double scale) |
virtual void | applyTransform (const Euclid3D &, double refLength=0.0) |
Apply transform. More... | |
Private Attributes | |
DragtFinnMap< 3 > | itsMap |
int | itsOrder |
Additional Inherited Members | |
![]() | |
enum | { X, PX, Y, PY, T, PT } |
![]() | |
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... | |
![]() | |
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 Lie-algebraic map using a finite-length lens for each elements.
Definition at line 60 of file LieMapper.h.
LieMapper::LieMapper | ( | const Beamline & | bl, |
const PartData & | data, | ||
bool | backBeam, | ||
bool | backTrack, | ||
int | order | ||
) |
Constructor.
Definition at line 66 of file LieMapper.cpp.
|
virtual |
Definition at line 73 of file LieMapper.cpp.
|
private |
|
private |
|
private |
Definition at line 444 of file LieMapper.cpp.
References DragtFinnMap< N >::catenate(), DragtFinnMap< N >::factorSimple(), FTps< T, N >::filter(), PartData::getM(), PartData::getP(), itsMap, itsOrder, AbstractMapper::itsReference, FTps< double, 6 >::makeVariable(), AbstractMapper::PT, AbstractMapper::PX, AbstractMapper::PY, and sqrt().
Referenced by visitCCollimator(), visitDegrader(), visitDiagnostic(), visitDrift(), visitFlexibleCollimator(), visitLambertson(), visitMonitor(), visitRFCavity(), visitRFQuadrupole(), visitSeptum(), and visitSolenoid().
|
private |
Definition at line 464 of file LieMapper.cpp.
Referenced by visitMultipole(), visitRBend(), and visitSBend().
|
private |
Definition at line 474 of file LieMapper.cpp.
Referenced by visitMultipole(), visitRBend(), and visitSBend().
|
privatevirtual |
Apply transform.
Definition at line 484 of file LieMapper.cpp.
References DragtFinnMap< N >::assign(), DragtFinnMap< N >::catenate(), PartData::getM(), PartData::getP(), Euclid3D::getX(), Euclid3D::getY(), Euclid3D::getZ(), Euclid3D::isIdentity(), itsMap, AbstractMapper::itsReference, and Euclid3D::M().
Referenced by visitPatch(), visitRBend(), and visitSBend().
|
virtual |
Return the linear part of the accumulated map.
Implements AbstractMapper.
Definition at line 77 of file LieMapper.cpp.
References itsMap.
|
virtual |
Return the accumulated map.
Implements AbstractMapper.
Definition at line 82 of file LieMapper.cpp.
References itsMap.
|
virtual |
Return the full map accumulated so far.
Definition at line 87 of file LieMapper.cpp.
References itsMap.
|
private |
|
virtual |
Reset the linear part of the accumulated map for restart.
Implements AbstractMapper.
Definition at line 92 of file LieMapper.cpp.
References itsMap.
|
virtual |
Reset the accumulated map for restart.
Implements AbstractMapper.
Definition at line 97 of file LieMapper.cpp.
References itsMap.
|
virtual |
|
virtual |
Apply the algorithm to a BeamBeam.
Reimplemented from DefaultVisitor.
Definition at line 107 of file LieMapper.cpp.
|
virtual |
Apply the algorithm to a BeamStripping.
Reimplemented from DefaultVisitor.
Definition at line 111 of file LieMapper.cpp.
|
virtual |
Apply the algorithm to a Collimator.
Reimplemented from DefaultVisitor.
Definition at line 115 of file LieMapper.cpp.
References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().
|
virtual |
Apply the algorithm to a Component.
Reimplemented from DefaultVisitor.
Definition at line 120 of file LieMapper.cpp.
|
virtual |
Apply the algorithm to a Corrector.
Reimplemented from DefaultVisitor.
Definition at line 125 of file LieMapper.cpp.
References DragtFinnMap< N >::assign(), DragtFinnMap< N >::catenate(), DefaultVisitor::flip_s, BDipoleField::getBx(), BDipoleField::getBy(), ElementBase::getElementLength(), Corrector::getField(), PartData::getM(), DragtFinnMap< N >::getMatrix(), PartData::getP(), PartData::getQ(), itsMap, and AbstractMapper::itsReference.
|
virtual |
Apply the algorithm to a CyclotronValley.
Reimplemented from DefaultVisitor.
Definition at line 306 of file LieMapper.cpp.
|
virtual |
Apply the algorithm to a Degrader.
Reimplemented from DefaultVisitor.
Definition at line 149 of file LieMapper.cpp.
References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().
|
virtual |
Apply the algorithm to a Diagnostic.
Reimplemented from DefaultVisitor.
Definition at line 154 of file LieMapper.cpp.
References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().
|
virtual |
Apply the algorithm to a Drift.
Reimplemented from DefaultVisitor.
Definition at line 160 of file LieMapper.cpp.
References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().
|
virtual |
Apply the algorithm to a flexible collimator.
Reimplemented from DefaultVisitor.
Definition at line 164 of file LieMapper.cpp.
References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().
|
virtual |
Apply the algorithm to a Lambertson.
Reimplemented from DefaultVisitor.
Definition at line 168 of file LieMapper.cpp.
References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().
|
virtual |
Apply the algorithm to a Marker.
Reimplemented from DefaultVisitor.
Definition at line 174 of file LieMapper.cpp.
|
virtual |
Apply the algorithm to a Monitor.
Reimplemented from DefaultVisitor.
Definition at line 179 of file LieMapper.cpp.
References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().
|
virtual |
Apply the algorithm to a Multipole.
Reimplemented from DefaultVisitor.
Definition at line 184 of file LieMapper.cpp.
References applyEntranceFringe(), applyExitFringe(), AbstractMapper::buildMultipoleVectorPotential(), Physics::c, DragtFinnMap< N >::catenate(), DragtFinnMap< N >::factorSimple(), DefaultVisitor::flip_B, DefaultVisitor::flip_s, PartData::getBeta(), ElementBase::getElementLength(), Multipole::getField(), PartData::getM(), PartData::getP(), PartData::getQ(), itsMap, AbstractMapper::itsReference, FTps< double, 6 >::makeVariable(), AbstractMapper::PT, AbstractMapper::PX, AbstractMapper::PY, and sqrt().
|
virtual |
Apply the algorithm to a ParallelPlate.
Reimplemented from DefaultVisitor.
Definition at line 302 of file LieMapper.cpp.
|
virtual |
Apply the algorithm to a Patch.
Reimplemented from DefaultVisitor.
Definition at line 222 of file LieMapper.cpp.
References applyTransform(), and Patch::getPatch().
|
virtual |
Apply the algorithm to a Probe.
Reimplemented from DefaultVisitor.
Definition at line 226 of file LieMapper.cpp.
|
virtual |
Apply the algorithm to a RBend.
Reimplemented from DefaultVisitor.
Definition at line 231 of file LieMapper.cpp.
References applyEntranceFringe(), applyExitFringe(), applyTransform(), DefaultVisitor::back_path, AbstractMapper::buildMultipoleVectorPotential(), Physics::c, DragtFinnMap< N >::catenate(), DragtFinnMap< N >::factorSimple(), DefaultVisitor::flip_B, DefaultVisitor::flip_s, RBendGeometry::getBendAngle(), PartData::getBeta(), RBendGeometry::getElementLength(), RBendGeometry::getEntrancePatch(), RBend::getEntryFaceRotation(), RBend::getExitFaceRotation(), RBendGeometry::getExitPatch(), RBend::getField(), RBend::getGeometry(), PartData::getM(), PartData::getP(), PartData::getQ(), Inverse(), itsMap, AbstractMapper::itsReference, FTps< double, 6 >::makeVariable(), AbstractMapper::PT, AbstractMapper::PX, AbstractMapper::PY, sqrt(), and Euclid3D::YRotation().
|
virtual |
Apply the algorithm to a RFCavity.
Reimplemented from DefaultVisitor.
Definition at line 310 of file LieMapper.cpp.
References applyDrift(), Physics::c, DragtFinnMap< N >::catenate(), cos(), DragtFinnMap< N >::factorSimple(), DefaultVisitor::flip_s, RFCavity::getAmplitude(), RFCavity::getElementLength(), RFCavity::getFrequency(), PartData::getP(), RFCavity::getPhase(), itsMap, AbstractMapper::itsReference, FTps< double, 6 >::makeVariable(), and AbstractMapper::T.
|
virtual |
Apply the algorithm to a RFQuadrupole.
Reimplemented from DefaultVisitor.
Definition at line 332 of file LieMapper.cpp.
References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().
|
virtual |
Apply the algorithm to a SBend.
Reimplemented from DefaultVisitor.
Definition at line 338 of file LieMapper.cpp.
References applyEntranceFringe(), applyExitFringe(), applyTransform(), AbstractMapper::buildSBendVectorPotential(), Physics::c, DragtFinnMap< N >::catenate(), DragtFinnMap< N >::factorSimple(), DefaultVisitor::flip_B, DefaultVisitor::flip_s, PlanarArcGeometry::getBendAngle(), PartData::getBeta(), PlanarArcGeometry::getCurvature(), PlanarArcGeometry::getElementLength(), SBend::getEntryFaceCurvature(), SBend::getEntryFaceRotation(), SBend::getExitFaceCurvature(), SBend::getExitFaceRotation(), SBend::getField(), SBend::getGeometry(), PartData::getM(), PartData::getP(), PartData::getQ(), itsMap, AbstractMapper::itsReference, FTps< double, 6 >::makeVariable(), AbstractMapper::PT, AbstractMapper::PX, AbstractMapper::PY, sqrt(), AbstractMapper::X, and Euclid3D::YRotation().
|
virtual |
Apply the algorithm to a Separator.
Reimplemented from DefaultVisitor.
Definition at line 392 of file LieMapper.cpp.
References DragtFinnMap< N >::assign(), DragtFinnMap< N >::catenate(), DefaultVisitor::flip_s, ElementBase::getElementLength(), Separator::getEx(), Separator::getEy(), PartData::getM(), DragtFinnMap< N >::getMatrix(), PartData::getP(), PartData::getQ(), itsMap, and AbstractMapper::itsReference.
|
virtual |
Apply the algorithm to a Septum.
Reimplemented from DefaultVisitor.
Definition at line 415 of file LieMapper.cpp.
References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().
|
virtual |
Apply the algorithm to a Solenoid.
Reimplemented from DefaultVisitor.
Definition at line 421 of file LieMapper.cpp.
References applyDrift(), Physics::c, DragtFinnMap< N >::catenate(), DragtFinnMap< N >::factorSimple(), DefaultVisitor::flip_B, DefaultVisitor::flip_s, Solenoid::getBz(), Solenoid::getElementLength(), PartData::getM(), PartData::getP(), PartData::getQ(), itsMap, AbstractMapper::itsReference, FTps< double, 6 >::makeVariable(), AbstractMapper::PT, AbstractMapper::PX, AbstractMapper::PY, and sqrt().
|
private |
Definition at line 188 of file LieMapper.h.
Referenced by applyDrift(), applyTransform(), getMap(), setMap(), visitCorrector(), visitMultipole(), visitRBend(), visitRFCavity(), visitSBend(), visitSeparator(), and visitSolenoid().
|
private |
Definition at line 191 of file LieMapper.h.
Referenced by applyDrift().