17 FieldstrengthEz_m(NULL),
18 FieldstrengthEr_m(NULL),
19 FieldstrengthBt_m(NULL) {
21 std::string tmpString;
29 bool parsing_passed =
true;
31 parsing_passed = interpreteLine<std::string, std::string>(file, tmpString, tmpString);
33 parsing_passed = interpreteLine<std::string, std::string, std::string>(file, tmpString, tmpString, tmpString);
36 if (tmpString !=
"TRUE" &&
39 "The third string on the first line of 2D field "
40 "maps has to be either TRUE or FALSE");
45 if(tmpString ==
"ZX") {
47 parsing_passed = parsing_passed &&
49 parsing_passed = parsing_passed &&
51 parsing_passed = parsing_passed &&
53 }
else if(tmpString ==
"XZ") {
55 parsing_passed = parsing_passed &&
57 parsing_passed = parsing_passed &&
59 parsing_passed = parsing_passed &&
62 std::cerr <<
"unknown orientation of 2D dynamic fieldmap" <<
std::endl;
63 parsing_passed =
false;
69 parsing_passed = parsing_passed && interpreteLine<double, double, double, double>(file, tmpDouble, tmpDouble, tmpDouble, tmpDouble);
72 parsing_passed = parsing_passed &&
82 "An error occured when reading the fieldmap '" +
Filename_m +
"'");
116 std::string tmpString;
117 double tmpDouble, Ezmax = 0.0;
133 interpreteLine<double, double, double, double>(in,
143 interpreteLine<double, double, double, double>(in,
194 const double RR =
sqrt(
R(0) *
R(0) +
R(1) *
R(1));
196 const int indexr = (int)
floor(RR /
hr_m);
197 const double leverr = RR /
hr_m - indexr;
200 const double leverz =
R(2) /
hz_m - indexz;
226 E(0) += EfieldR *
R(0) / RR;
227 E(1) += EfieldR *
R(1) / RR;
228 B(0) -= BfieldT *
R(1) / RR;
229 B(1) += BfieldT *
R(0) / RR;
PETE_TUTree< FnAbs, typename T::PETE_Expr_t > abs(const PETE_Expr< T > &l)
constexpr double e
The value of .
double * FieldstrengthEz_m
constexpr double two_pi
The value of .
std::string toUpper(const std::string &str)
void disableFieldmapWarning()
static std::string typeset_msg(const std::string &msg, const std::string &title)
virtual void getInfo(Inform *msg)
double * FieldstrengthBt_m
virtual void setFrequency(double freq)
FM2DDynamic(std::string aFilename)
virtual void getOnaxisEz(std::vector< std::pair< double, double > > &F)
constexpr double mu_0
The permeability of vacuum in Vs/Am.
virtual void getFieldDimensions(double &zBegin, double &zEnd, double &rBegin, double &rEnd) const
bool interpreteEOF(std::ifstream &in)
virtual bool getFieldstrength(const Vector_t &R, Vector_t &E, Vector_t &B) const
Tps< T > sqrt(const Tps< T > &x)
Square root.
void getLine(std::ifstream &in, std::string &buffer)
virtual bool getFieldDerivative(const Vector_t &R, Vector_t &E, Vector_t &B, const DiffDirection &dir) const
Inform & level3(Inform &inf)
double * FieldstrengthEr_m
PETE_TUTree< FnFloor, typename T::PETE_Expr_t > floor(const PETE_Expr< T > &l)
Inform & endl(Inform &inf)
virtual double getFrequency() const