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

#include <CSRWakeFunction.h>

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

Public Member Functions

 CSRWakeFunction (const std::string &name, std::vector< Filter * > filters, const unsigned int &N)
 
void apply (PartBunchBase< double, 3 > *bunch)
 
void initialize (const ElementBase *ref)
 
virtual const std::string getType () const
 
- Public Member Functions inherited from WakeFunction
 WakeFunction (std::string name, unsigned int n)
 
virtual ~WakeFunction ()
 
const std::string & getName () const
 

Private Member Functions

void calculateLineDensity (PartBunchBase< double, 3 > *bunch, std::pair< double, double > &meshInfo)
 
void calculateContributionInside (size_t sliceNumber, double angleOfSlice, double meshSpacing)
 
void calculateContributionAfter (size_t sliceNumber, double angleOfSlice, double meshSpacing)
 
double calcPsi (const double &psiInitial, const double &x, const double &Ds) const
 

Private Attributes

std::vector< Filter * > filters_m
 
std::shared_ptr< FilterdefaultFilter_m
 
FilterdiffOp_m
 
LineDensity lineDensity_m
 
LineDensity dlineDensitydz_m
 
std::vector< double > Ez_m
 
std::vector< double > Psi_m
 
double Begin_m
 
double FieldBegin_m
 
double Length_m
 
double bendRadius_m
 
std::string bendName_m
 
double totalBendAngle_m
 

Additional Inherited Members

- Protected Attributes inherited from WakeFunction
const unsigned int nBins_m
 

Detailed Description

Definition at line 29 of file CSRWakeFunction.h.

Constructor & Destructor Documentation

◆ CSRWakeFunction()

CSRWakeFunction::CSRWakeFunction ( const std::string &  name,
std::vector< Filter * >  filters,
const unsigned int &  N 
)

Definition at line 35 of file CSRWakeFunction.cpp.

References defaultFilter_m, diffOp_m, and filters_m.

Member Function Documentation

◆ apply()

void CSRWakeFunction::apply ( PartBunchBase< double, 3 > *  bunch)
virtual

◆ calcPsi()

double CSRWakeFunction::calcPsi ( const double &  psiInitial,
const double &  x,
const double &  Ds 
) const
private

solve the equation

\[ \Delta s = \frac{R \Psi^3}{24} \frac{\Psi + 4x}{\Psi + x} \]

for \(\Psi\) using Newtons method.

Definition at line 307 of file CSRWakeFunction.cpp.

References abs(), bendRadius_m, Physics::e, endl(), ERRORMSG, RootFinderForCSR::hasPositiveRealRoots(), pow(), and RootFinderForCSR::searchRoot().

Referenced by calculateContributionAfter().

Here is the call graph for this function:

◆ calculateContributionAfter()

void CSRWakeFunction::calculateContributionAfter ( size_t  sliceNumber,
double  angleOfSlice,
double  meshSpacing 
)
private

Definition at line 250 of file CSRWakeFunction.cpp.

References bendRadius_m, calcPsi(), dlineDensitydz_m, Ez_m, floor(), lineDensity_m, pow(), Psi_m, and totalBendAngle_m.

Referenced by apply().

Here is the call graph for this function:

◆ calculateContributionInside()

void CSRWakeFunction::calculateContributionInside ( size_t  sliceNumber,
double  angleOfSlice,
double  meshSpacing 
)
private

Definition at line 164 of file CSRWakeFunction.cpp.

References bendRadius_m, dlineDensitydz_m, Ez_m, floor(), lineDensity_m, pow(), and totalBendAngle_m.

Referenced by apply().

Here is the call graph for this function:

◆ calculateLineDensity()

void CSRWakeFunction::calculateLineDensity ( PartBunchBase< double, 3 > *  bunch,
std::pair< double, double > &  meshInfo 
)
private

Definition at line 152 of file CSRWakeFunction.cpp.

References Filter::calc_derivative(), PartBunchBase< T, Dim >::calcLineDensity(), diffOp_m, dlineDensitydz_m, filters_m, lineDensity_m, and WakeFunction::nBins_m.

Referenced by apply().

Here is the call graph for this function:

◆ getType()

const std::string CSRWakeFunction::getType ( ) const
virtual

Implements WakeFunction.

Definition at line 338 of file CSRWakeFunction.cpp.

◆ initialize()

void CSRWakeFunction::initialize ( const ElementBase ref)
virtual

Member Data Documentation

◆ Begin_m

double CSRWakeFunction::Begin_m
private

Definition at line 60 of file CSRWakeFunction.h.

Referenced by initialize().

◆ bendName_m

std::string CSRWakeFunction::bendName_m
private

Definition at line 72 of file CSRWakeFunction.h.

Referenced by apply(), and initialize().

◆ bendRadius_m

double CSRWakeFunction::bendRadius_m
private

◆ defaultFilter_m

std::shared_ptr<Filter> CSRWakeFunction::defaultFilter_m
private

Definition at line 47 of file CSRWakeFunction.h.

Referenced by CSRWakeFunction().

◆ diffOp_m

Filter* CSRWakeFunction::diffOp_m
private

Definition at line 48 of file CSRWakeFunction.h.

Referenced by calculateLineDensity(), and CSRWakeFunction().

◆ dlineDensitydz_m

LineDensity CSRWakeFunction::dlineDensitydz_m
private

◆ Ez_m

std::vector<double> CSRWakeFunction::Ez_m
private

◆ FieldBegin_m

double CSRWakeFunction::FieldBegin_m
private

Definition at line 64 of file CSRWakeFunction.h.

Referenced by apply(), and initialize().

◆ filters_m

std::vector<Filter *> CSRWakeFunction::filters_m
private

Definition at line 46 of file CSRWakeFunction.h.

Referenced by calculateLineDensity(), and CSRWakeFunction().

◆ Length_m

double CSRWakeFunction::Length_m
private

Definition at line 67 of file CSRWakeFunction.h.

Referenced by initialize().

◆ lineDensity_m

LineDensity CSRWakeFunction::lineDensity_m
private

◆ Psi_m

std::vector<double> CSRWakeFunction::Psi_m
private

Definition at line 57 of file CSRWakeFunction.h.

Referenced by apply(), and calculateContributionAfter().

◆ totalBendAngle_m

double CSRWakeFunction::totalBendAngle_m
private

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