28 #ifndef _CLASSIC_FIELDS_SECTORMAGNETICFIELDMAP_HH_
29 #define _CLASSIC_FIELDS_SECTORMAGNETICFIELDMAP_HH_
38 namespace interpolation {
178 void print(std::ostream& out);
214 void Rotate(
double* value,
double angle);
225 static std::map<std::string, SectorMagneticFieldMap*>
_fields;
256 std::vector<double> units,
259 int smoothing_order);
266 static std::vector< std::vector<double> >
readLines
267 (std::string file_name, std::vector<double> units);
271 const std::vector< std::vector<double> > field_points,
276 const std::vector< std::vector<double> > field_points,
281 const std::vector< std::vector<double> > field_points,
285 int smoothing_order);
293 (std::vector<double> field_item1, std::vector<double> field_item2);
void setInterpolator(interpolation::VectorMap *interpolator)
static std::string SymmetryToString(symmetry sym)
void setPhiOffset(double dphi)
static const double fractionalBBPhiTolerance_m
handles field map grids with sector geometry
static interpolation::VectorMap * readMap(std::string file_name, std::vector< double > units, SectorMagneticFieldMap::symmetry sym, int poly_order, int smoothing_order)
bool getFieldstrength(const Vector_t &R_c, Vector_t &E_c, Vector_t &B_c) const
SectorMagneticFieldMap & operator=(const SectorMagneticFieldMap &field)
interpolation::VectorMap * interpolator_m
double getFrequency() const
double getPhiOffset() const
static const std::string errMsg1
double getDeltaPhi() const
void getInfo(Inform *msg)
static interpolation::VectorMap * getInterpolatorPolyPatch(const std::vector< std::vector< double > > field_points, interpolation::ThreeDGrid *grid, SectorMagneticFieldMap::symmetry sym, int poly_order, int smoothing_order)
static bool comparator(std::vector< double > field_item1, std::vector< double > field_item2)
void print(std::ostream &out)
handles reading sector field maps
static interpolation::ThreeDGrid * generateGrid(const std::vector< std::vector< double > > field_points, SectorMagneticFieldMap::symmetry sym)
bool getFieldstrengthPolar(const Vector_t &R_p, Vector_t &E_p, Vector_t &B_p) const
std::string getFieldMapFileName() const
bool applySymmetry(double *R_temp) const
const std::string filename_m
static const double floatTolerance_m
static std::vector< std::vector< double > > readLines(std::string file_name, std::vector< double > units)
void Rotate(double *value, double angle)
static const int sortOrder_m[3]
static void clearFieldCache()
friend class SectorMagneticFieldMapIO
interpolation::VectorMap * getInterpolator()
static bool floatGreaterEqual(double in1, double in2)
~SectorMagneticFieldMap()
SectorMagneticFieldMap(std::string file_name, std::string symmetry, double length_units, double field_units, int polynomial_order, int smoothing_order)
static std::map< std::string, SectorMagneticFieldMap * > _fields
void setFrequency(double)
void setSymmetry(std::string name)
static symmetry StringToSymmetry(std::string name)
std::string getSymmetry() const
static interpolation::VectorMap * getInterpolator(const std::vector< std::vector< double > > field_points, interpolation::ThreeDGrid *grid, SectorMagneticFieldMap::symmetry sym)
std::vector< double > units_m
bool getFieldDerivative(const Vector_t &R, Vector_t &E, Vector_t &B, const DiffDirection &dir) const