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

Build a map using the linear map around the design orbit for each element. More...

#include <IdealMapper.h>

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

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...
 
- Public Member Functions inherited from LinearMapper
 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...
 
- 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 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...
 
- Public Member Functions inherited from BeamlineVisitor
 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...
 
- Protected Member Functions inherited from LinearMapper
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...
 
- 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...
 

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

- Public Types inherited from AbstractMapper
enum  {
  X, PX, Y, PY,
  T, PT
}
 
- Protected Attributes inherited from LinearMapper
LinearMap< double, 6 > itsMap
 
- 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 the linear map around the design orbit for each element.

Definition at line 69 of file IdealMapper.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 47 of file IdealMapper.cpp.

IdealMapper::~IdealMapper ( )
virtual

Definition at line 53 of file IdealMapper.cpp.

IdealMapper::IdealMapper ( )
private
IdealMapper::IdealMapper ( const IdealMapper )
private

Member Function Documentation

void IdealMapper::applyLinearMap ( double  length,
double  kx,
double  ks,
double  ky 
)
private

Apply linear map, defined by the linear coefficients.

Definition at line 132 of file IdealMapper.cpp.

References PX, PY, sqrt(), X, and Y.

Here is the call graph for this function:

void IdealMapper::applyMultipoleBody ( double  length,
double  refLength,
const BMultipoleField field,
double  scale 
)
protectedvirtual

Definition at line 186 of file IdealMapper.cpp.

References BMultipoleField::normal(), and BMultipoleField::skew().

Here is the call graph for this function:

void IdealMapper::applySBendBody ( double  length,
double  refLength,
double  h,
const BMultipoleField field,
double  scale 
)
protectedvirtual

Definition at line 195 of file IdealMapper.cpp.

References BMultipoleField::normal(), and BMultipoleField::skew().

Here is the call graph for this function:

void IdealMapper::applyThinMultipole ( const BMultipoleField field,
double  factor 
)
protectedvirtual

Thin multipole kick.

Definition at line 205 of file IdealMapper.cpp.

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

Here is the call graph for this function:

void IdealMapper::applyThinSBend ( const BMultipoleField field,
double  scale,
double  h 
)
protectedvirtual

Thin SBend kick.

Definition at line 216 of file IdealMapper.cpp.

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

Here is the call graph for this function:

void IdealMapper::applyTransform ( const Euclid3D euclid,
double  refLength 
)
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.

Here is the call graph for this function:

void IdealMapper::getMatrix ( FMatrix< double, 6, 6 > &  matrix) const
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().

Here is the call graph for this function:

void IdealMapper::makeFocus ( double  k,
double  L,
double &  c,
double &  s 
)
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().

Here is the call graph for this function:

void IdealMapper::operator= ( const IdealMapper )
private
void IdealMapper::setMatrix ( const FMatrix< double, 6, 6 > &  matrix)
virtual

Reset the linear part of the accumulated map for restart.

Definition at line 62 of file IdealMapper.cpp.

References LinearMapper::itsMap.

void IdealMapper::visitAlignWrapper ( const AlignWrapper wrap)
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().

Here is the call graph for this function:

void IdealMapper::visitCorrector ( const Corrector corr)
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().

Here is the call graph for this function:

void IdealMapper::visitCorrectorWrapper ( const CorrectorWrapper wrap)
virtual

Apply the algorithm to an corrector wrapper..

Reimplemented from DefaultVisitor.

Definition at line 90 of file IdealMapper.cpp.

References CorrectorWrapper::getDesign(), and visitCorrector().

Here is the call graph for this function:

void IdealMapper::visitMultipoleWrapper ( const MultipoleWrapper wrap)
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().

Here is the call graph for this function:

void IdealMapper::visitPatch ( const Patch pat)
virtual

Apply the algorithm to a patch.

Reimplemented from LinearMapper.

Definition at line 73 of file IdealMapper.cpp.

void IdealMapper::visitRBendWrapper ( const RBendWrapper wrap)
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().

Here is the call graph for this function:

void IdealMapper::visitSBendWrapper ( const SBendWrapper wrap)
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().

Here is the call graph for this function:

void IdealMapper::visitSeparator ( const Separator sep)
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().

Here is the call graph for this function:


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