23#ifndef CLASSIC_Undulator_HH
24#define CLASSIC_Undulator_HH
50 virtual bool bends()
const;
54 virtual void getDimensions(
double& zBegin,
double& zEnd)
const;
Interface for a single beam element.
virtual bool apply(const size_t &i, const double &t, Vector_t &E, Vector_t &B)
virtual ElementType getType() const
Get element type std::string.
unsigned int numPeriods_m
Number of periods.
void setAngle(double theta)
double angle_m
Polarisation angle of the undulator field.
std::vector< double > getMeshLength() const
double lambda_m
Undulator period.
std::vector< double > meshResolution_m
Mesh dx, dy, dz.
std::string fname_m
Mithra file with output information.
double totalTime_m
Total time to run undulator.
void setMeshLength(const std::vector< double > &ml)
void apply(PartBunchBase< double, 3 > *itsBunch, CoordinateSystemTrafo const &refToLocalCSTrafo)
void setLambda(double lambda)
void setFilename(const std::string &fname)
double getDtBunch() const
void setTotalTime(double tt)
void setTruncationOrder(unsigned int trunOrder)
void setNumPeriods(unsigned int np)
virtual bool bends() const
unsigned int getTruncationOrder() const
virtual void initialise(PartBunchBase< double, 3 > *bunch, double &startField, double &endField)
double getTotalTime() const
double dtBunch_m
Time step for the bunch position update.
const std::string & getFilename() const
bool getHasBeenSimulated() const
unsigned int getNumPeriods() const
void setDtBunch(double dtb)
void operator=(const Undulator &)
std::vector< double > getMeshResolution() const
std::vector< double > meshLength_m
Size of computational domain.
void setMeshResolution(const std::vector< double > &mr)
bool hasBeenSimulated_m
Boolean to indicate whether this undulator has already been simulated.
virtual void getDimensions(double &zBegin, double &zEnd) const
virtual void accept(BeamlineVisitor &) const
Apply visitor to Undulator.
double k_m
The undulator parameter.
void setHasBeenSimulated(bool hbs)
unsigned int truncationOrder_m
First or second order absorbing boundary conditions.