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

#include <FM1DProfile1.h>

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

Public Member Functions

virtual bool getFieldDerivative (const Vector_t &X, Vector_t &E, Vector_t &B, const DiffDirection &dir) const
 
virtual void get1DProfile1EntranceParam (double &entranceParameter1, double &entranceParameter2, double &entranceParameter3)
 
virtual void get1DProfile1ExitParam (double &exitParameter1, double &exitParameter2, double &exitParameter3)
 
virtual double getFieldGap ()
 
virtual void getFieldDimensions (double &zBegin, double &zEnd) const
 
virtual void getFieldDimensions (double &xIni, double &xFinal, double &yIni, double &yFinal, double &zIni, double &zFinal) const
 
virtual bool getFieldstrength (const Vector_t &X, Vector_t &strength, Vector_t &info) const
 
virtual double getFrequency () const
 
virtual void getInfo (Inform *)
 
virtual void setFrequency (double freq)
 
virtual void get1DProfile1EngeCoeffs (std::vector< double > &engeCoeffsEntry, std::vector< double > &engeCoeffsExit)
 
virtual void swap ()
 
virtual void setFieldGap (double gap)
 
- Public Member Functions inherited from Fieldmap
virtual void setEdgeConstants (const double &bendAngle, const double &entranceAngle, const double &exitAngle)
 
virtual void setFieldLength (const double &)
 
MapType getType ()
 
virtual void getOnaxisEz (std::vector< std::pair< double, double > > &onaxis)
 
virtual bool isInside (const Vector_t &) const
 
template<class T >
bool interpretLine (std::ifstream &in, T &value, const bool &file_length_known)
 

Private Member Functions

 FM1DProfile1 (std::string Filename)
 Constructor with field map file name. More...
 
virtual ~FM1DProfile1 ()
 
virtual void freeMap ()
 
virtual void readMap ()
 
double computeEntranceFringe (double z) const
 
double computeExitFringe (double z) const
 
double computeFringe (const std::vector< double > &coefs, double z) const
 

Private Attributes

double entranceParameter1_m
 
double entranceParameter2_m
 
double entranceParameter3_m
 
double exitParameter1_m
 
double exitParameter2_m
 
double exitParameter3_m
 
std::vector< double > engeCoeffsEntry_m
 Enge coefficients for map entry and exit regions. More...
 
std::vector< double > engeCoeffsExit_m
 
int polyOrderEntry_m
 
int polyOrderExit_m
 Enge function order for entry region. More...
 
double gapHeight_m
 Enge function order for entry region. More...
 
double sBegin_m
 Full gap height of field map. More...
 
double sEnd_m
 Start of field map in s coordinates (m). More...
 

Friends

class Fieldmap
 End of field map in s coordinates (m). More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Fieldmap
static FieldmapgetFieldmap (std::string Filename, bool fast=false)
 
static std::vector< std::string > getListFieldmapNames ()
 
static void deleteFieldmap (std::string Filename)
 
static void clearDictionary ()
 
static MapType readHeader (std::string Filename)
 
static void readMap (std::string Filename)
 
static void freeMap (std::string Filename)
 
static std::string typeset_msg (const std::string &msg, const std::string &title)
 
- Protected Member Functions inherited from Fieldmap
 Fieldmap ()=delete
 
 Fieldmap (const std::string &aFilename)
 
virtual ~Fieldmap ()
 
void getLine (std::ifstream &in, std::string &buffer)
 
template<class S >
bool interpretLine (std::ifstream &in, S &value, const bool &file_length_known=true)
 
template<class S , class T >
bool interpretLine (std::ifstream &in, S &value1, T &value2, const bool &file_length_known=true)
 
template<class S , class T , class U >
bool interpretLine (std::ifstream &in, S &value1, T &value2, U &value3, const bool &file_length_known=true)
 
template<class S , class T , class U , class V >
bool interpretLine (std::ifstream &in, S &value1, T &value2, U &value3, V &value4, const bool &file_length_known=true)
 
template<class S >
bool interpretLine (std::ifstream &in, S &value1, S &value2, S &value3, S &value4, S &value5, S &value6, const bool &file_length_known=true)
 
bool interpreteEOF (std::ifstream &in)
 
void interpretWarning (const std::ios_base::iostate &state, const bool &read_all, const std::string &error_msg, const std::string &found)
 
void missingValuesWarning ()
 
void exceedingValuesWarning ()
 
void disableFieldmapWarning ()
 
void noFieldmapWarning ()
 
void lowResolutionWarning (double squareError, double maxError)
 
void checkMap (unsigned int accuracy, std::pair< double, double > fieldDimensions, double deltaZ, const std::vector< double > &fourierCoefficients, gsl_spline *splineCoefficients, gsl_interp_accel *splineAccelerator)
 
void checkMap (unsigned int accuracy, double length, const std::vector< double > &zSampling, const std::vector< double > &fourierCoefficients, gsl_spline *splineCoefficients, gsl_interp_accel *splineAccelerator)
 
void write3DField (unsigned int nx, unsigned int ny, unsigned int nz, const std::pair< double, double > &xrange, const std::pair< double, double > &yrange, const std::pair< double, double > &zrange, const std::vector< Vector_t > &ef, const std::vector< Vector_t > &bf)
 
- Static Protected Member Functions inherited from Fieldmap
static void getLine (std::ifstream &in, int &lines_read, std::string &buffer)
 
- Protected Attributes inherited from Fieldmap
MapType Type
 
std::string Filename_m
 
int lines_read_m
 
bool normalize_m
 

Detailed Description

Definition at line 14 of file FM1DProfile1.h.

Constructor & Destructor Documentation

◆ FM1DProfile1()

FM1DProfile1::FM1DProfile1 ( std::string  Filename)
private

◆ ~FM1DProfile1()

FM1DProfile1::~FM1DProfile1 ( )
privatevirtual

Definition at line 125 of file FM1DProfile1.cpp.

Member Function Documentation

◆ computeEntranceFringe()

double FM1DProfile1::computeEntranceFringe ( double  z) const
private

Definition at line 290 of file FM1DProfile1.cpp.

References computeFringe(), engeCoeffsEntry_m, and gapHeight_m.

Referenced by readMap().

Here is the call graph for this function:

◆ computeExitFringe()

double FM1DProfile1::computeExitFringe ( double  z) const
private

Definition at line 294 of file FM1DProfile1.cpp.

References computeFringe(), engeCoeffsExit_m, and gapHeight_m.

Referenced by readMap().

Here is the call graph for this function:

◆ computeFringe()

double FM1DProfile1::computeFringe ( const std::vector< double > &  coefs,
double  z 
) const
private

Definition at line 298 of file FM1DProfile1.cpp.

References exp(), and pow().

Referenced by computeEntranceFringe(), and computeExitFringe().

Here is the call graph for this function:

◆ freeMap()

void FM1DProfile1::freeMap ( )
privatevirtual

Implements Fieldmap.

Definition at line 208 of file FM1DProfile1.cpp.

◆ get1DProfile1EngeCoeffs()

void FM1DProfile1::get1DProfile1EngeCoeffs ( std::vector< double > &  engeCoeffsEntry,
std::vector< double > &  engeCoeffsExit 
)
virtual

Reimplemented from Fieldmap.

Definition at line 258 of file FM1DProfile1.cpp.

References engeCoeffsEntry_m, and engeCoeffsExit_m.

◆ get1DProfile1EntranceParam()

void FM1DProfile1::get1DProfile1EntranceParam ( double &  entranceParameter1,
double &  entranceParameter2,
double &  entranceParameter3 
)
virtual

Reimplemented from Fieldmap.

Definition at line 265 of file FM1DProfile1.cpp.

References entranceParameter1_m, entranceParameter2_m, and entranceParameter3_m.

◆ get1DProfile1ExitParam()

void FM1DProfile1::get1DProfile1ExitParam ( double &  exitParameter1,
double &  exitParameter2,
double &  exitParameter3 
)
virtual

Reimplemented from Fieldmap.

Definition at line 273 of file FM1DProfile1.cpp.

References exitParameter1_m, exitParameter2_m, and exitParameter3_m.

◆ getFieldDerivative()

bool FM1DProfile1::getFieldDerivative ( const Vector_t X,
Vector_t E,
Vector_t B,
const DiffDirection dir 
) const
virtual

Implements Fieldmap.

Definition at line 221 of file FM1DProfile1.cpp.

◆ getFieldDimensions() [1/2]

void FM1DProfile1::getFieldDimensions ( double &  xIni,
double &  xFinal,
double &  yIni,
double &  yFinal,
double &  zIni,
double &  zFinal 
) const
virtual

Implements Fieldmap.

Definition at line 233 of file FM1DProfile1.cpp.

◆ getFieldDimensions() [2/2]

void FM1DProfile1::getFieldDimensions ( double &  zBegin,
double &  zEnd 
) const
virtual

Implements Fieldmap.

Definition at line 228 of file FM1DProfile1.cpp.

References sBegin_m, and sEnd_m.

◆ getFieldGap()

double FM1DProfile1::getFieldGap ( )
virtual

Reimplemented from Fieldmap.

Definition at line 281 of file FM1DProfile1.cpp.

References gapHeight_m.

◆ getFieldstrength()

bool FM1DProfile1::getFieldstrength ( const Vector_t X,
Vector_t strength,
Vector_t info 
) const
virtual

Implements Fieldmap.

Definition at line 211 of file FM1DProfile1.cpp.

◆ getFrequency()

double FM1DProfile1::getFrequency ( ) const
virtual

Implements Fieldmap.

Definition at line 251 of file FM1DProfile1.cpp.

◆ getInfo()

void FM1DProfile1::getInfo ( Inform msg)
virtual

Implements Fieldmap.

Definition at line 245 of file FM1DProfile1.cpp.

References endl(), and Fieldmap::Filename_m.

Here is the call graph for this function:

◆ readMap()

void FM1DProfile1::readMap ( )
privatevirtual

◆ setFieldGap()

void FM1DProfile1::setFieldGap ( double  gap)
virtual

Reimplemented from Fieldmap.

Definition at line 284 of file FM1DProfile1.cpp.

References gapHeight_m.

◆ setFrequency()

void FM1DProfile1::setFrequency ( double  freq)
virtual

Implements Fieldmap.

Definition at line 255 of file FM1DProfile1.cpp.

◆ swap()

void FM1DProfile1::swap ( )
virtual

Implements Fieldmap.

Definition at line 242 of file FM1DProfile1.cpp.

Friends And Related Function Documentation

◆ Fieldmap

friend class Fieldmap
friend

End of field map in s coordinates (m).

Definition at line 87 of file FM1DProfile1.h.

Member Data Documentation

◆ engeCoeffsEntry_m

std::vector<double> FM1DProfile1::engeCoeffsEntry_m
private

Enge coefficients for map entry and exit regions.

Definition at line 77 of file FM1DProfile1.h.

Referenced by computeEntranceFringe(), get1DProfile1EngeCoeffs(), and readMap().

◆ engeCoeffsExit_m

std::vector<double> FM1DProfile1::engeCoeffsExit_m
private

Definition at line 78 of file FM1DProfile1.h.

Referenced by computeExitFringe(), get1DProfile1EngeCoeffs(), and readMap().

◆ entranceParameter1_m

double FM1DProfile1::entranceParameter1_m
private

Definition at line 69 of file FM1DProfile1.h.

Referenced by FM1DProfile1(), get1DProfile1EntranceParam(), and readMap().

◆ entranceParameter2_m

double FM1DProfile1::entranceParameter2_m
private

Definition at line 70 of file FM1DProfile1.h.

Referenced by FM1DProfile1(), and get1DProfile1EntranceParam().

◆ entranceParameter3_m

double FM1DProfile1::entranceParameter3_m
private

Definition at line 71 of file FM1DProfile1.h.

Referenced by FM1DProfile1(), get1DProfile1EntranceParam(), and readMap().

◆ exitParameter1_m

double FM1DProfile1::exitParameter1_m
private

Definition at line 72 of file FM1DProfile1.h.

Referenced by FM1DProfile1(), get1DProfile1ExitParam(), and readMap().

◆ exitParameter2_m

double FM1DProfile1::exitParameter2_m
private

Definition at line 73 of file FM1DProfile1.h.

Referenced by FM1DProfile1(), and get1DProfile1ExitParam().

◆ exitParameter3_m

double FM1DProfile1::exitParameter3_m
private

Definition at line 74 of file FM1DProfile1.h.

Referenced by FM1DProfile1(), get1DProfile1ExitParam(), and readMap().

◆ gapHeight_m

double FM1DProfile1::gapHeight_m
private

Enge function order for entry region.

Definition at line 82 of file FM1DProfile1.h.

Referenced by computeEntranceFringe(), computeExitFringe(), FM1DProfile1(), getFieldGap(), and setFieldGap().

◆ polyOrderEntry_m

int FM1DProfile1::polyOrderEntry_m
private

Definition at line 80 of file FM1DProfile1.h.

Referenced by FM1DProfile1(), and readMap().

◆ polyOrderExit_m

int FM1DProfile1::polyOrderExit_m
private

Enge function order for entry region.

Definition at line 81 of file FM1DProfile1.h.

Referenced by FM1DProfile1(), and readMap().

◆ sBegin_m

double FM1DProfile1::sBegin_m
private

Full gap height of field map.

Definition at line 84 of file FM1DProfile1.h.

Referenced by FM1DProfile1(), and getFieldDimensions().

◆ sEnd_m

double FM1DProfile1::sEnd_m
private

Start of field map in s coordinates (m).

Definition at line 85 of file FM1DProfile1.h.

Referenced by FM1DProfile1(), and getFieldDimensions().


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