OPALX (Object Oriented Parallel Accelerator Library for Exascal) MINIorX
OPALX
OpalBeamline Class Reference

#include <OpalBeamline.h>

Collaboration diagram for OpalBeamline:

Public Member Functions

 OpalBeamline ()
 OpalBeamline (const Vector_t< double, 3 > &origin, const Quaternion &rotation)
 ~OpalBeamline ()
void activateElements ()
std::set< std::shared_ptr< Component > > getElements (const Vector_t< double, 3 > &x)
Vector_t< double, 3 > transformTo (const Vector_t< double, 3 > &r) const
Vector_t< double, 3 > transformFrom (const Vector_t< double, 3 > &r) const
Vector_t< double, 3 > rotateTo (const Vector_t< double, 3 > &r) const
Vector_t< double, 3 > rotateFrom (const Vector_t< double, 3 > &r) const
Vector_t< double, 3 > transformToLocalCS (const std::shared_ptr< Component > &comp, const Vector_t< double, 3 > &r) const
Vector_t< double, 3 > transformFromLocalCS (const std::shared_ptr< Component > &comp, const Vector_t< double, 3 > &r) const
Vector_t< double, 3 > rotateToLocalCS (const std::shared_ptr< Component > &comp, const Vector_t< double, 3 > &r) const
Vector_t< double, 3 > rotateFromLocalCS (const std::shared_ptr< Component > &comp, const Vector_t< double, 3 > &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< double, 3 > &) const
double getEnd (const Vector_t< double, 3 > &) const
void switchElements (const double &, const double &, const double &kineticEnergy, const bool &nomonitors=false)
void switchElementsOff ()
ParticleMatterInteractionHandler * getParticleMatterInteractionHandler (const unsigned int &)
BoundaryGeometrygetBoundaryGeometry (const unsigned int &)
unsigned long getFieldAt (const unsigned int &, const Vector_t< double, 3 > &, const long &, const double &, Vector_t< double, 3 > &, Vector_t< double, 3 > &)
unsigned long getFieldAt (const Vector_t< double, 3 > &, const Vector_t< double, 3 > &, const double &, Vector_t< double, 3 > &, Vector_t< double, 3 > &)
template<class T>
void visit (const T &, BeamlineVisitor &, PartBunch_t *)
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)
template<>
void visit (const Marker &, BeamlineVisitor &, PartBunch_t *)

Private Attributes

FieldList elements_m
bool prepared_m
CoordinateSystemTrafo coordTransformationTo_m

Detailed Description

Definition at line 38 of file OpalBeamline.h.

Constructor & Destructor Documentation

◆ OpalBeamline() [1/2]

OpalBeamline::OpalBeamline ( )

Definition at line 29 of file OpalBeamline.cpp.

References elements_m, and prepared_m.

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

Here is the caller graph for this function:

◆ OpalBeamline() [2/2]

OpalBeamline::OpalBeamline ( const Vector_t< double, 3 > & origin,
const Quaternion & rotation )

Definition at line 32 of file OpalBeamline.cpp.

References coordTransformationTo_m, elements_m, and prepared_m.

◆ ~OpalBeamline()

OpalBeamline::~OpalBeamline ( )

Definition at line 36 of file OpalBeamline.cpp.

References elements_m.

Member Function Documentation

◆ activateElements()

void OpalBeamline::activateElements ( )

Definition at line 556 of file OpalBeamline.cpp.

References elements_m, and end().

Here is the call graph for this function:

◆ compute3DLattice()

void OpalBeamline::compute3DLattice ( )

Definition at line 168 of file OpalBeamline.cpp.

References Quaternion::conjugate(), coordTransformationTo_m, elements_m, end(), euclidean_norm(), Options::idealized, RBEND, RBEND3D, Quaternion::rotate(), SBEND, and SOURCE.

Here is the call graph for this function:

◆ getBoundaryGeometry()

BoundaryGeometry * OpalBeamline::getBoundaryGeometry ( const unsigned int & )

References OpalBeamline().

Here is the call graph for this function:

◆ getCSTrafoLab2Local() [1/2]

CoordinateSystemTrafo OpalBeamline::getCSTrafoLab2Local ( ) const
inline

Definition at line 164 of file OpalBeamline.h.

References coordTransformationTo_m.

◆ getCSTrafoLab2Local() [2/2]

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

Definition at line 159 of file OpalBeamline.h.

◆ getElementByType()

FieldList OpalBeamline::getElementByType ( ElementType type)

Definition at line 141 of file OpalBeamline.cpp.

References ANY, and elements_m.

◆ getElements()

std::set< std::shared_ptr< Component > > OpalBeamline::getElements ( const Vector_t< double, 3 > & x)

Definition at line 40 of file OpalBeamline.cpp.

References elements_m, and end().

Referenced by getFieldAt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getEnd()

double OpalBeamline::getEnd ( const Vector_t< double, 3 > & ) const

◆ getFieldAt() [1/2]

unsigned long OpalBeamline::getFieldAt ( const unsigned int & ,
const Vector_t< double, 3 > & ,
const long & ,
const double & ,
Vector_t< double, 3 > & ,
Vector_t< double, 3 > &  )

Definition at line 56 of file OpalBeamline.cpp.

◆ getFieldAt() [2/2]

unsigned long OpalBeamline::getFieldAt ( const Vector_t< double, 3 > & position,
const Vector_t< double, 3 > & momentum,
const double & t,
Vector_t< double, 3 > & Ef,
Vector_t< double, 3 > & Bf )

Definition at line 64 of file OpalBeamline.cpp.

References end(), getElements(), MARKER, rotateFromLocalCS(), rotateToLocalCS(), and transformToLocalCS().

Here is the call graph for this function:

◆ getMisalignment()

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

Definition at line 168 of file OpalBeamline.h.

◆ getParticleMatterInteractionHandler()

ParticleMatterInteractionHandler * OpalBeamline::getParticleMatterInteractionHandler ( const unsigned int & )

◆ getStart()

double OpalBeamline::getStart ( const Vector_t< double, 3 > & ) const

◆ merge()

void OpalBeamline::merge ( OpalBeamline & rhs)

Definition at line 136 of file OpalBeamline.cpp.

References elements_m, OpalBeamline(), and prepared_m.

Referenced by ParallelTracker::visitBeamline().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ positionElementRelative()

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

Definition at line 155 of file OpalBeamline.cpp.

References coordTransformationTo_m.

Referenced by visit().

Here is the caller graph for this function:

◆ prepareSections()

void OpalBeamline::prepareSections ( )

Definition at line 118 of file OpalBeamline.cpp.

References elements_m, prepared_m, and ClassicField::SortAsc().

Here is the call graph for this function:

◆ print()

void OpalBeamline::print ( Inform & ) const

Definition at line 127 of file OpalBeamline.cpp.

◆ rotateFrom()

Vector_t< double, 3 > OpalBeamline::rotateFrom ( const Vector_t< double, 3 > & r) const
inline

Definition at line 135 of file OpalBeamline.h.

References coordTransformationTo_m.

◆ rotateFromLocalCS()

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

Definition at line 154 of file OpalBeamline.h.

Referenced by getFieldAt().

Here is the caller graph for this function:

◆ rotateTo()

Vector_t< double, 3 > OpalBeamline::rotateTo ( const Vector_t< double, 3 > & r) const
inline

Definition at line 131 of file OpalBeamline.h.

References coordTransformationTo_m.

◆ rotateToLocalCS()

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

Definition at line 149 of file OpalBeamline.h.

Referenced by getFieldAt().

Here is the caller graph for this function:

◆ save3DInput()

void OpalBeamline::save3DInput ( )

Definition at line 496 of file OpalBeamline.cpp.

References Util::combineFilePath(), Quaternion::conjugate(), elements_m, end(), OpalData::getAuxiliaryOutputDirectory(), OpalData::getInputBasename(), OpalData::getInstance(), CoordinateSystemTrafo::getOrigin(), CoordinateSystemTrafo::getRotation(), Util::getTaitBryantAngles(), and Units::rad2deg.

Here is the call graph for this function:

◆ save3DLattice()

void OpalBeamline::save3DLattice ( )

Definition at line 323 of file OpalBeamline.cpp.

References MeshGenerator::add(), OpalData::APPEND, Util::combineFilePath(), elements_m, end(), OpalData::getAuxiliaryOutputDirectory(), OpalData::getInputBasename(), OpalData::getInstance(), CoordinateSystemTrafo::getOrigin(), ClassicField::order_m, RBEND, SBEND, ClassicField::SortAsc(), and MeshGenerator::write().

Here is the call graph for this function:

◆ swap()

void OpalBeamline::swap ( OpalBeamline & rhs)

Definition at line 130 of file OpalBeamline.cpp.

References coordTransformationTo_m, elements_m, OpalBeamline(), and prepared_m.

Referenced by ParallelTracker::visitBeamline().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ switchElements()

void OpalBeamline::switchElements ( const double & min,
const double & max,
const double & kineticEnergy,
const bool & nomonitors = false )

Definition at line 99 of file OpalBeamline.cpp.

References elements_m.

◆ switchElementsOff()

void OpalBeamline::switchElementsOff ( )

Definition at line 113 of file OpalBeamline.cpp.

References elements_m.

◆ transformFrom()

Vector_t< double, 3 > OpalBeamline::transformFrom ( const Vector_t< double, 3 > & r) const
inline

Definition at line 127 of file OpalBeamline.h.

References coordTransformationTo_m.

◆ transformFromLocalCS()

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

Definition at line 144 of file OpalBeamline.h.

◆ transformTo()

Vector_t< double, 3 > OpalBeamline::transformTo ( const Vector_t< double, 3 > & r) const
inline

Definition at line 123 of file OpalBeamline.h.

References coordTransformationTo_m.

◆ transformToLocalCS()

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

Definition at line 139 of file OpalBeamline.h.

Referenced by getFieldAt().

Here is the caller graph for this function:

◆ visit() [1/2]

template<>
void OpalBeamline::visit ( const Marker & ,
BeamlineVisitor & ,
PartBunch_t *  )
inline

Definition at line 120 of file OpalBeamline.h.

◆ visit() [2/2]

template<class T>
void OpalBeamline::visit ( const T & element,
BeamlineVisitor & ,
PartBunch_t * bunch )
inline

Definition at line 104 of file OpalBeamline.h.

References elements_m, and positionElementRelative().

Here is the call graph for this function:

Member Data Documentation

◆ coordTransformationTo_m

◆ elements_m

◆ prepared_m

bool OpalBeamline::prepared_m
private

Definition at line 98 of file OpalBeamline.h.

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


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