15 FieldstrengthEz_m(nullptr),
16 FieldstrengthEr_m(nullptr),
17 FieldstrengthBt_m(nullptr) {
19 std::string tmpString;
27 bool parsing_passed =
true;
29 parsing_passed = interpretLine<std::string, std::string>(file, tmpString, tmpString);
31 parsing_passed = interpretLine<std::string, std::string, std::string>(file, tmpString, tmpString, tmpString);
34 if (tmpString !=
"TRUE" &&
37 "The third string on the first line of 2D field "
38 "maps has to be either TRUE or FALSE");
43 if(tmpString ==
"ZX") {
45 parsing_passed = parsing_passed &&
47 parsing_passed = parsing_passed &&
49 parsing_passed = parsing_passed &&
51 }
else if(tmpString ==
"XZ") {
53 parsing_passed = parsing_passed &&
55 parsing_passed = parsing_passed &&
57 parsing_passed = parsing_passed &&
60 std::cerr <<
"unknown orientation of 2D dynamic fieldmap" <<
std::endl;
61 parsing_passed =
false;
67 parsing_passed = parsing_passed && interpretLine<double, double, double, double>(file, tmpDouble, tmpDouble, tmpDouble, tmpDouble);
70 parsing_passed = parsing_passed &&
80 "An error occured when reading the fieldmap '" +
Filename_m +
"'");
119 std::string tmpString;
120 double tmpDouble, Ezmax = 0.0;
136 interpretLine<double, double, double, double>(in,
146 interpretLine<double, double, double, double>(in,
196 const double leverr = RR /
hr_m - indexr;
225 E(0) += EfieldR *
R(0) / RR;
226 E(1) += EfieldR *
R(1) / RR;
227 B(0) -= BfieldT *
R(1) / RR;
228 B(1) += BfieldT *
R(0) / RR;
Tps< T > sqrt(const Tps< T > &x)
Square root.
virtual void setFrequency(double freq)
constexpr double two_pi
The value of .
PETE_TUTree< FnAbs, typename T::PETE_Expr_t > abs(const PETE_Expr< T > &l)
virtual bool getFieldstrength(const Vector_t &R, Vector_t &E, Vector_t &B) const
static FM2DDynamic create(const std::string &filename)
static std::string typeset_msg(const std::string &msg, const std::string &title)
std::string toUpper(const std::string &str)
Inform & endl(Inform &inf)
bool interpreteEOF(std::ifstream &in)
constexpr double mu_0
The permeability of vacuum in Vs/Am.
double * FieldstrengthBt_m
virtual void getFieldDimensions(double &zBegin, double &zEnd) const
std::shared_ptr< _FM2DDynamic > FM2DDynamic
virtual double getFrequency() const
_FM2DDynamic(const std::string &filename)
void disableFieldmapWarning()
double * FieldstrengthEz_m
void getLine(std::ifstream &in, std::string &buffer)
virtual void getOnaxisEz(std::vector< std::pair< double, double > > &F)
Inform & level3(Inform &inf)
virtual void getInfo(Inform *msg)
constexpr double e
The value of .
double * FieldstrengthEr_m
virtual bool getFieldDerivative(const Vector_t &R, Vector_t &E, Vector_t &B, const DiffDirection &dir) const
PETE_TUTree< FnFloor, typename T::PETE_Expr_t > floor(const PETE_Expr< T > &l)