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

#include <CavityAutophaser.h>

Collaboration diagram for CavityAutophaser:

Public Member Functions

 CavityAutophaser (const PartData &ref, std::shared_ptr< Component > cavity)
 ~CavityAutophaser ()
double getPhaseAtMaxEnergy (const Vector_t< double, 3 > &R, const Vector_t< double, 3 > &P, double t, double dt)

Private Member Functions

double guessCavityPhase (double t)
std::pair< double, double > optimizeCavityPhase (double initialGuess, double t, double dt)
double track (double t, const double dt, const double phase, std::ofstream *out=nullptr) const

Private Attributes

const PartDataitsReference_m
std::shared_ptr< ComponentitsCavity_m
Vector_t< double, 3 > initialR_m
Vector_t< double, 3 > initialP_m

Detailed Description

Definition at line 28 of file CavityAutophaser.h.

Constructor & Destructor Documentation

◆ CavityAutophaser()

CavityAutophaser::CavityAutophaser ( const PartData & ref,
std::shared_ptr< Component > cavity )

Definition at line 41 of file CavityAutophaser.cpp.

References initialR_m, itsCavity_m, and itsReference_m.

◆ ~CavityAutophaser()

CavityAutophaser::~CavityAutophaser ( )

Definition at line 48 of file CavityAutophaser.cpp.

Member Function Documentation

◆ getPhaseAtMaxEnergy()

double CavityAutophaser::getPhaseAtMaxEnergy ( const Vector_t< double, 3 > & R,
const Vector_t< double, 3 > & P,
double t,
double dt )

Definition at line 51 of file CavityAutophaser.cpp.

References Physics::c, Util::combineFilePath(), dot(), Units::eV2MeV, RFCavity::getAmplitudem(), RFCavity::getAutophaseVeto(), RFCavity::getDesignEnergy(), RFCavity::getFrequencym(), OpalData::getInstance(), Util::getKineticEnergy(), ElementBase::getName(), RFCavity::getPhasem(), guessCavityPhase(), initialP_m, initialR_m, itsCavity_m, itsReference_m, optimizeCavityPhase(), Physics::pi, Units::rad2deg, RFCAVITY, Units::s2ns, Units::s2ps, RFCavity::setAmplitudem(), RFCavity::setAutophaseVeto(), OpalData::setMaxPhase(), RFCavity::setPhasem(), track(), TRAVELINGWAVE, and Physics::two_pi.

Referenced by OrbitThreader::autophaseCavities(), and ParallelTracker::autophaseCavities().

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

◆ guessCavityPhase()

double CavityAutophaser::guessCavityPhase ( double t)
private

Definition at line 210 of file CavityAutophaser.cpp.

References Units::eV2MeV, RFCavity::getAutoPhaseEstimate(), RFCavity::getAutophaseVeto(), Util::getKineticEnergy(), RFCavity::getPhasem(), initialP_m, itsCavity_m, itsReference_m, and Physics::two_pi.

Referenced by getPhaseAtMaxEnergy().

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

◆ optimizeCavityPhase()

std::pair< double, double > CavityAutophaser::optimizeCavityPhase ( double initialGuess,
double t,
double dt )
private

Definition at line 228 of file CavityAutophaser.cpp.

References Options::autoPhase, RFCavity::getAutophaseVeto(), RFCavity::getFrequencym(), RFCavity::getPhasem(), itsCavity_m, Physics::pi, track(), and Physics::two_pi.

Referenced by getPhaseAtMaxEnergy().

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

◆ track()

double CavityAutophaser::track ( double t,
const double dt,
const double phase,
std::ofstream * out = nullptr ) const
private

Definition at line 294 of file CavityAutophaser.cpp.

References Units::eV2MeV, Util::getKineticEnergy(), RFCavity::getPhasem(), initialP_m, itsCavity_m, itsReference_m, RFCavity::setPhasem(), and RFCavity::trackOnAxisParticle().

Referenced by getPhaseAtMaxEnergy(), and optimizeCavityPhase().

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

Member Data Documentation

◆ initialP_m

Vector_t<double, 3> CavityAutophaser::initialP_m
private

Definition at line 55 of file CavityAutophaser.h.

Referenced by getPhaseAtMaxEnergy(), guessCavityPhase(), and track().

◆ initialR_m

Vector_t<double, 3> CavityAutophaser::initialR_m
private

Definition at line 54 of file CavityAutophaser.h.

Referenced by CavityAutophaser(), and getPhaseAtMaxEnergy().

◆ itsCavity_m

std::shared_ptr<Component> CavityAutophaser::itsCavity_m
private

◆ itsReference_m

const PartData& CavityAutophaser::itsReference_m
private

Definition at line 51 of file CavityAutophaser.h.

Referenced by CavityAutophaser(), getPhaseAtMaxEnergy(), guessCavityPhase(), and track().


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