OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Member Functions | Private Member Functions | Private Attributes | List of all members
TransportMapper Class Reference

Build a map using a transport map for each elements. More...

#include <TransportMapper.h>

Inheritance diagram for TransportMapper:
Inheritance graph
[legend]
Collaboration diagram for TransportMapper:
Collaboration graph
[legend]

Public Member Functions

 TransportMapper (const Beamline &beamline, const PartData &, bool revBeam, bool revTrack)
 Constructor. More...
 
virtual ~TransportMapper ()
 
virtual void getMap (LinearMap< double, 6 > &) const
 Return the linear part of the accumulated map. More...
 
virtual void getMap (TransportMap< double, 6 > &) const
 Return the transport 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 TransportMap< double, 6 > &)
 Reset the transport 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 BeamStripping. 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 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 &pat)
 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...
 
virtual void visitAlignWrapper (const AlignWrapper &)
 Apply the algorithm to an offset beamline object wrapper. More...
 
virtual void visitMapIntegrator (const MapIntegrator &)
 Apply the algorithm to an integrator capable of mapping. More...
 
- Public Member Functions inherited from AbstractMapper
 AbstractMapper (const Beamline &bl, const PartData &data, bool revBeam, bool revTrack)
 Constructor. More...
 
virtual ~AbstractMapper ()
 
- Public Member Functions inherited from DefaultVisitor
 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 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 visitTrackIntegrator (const TrackIntegrator &)
 Apply the algorithm to an integrator capable of tracking. More...
 
- Public Member Functions inherited from BeamlineVisitor
 BeamlineVisitor ()
 
virtual ~BeamlineVisitor ()
 

Private Member Functions

 TransportMapper ()
 
 TransportMapper (const TransportMapper &)
 
void operator= (const TransportMapper &)
 
void applyDrift (double length)
 
void applyEntranceFringe (double edge, const BMultipoleField &field, double scale)
 
void applyExitFringe (double edge, const BMultipoleField &field, double scale)
 
void applyTransportMap (double length, double refLength, double h, const FTps< double, 2 > &Fx, const FTps< double, 2 > &Fy)
 
void applyMultipoleBody (double length, double refLength, const BMultipoleField &field, double scale)
 
void applySBendBody (double length, double refLength, double h, const BMultipoleField &field, double scale)
 
void applyThinMultipole (const BMultipoleField &field, double factor)
 Thin multipole kick. More...
 
void applyThinSBend (const BMultipoleField &field, double scale, double h)
 Thin SBend 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...
 

Private Attributes

TransportMap< double, 6 > itsMap
 

Additional Inherited Members

- Public Types inherited from AbstractMapper
enum  {
  X, PX, Y, PY,
  T, PT
}
 
- Protected Member Functions inherited from AbstractMapper
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...
 
- Protected Attributes inherited from AbstractMapper
const PartData itsReference
 The reference information. More...
 
- Protected Attributes inherited from DefaultVisitor
const BeamlineitsLine
 
bool back_beam
 
bool back_track
 
bool back_path
 
double flip_B
 
double flip_s
 

Detailed Description

Build a map using a transport map for each elements.

Definition at line 70 of file TransportMapper.h.

Constructor & Destructor Documentation

TransportMapper::TransportMapper ( const Beamline beamline,
const PartData reference,
bool  revBeam,
bool  revTrack 
)

Constructor.

Definition at line 66 of file TransportMapper.cpp.

TransportMapper::~TransportMapper ( )
virtual

Definition at line 73 of file TransportMapper.cpp.

TransportMapper::TransportMapper ( )
private
TransportMapper::TransportMapper ( const TransportMapper )
private

Member Function Documentation

void TransportMapper::applyDrift ( double  length)
private
void TransportMapper::applyEntranceFringe ( double  edge,
const BMultipoleField field,
double  scale 
)
private

Definition at line 475 of file TransportMapper.cpp.

References itsMap, BMultipoleField::normal(), AbstractMapper::PX, AbstractMapper::PY, tan(), AbstractMapper::X, and AbstractMapper::Y.

Referenced by visitRBend(), and visitSBend().

Here is the call graph for this function:

void TransportMapper::applyExitFringe ( double  edge,
const BMultipoleField field,
double  scale 
)
private

Definition at line 487 of file TransportMapper.cpp.

References itsMap, BMultipoleField::normal(), AbstractMapper::PX, AbstractMapper::PY, tan(), AbstractMapper::X, and AbstractMapper::Y.

Referenced by visitRBend(), and visitSBend().

Here is the call graph for this function:

void TransportMapper::applyMultipoleBody ( double  length,
double  refLength,
const BMultipoleField field,
double  scale 
)
private
void TransportMapper::applySBendBody ( double  length,
double  refLength,
double  h,
const BMultipoleField field,
double  scale 
)
private

Definition at line 625 of file TransportMapper.cpp.

References applyTransportMap(), buildSBendVectorPotential(), and FTps< T, N >::derivative().

Referenced by visitSBend().

Here is the call graph for this function:

void TransportMapper::applyThinMultipole ( const BMultipoleField field,
double  factor 
)
private

Thin multipole kick.

Definition at line 640 of file TransportMapper.cpp.

References itsMap, BMultipoleField::normal(), BMultipoleField::order(), AbstractMapper::PX, AbstractMapper::PY, BMultipoleField::skew(), AbstractMapper::X, and AbstractMapper::Y.

Referenced by visitMultipole(), visitRBend(), and visitSBend().

Here is the call graph for this function:

void TransportMapper::applyThinSBend ( const BMultipoleField field,
double  scale,
double  h 
)
private

Thin SBend kick.

Definition at line 663 of file TransportMapper.cpp.

References buildSBendVectorPotential(), FTps< T, N >::derivative(), itsMap, AbstractMapper::PX, AbstractMapper::PY, AbstractMapper::X, and AbstractMapper::Y.

Here is the call graph for this function:

void TransportMapper::applyTransform ( const Euclid3D euclid,
double  refLength 
)
private
void TransportMapper::applyTransportMap ( double  length,
double  refLength,
double  h,
const FTps< double, 2 > &  Fx,
const FTps< double, 2 > &  Fy 
)
private

Definition at line 500 of file TransportMapper.cpp.

References Hypervolume::hv(), PT, PX, PY, TransportFun< T, N >::setCoefficient(), sqrt(), T, X, and Y.

Referenced by applyMultipoleBody(), and applySBendBody().

Here is the call graph for this function:

Series2 TransportMapper::buildSBendVectorPotential ( const BMultipoleField field,
double  h 
)
private
void TransportMapper::getMap ( LinearMap< double, 6 > &  map) const
virtual

Return the linear part of the accumulated map.

Implements AbstractMapper.

Definition at line 77 of file TransportMapper.cpp.

References itsMap.

void TransportMapper::getMap ( TransportMap< double, 6 > &  map) const
virtual

Return the transport part of the accumulated map.

Definition at line 86 of file TransportMapper.cpp.

References itsMap.

void TransportMapper::getMap ( FVps< double, 6 > &  map) const
virtual

Return the full map accumulated so far.

Implements AbstractMapper.

Definition at line 91 of file TransportMapper.cpp.

References itsMap.

void TransportMapper::operator= ( const TransportMapper )
private
void TransportMapper::setMap ( const LinearMap< double, 6 > &  map)
virtual

Reset the linear part of the accumulated map for restart.

Implements AbstractMapper.

Definition at line 96 of file TransportMapper.cpp.

References itsMap.

void TransportMapper::setMap ( const TransportMap< double, 6 > &  map)
virtual

Reset the transport part of the accumulated map for restart.

Definition at line 109 of file TransportMapper.cpp.

References itsMap.

void TransportMapper::setMap ( const FVps< double, 6 > &  map)
virtual

Reset the full map for restart.

Implements AbstractMapper.

Definition at line 114 of file TransportMapper.cpp.

References itsMap.

void TransportMapper::visitAlignWrapper ( const AlignWrapper wrap)
virtual

Apply the algorithm to an offset beamline object wrapper.

Reimplemented from DefaultVisitor.

Definition at line 405 of file TransportMapper.cpp.

References ElementBase::accept(), applyTransform(), DefaultVisitor::back_path, AlignWrapper::getElement(), AlignWrapper::getEntranceTransform(), AlignWrapper::getExitTransform(), Inverse(), Euclid3D::isIdentity(), and AlignWrapper::offset().

Here is the call graph for this function:

void TransportMapper::visitBeamBeam ( const BeamBeam )
virtual

Apply the algorithm to a BeamBeam.

Reimplemented from DefaultVisitor.

Definition at line 119 of file TransportMapper.cpp.

void TransportMapper::visitBeamStripping ( const BeamStripping )
virtual

Apply the algorithm to a BeamStripping.

Reimplemented from DefaultVisitor.

Definition at line 123 of file TransportMapper.cpp.

void TransportMapper::visitCCollimator ( const CCollimator coll)
virtual

Apply the algorithm to a collimator.

Reimplemented from DefaultVisitor.

Definition at line 127 of file TransportMapper.cpp.

References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().

Here is the call graph for this function:

void TransportMapper::visitComponent ( const Component comp)
virtual

Apply the algorithm to an arbitrary component.

Reimplemented from DefaultVisitor.

Definition at line 132 of file TransportMapper.cpp.

References DefaultVisitor::back_beam, DefaultVisitor::back_track, itsMap, AbstractMapper::itsReference, and Component::trackMap().

Here is the call graph for this function:

void TransportMapper::visitCorrector ( const Corrector corr)
virtual
void TransportMapper::visitCyclotronValley ( const CyclotronValley cv)
virtual

Apply the algorithm to a CyclotronValley.

Reimplemented from DefaultVisitor.

Definition at line 401 of file TransportMapper.cpp.

void TransportMapper::visitDegrader ( const Degrader deg)
virtual

Apply the algorithm to a Degrader.

Reimplemented from DefaultVisitor.

Definition at line 154 of file TransportMapper.cpp.

References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().

Here is the call graph for this function:

void TransportMapper::visitDiagnostic ( const Diagnostic diag)
virtual

Apply the algorithm to a Diagnostic.

Reimplemented from DefaultVisitor.

Definition at line 158 of file TransportMapper.cpp.

References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().

Here is the call graph for this function:

void TransportMapper::visitDrift ( const Drift drift)
virtual

Apply the algorithm to a Drift.

Reimplemented from DefaultVisitor.

Definition at line 163 of file TransportMapper.cpp.

References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().

Here is the call graph for this function:

void TransportMapper::visitFlexibleCollimator ( const FlexibleCollimator coll)
virtual

Apply the algorithm to a flexible collimator.

Reimplemented from DefaultVisitor.

Definition at line 167 of file TransportMapper.cpp.

References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().

Here is the call graph for this function:

void TransportMapper::visitLambertson ( const Lambertson lamb)
virtual

Apply the algorithm to a Lambertson.

Reimplemented from DefaultVisitor.

Definition at line 171 of file TransportMapper.cpp.

References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().

Here is the call graph for this function:

void TransportMapper::visitMapIntegrator ( const MapIntegrator i)
virtual

Apply the algorithm to an integrator capable of mapping.

Reimplemented from DefaultVisitor.

Definition at line 427 of file TransportMapper.cpp.

References DefaultVisitor::back_beam, DefaultVisitor::back_track, itsMap, AbstractMapper::itsReference, and MapIntegrator::trackMap().

Here is the call graph for this function:

void TransportMapper::visitMarker ( const Marker marker)
virtual

Apply the algorithm to a Marker.

Reimplemented from DefaultVisitor.

Definition at line 177 of file TransportMapper.cpp.

void TransportMapper::visitMonitor ( const Monitor corr)
virtual

Apply the algorithm to a Monitor.

Reimplemented from DefaultVisitor.

Definition at line 182 of file TransportMapper.cpp.

References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().

Here is the call graph for this function:

void TransportMapper::visitMultipole ( const Multipole multipole)
virtual
void TransportMapper::visitParallelPlate ( const ParallelPlate pplate)
virtual

Apply the algorithm to a ParallelPlate.

Reimplemented from DefaultVisitor.

Definition at line 397 of file TransportMapper.cpp.

void TransportMapper::visitPatch ( const Patch pat)
virtual

Apply the algorithm to a patch.

Reimplemented from DefaultVisitor.

Definition at line 203 of file TransportMapper.cpp.

References applyTransform(), DefaultVisitor::back_path, Patch::getPatch(), and Inverse().

Here is the call graph for this function:

void TransportMapper::visitProbe ( const Probe prob)
virtual

Apply the algorithm to a probe.

Reimplemented from DefaultVisitor.

Definition at line 208 of file TransportMapper.cpp.

void TransportMapper::visitRBend ( const RBend bend)
virtual
void TransportMapper::visitRFCavity ( const RFCavity as)
virtual
void TransportMapper::visitRFQuadrupole ( const RFQuadrupole rfq)
virtual

Apply the algorithm to a RFQuadrupole.

Reimplemented from DefaultVisitor.

Definition at line 285 of file TransportMapper.cpp.

References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().

Here is the call graph for this function:

void TransportMapper::visitSBend ( const SBend bend)
virtual
void TransportMapper::visitSeparator ( const Separator sep)
virtual
void TransportMapper::visitSeptum ( const Septum sept)
virtual

Apply the algorithm to a Septum.

Reimplemented from DefaultVisitor.

Definition at line 354 of file TransportMapper.cpp.

References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().

Here is the call graph for this function:

void TransportMapper::visitSolenoid ( const Solenoid solenoid)
virtual

Member Data Documentation

TransportMap<double, 6> TransportMapper::itsMap
private

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