35 "An error occured when reading the fieldmap '" +
Filename_m +
"'");
77 const double RR2 =
R(0) *
R(0) +
R(1) *
R(1);
85 const double BfieldR = -bzp / 2. + bzppp / 16. * RR2;
87 B(0) += BfieldR *
R(0);
88 B(1) += BfieldR *
R(1);
89 B(2) += bz - bzpp * RR2 / 4.;
119 std::string tmpString;
124 passed = interpretLine<std::string, int>(file, tmpString, tmpInt);
126 passed = interpretLine<std::string, int, std::string>(file, tmpString, tmpInt, tmpString);
129 if (tmpString !=
"TRUE" &&
130 tmpString !=
"FALSE")
132 "The third string on the first line of 1D field "
133 "maps has to be either TRUE or FALSE");
142 std::string tmpString;
146 interpretLine<std::string, int>(file, tmpString, accuracy);
148 interpretLine<std::string, int, std::string>(file, tmpString, accuracy, tmpString);
Inform & endl(Inform &inf)
Inform & level3(Inform &inf)
constexpr double e
The value of.
std::string toUpper(const std::string &str)
bool determineNumSamplingPoints(std::ifstream &file)
double readFieldData(std::ifstream &file)
void computeFieldDerivatives(std::vector< double > &fourierComponents, int accuracy)
gsl_spline * onAxisInterpolants_m[4]
std::vector< double > getEvenlyDistributedSamplingPoints()
void normalizeFieldData(double maxEz)
std::vector< double > computeFourierCoefficients(int accuracy, std::vector< double > &evenSampling)
gsl_interp_accel * onAxisAccel_m[4]
std::vector< double > interpolateFieldData(std::vector< double > &samplingPoints)
virtual ~Astra1DMagnetoStatic_fast()
int stripFileHeader(std::ifstream &file)
virtual void getFieldDimensions(double &zBegin, double &zEnd) const
virtual bool getFieldstrength(const Vector_t &R, Vector_t &E, Vector_t &B) const
virtual void setFrequency(double freq)
virtual void getInfo(Inform *)
bool readFileHeader(std::ifstream &file)
virtual double getFrequency() const
virtual bool getFieldDerivative(const Vector_t &R, Vector_t &E, Vector_t &B, const DiffDirection &dir) const
Astra1DMagnetoStatic_fast(std::string aFilename)
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 disableFieldmapWarning()
static std::string typeset_msg(const std::string &msg, const std::string &title)