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

#include <OpalBeamline.h>

Collaboration diagram for OpalBeamline:
Collaboration graph
[legend]

Public Member Functions

 OpalBeamline ()
 
 OpalBeamline (const Vector_t &origin, const Quaternion &rotation)
 
 ~OpalBeamline ()
 
void activateElements ()
 
std::set< std::shared_ptr
< Component > > 
getElements (const Vector_t &x)
 
Vector_t transformTo (const Vector_t &r) const
 
Vector_t transformFrom (const Vector_t &r) const
 
Vector_t rotateTo (const Vector_t &r) const
 
Vector_t rotateFrom (const Vector_t &r) const
 
Vector_t transformToLocalCS (const std::shared_ptr< Component > &comp, const Vector_t &r) const
 
Vector_t transformFromLocalCS (const std::shared_ptr< Component > &comp, const Vector_t &r) const
 
Vector_t rotateToLocalCS (const std::shared_ptr< Component > &comp, const Vector_t &r) const
 
Vector_t rotateFromLocalCS (const std::shared_ptr< Component > &comp, const Vector_t &r) const
 
CoordinateSystemTrafo getCSTrafoLab2Local (const std::shared_ptr< Component > &comp) const
 
CoordinateSystemTrafo getCSTrafoLab2Local () const
 
CoordinateSystemTrafo getMisalignment (const std::shared_ptr< Component > &comp) const
 
double getStart (const Vector_t &) const
 
double getEnd (const Vector_t &) const
 
void switchElements (const double &, const double &, const double &kineticEnergy, const bool &nomonitors=false)
 
void switchElementsOff ()
 
ParticleMatterInteractionHandlergetParticleMatterInteractionHandler (const unsigned int &)
 
BoundaryGeometrygetBoundaryGeometry (const unsigned int &)
 
unsigned long getFieldAt (const unsigned int &, const Vector_t &, const long &, const double &, Vector_t &, Vector_t &)
 
unsigned long getFieldAt (const Vector_t &, const Vector_t &, const double &, Vector_t &, Vector_t &)
 
template<class T >
void visit (const T &, BeamlineVisitor &, PartBunchBase< double, 3 > *)
 
void prepareSections ()
 
void positionElementRelative (std::shared_ptr< ElementBase >)
 
void compute3DLattice ()
 
void save3DLattice ()
 
void save3DInput ()
 
void print (Inform &) const
 
FieldList getElementByType (ElementType)
 
void swap (OpalBeamline &rhs)
 
void merge (OpalBeamline &rhs)
 
bool containsSource ()
 
template<>
void visit (const Source &element, BeamlineVisitor &, PartBunchBase< double, 3 > *bunch)
 
template<>
void visit (const Marker &, BeamlineVisitor &, PartBunchBase< double, 3 > *)
 
template<>
void visit (const Septum &element, BeamlineVisitor &, PartBunchBase< double, 3 > *)
 

Private Attributes

FieldList elements_m
 
bool prepared_m
 
bool containsSource_m
 
CoordinateSystemTrafo coordTransformationTo_m
 

Detailed Description

Definition at line 40 of file OpalBeamline.h.

Constructor & Destructor Documentation

OpalBeamline::OpalBeamline ( )

Definition at line 31 of file OpalBeamline.cpp.

OpalBeamline::OpalBeamline ( const Vector_t origin,
const Quaternion rotation 
)

Definition at line 38 of file OpalBeamline.cpp.

OpalBeamline::~OpalBeamline ( )

Definition at line 47 of file OpalBeamline.cpp.

References elements_m.

Member Function Documentation

void OpalBeamline::activateElements ( )

Definition at line 594 of file OpalBeamline.cpp.

References elements_m, end, Units::eV2MeV, BendBase::getDesignEnergy(), it, RBEND, and SBEND.

Referenced by ParallelTTracker::execute().

Here is the call graph for this function:

void OpalBeamline::compute3DLattice ( )
bool OpalBeamline::containsSource ( )
inline

Definition at line 205 of file OpalBeamline.h.

References containsSource_m.

Referenced by ParallelTTracker::execute(), and ParallelTTracker::findStartPosition().

BoundaryGeometry* OpalBeamline::getBoundaryGeometry ( const unsigned int &  )
CoordinateSystemTrafo OpalBeamline::getCSTrafoLab2Local ( const std::shared_ptr< Component > &  comp) const
inline
CoordinateSystemTrafo OpalBeamline::getCSTrafoLab2Local ( ) const
inline

Definition at line 195 of file OpalBeamline.h.

References coordTransformationTo_m.

FieldList OpalBeamline::getElementByType ( ElementType  type)
std::set< std::shared_ptr< Component > > OpalBeamline::getElements ( const Vector_t x)
double OpalBeamline::getEnd ( const Vector_t ) const
unsigned long OpalBeamline::getFieldAt ( const unsigned int &  ,
const Vector_t ,
const long &  ,
const double &  ,
Vector_t ,
Vector_t  
)
unsigned long OpalBeamline::getFieldAt ( const Vector_t position,
const Vector_t momentum,
const double &  t,
Vector_t Ef,
Vector_t Bf 
)

Definition at line 74 of file OpalBeamline.cpp.

References CCOLLIMATOR, end, getElements(), it, MARKER, MONITOR, rotateFromLocalCS(), rotateToLocalCS(), transformToLocalCS(), and type.

Here is the call graph for this function:

CoordinateSystemTrafo OpalBeamline::getMisalignment ( const std::shared_ptr< Component > &  comp) const
inline

Definition at line 200 of file OpalBeamline.h.

Referenced by ParallelTTracker::computeExternalFields().

ParticleMatterInteractionHandler* OpalBeamline::getParticleMatterInteractionHandler ( const unsigned int &  )
double OpalBeamline::getStart ( const Vector_t ) const
void OpalBeamline::merge ( OpalBeamline rhs)

Definition at line 169 of file OpalBeamline.cpp.

References containsSource_m, elements_m, and prepared_m.

void OpalBeamline::positionElementRelative ( std::shared_ptr< ElementBase element)

Definition at line 192 of file OpalBeamline.cpp.

References coordTransformationTo_m.

Referenced by visit().

void OpalBeamline::prepareSections ( )
void OpalBeamline::print ( Inform ) const

Definition at line 160 of file OpalBeamline.cpp.

Vector_t OpalBeamline::rotateFrom ( const Vector_t r) const
inline

Definition at line 161 of file OpalBeamline.h.

References coordTransformationTo_m, and CoordinateSystemTrafo::rotateFrom().

Here is the call graph for this function:

Vector_t OpalBeamline::rotateFromLocalCS ( const std::shared_ptr< Component > &  comp,
const Vector_t r 
) const
inline

Definition at line 184 of file OpalBeamline.h.

Referenced by getFieldAt(), and OrbitThreader::integrate().

Vector_t OpalBeamline::rotateTo ( const Vector_t r) const
inline

Definition at line 156 of file OpalBeamline.h.

References coordTransformationTo_m, and CoordinateSystemTrafo::rotateTo().

Here is the call graph for this function:

Vector_t OpalBeamline::rotateToLocalCS ( const std::shared_ptr< Component > &  comp,
const Vector_t r 
) const
inline
void OpalBeamline::save3DInput ( )
void OpalBeamline::save3DLattice ( )
void OpalBeamline::swap ( OpalBeamline rhs)
void OpalBeamline::switchElements ( const double &  min,
const double &  max,
const double &  kineticEnergy,
const bool &  nomonitors = false 
)

Definition at line 112 of file OpalBeamline.cpp.

References DEGRADER, elements_m, min(), and MONITOR.

Here is the call graph for this function:

void OpalBeamline::switchElementsOff ( )

Definition at line 146 of file OpalBeamline.cpp.

References elements_m.

Referenced by ParallelTTracker::execute().

Vector_t OpalBeamline::transformFrom ( const Vector_t r) const
inline

Definition at line 151 of file OpalBeamline.h.

References coordTransformationTo_m, and CoordinateSystemTrafo::transformFrom().

Here is the call graph for this function:

Vector_t OpalBeamline::transformFromLocalCS ( const std::shared_ptr< Component > &  comp,
const Vector_t r 
) const
inline

Definition at line 172 of file OpalBeamline.h.

Vector_t OpalBeamline::transformTo ( const Vector_t r) const
inline

Definition at line 146 of file OpalBeamline.h.

References coordTransformationTo_m, and CoordinateSystemTrafo::transformTo().

Here is the call graph for this function:

Vector_t OpalBeamline::transformToLocalCS ( const std::shared_ptr< Component > &  comp,
const Vector_t r 
) const
inline
template<class T >
void OpalBeamline::visit ( const T &  element,
BeamlineVisitor ,
PartBunchBase< double, 3 > *  bunch 
)
inline
template<>
void OpalBeamline::visit ( const Source element,
BeamlineVisitor ,
PartBunchBase< double, 3 > *  bunch 
)
inline

Definition at line 121 of file OpalBeamline.h.

template<>
void OpalBeamline::visit ( const Marker ,
BeamlineVisitor ,
PartBunchBase< double, 3 > *   
)
inline

Definition at line 137 of file OpalBeamline.h.

template<>
void OpalBeamline::visit ( const Septum element,
BeamlineVisitor ,
PartBunchBase< double, 3 > *   
)
inline

Definition at line 141 of file OpalBeamline.h.

References endl(), and WARNMSG.

Here is the call graph for this function:

Member Data Documentation

bool OpalBeamline::containsSource_m
private

Definition at line 99 of file OpalBeamline.h.

Referenced by containsSource(), and merge().

CoordinateSystemTrafo OpalBeamline::coordTransformationTo_m
private
FieldList OpalBeamline::elements_m
private
bool OpalBeamline::prepared_m
private

Definition at line 98 of file OpalBeamline.h.

Referenced by merge(), prepareSections(), and swap().


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