17 FourCoefs_m(nullptr) {
20 int skippedValues = 0;
21 std::string tmpString;
29 bool parsing_passed =
true;
31 parsing_passed = interpretLine<std::string, int>(file, tmpString,
accuracy_m);
33 parsing_passed = interpretLine<std::string, int, std::string>(file,
39 if (tmpString !=
"TRUE" &&
42 "The third string on the first line of 1D field "
43 "maps has to be either TRUE or FALSE");
48 parsing_passed = parsing_passed &&
49 interpretLine<double, double>(file,
zbegin_m, tmpDouble);
52 while(!file.eof() && parsing_passed) {
53 parsing_passed = interpretLine<double, double>(file,
zend_m, tmpDouble,
false);
54 if (
zend_m - tmpDouble2 > 1e-10) {
56 }
else if (parsing_passed) {
64 if (!parsing_passed && !file.eof()) {
68 "An error occured when reading the fieldmap '" +
Filename_m +
"'");
94 bool parsing_passed =
true;
96 std::string tmpString;
105 gsl_spline *Ez_interpolant = gsl_spline_alloc(gsl_interp_cspline,
num_gridpz_m);
106 gsl_interp_accel *Ez_accel = gsl_interp_accel_alloc();
108 gsl_fft_real_wavetable *
real = gsl_fft_real_wavetable_alloc(2 *
num_gridpz_m);
109 gsl_fft_real_workspace *work = gsl_fft_real_workspace_alloc(2 *
num_gridpz_m);
118 parsing_passed = interpretLine<double, double>(in, zvals[i], RealValues[i]);
121 if (zvals[i] - tmpDouble > 1e-10) {
122 if (std::abs(RealValues[i]) > Ez_max) {
123 Ez_max = std::abs(RealValues[i]);
125 tmpDouble = zvals[i];
131 gsl_spline_init(Ez_interpolant, zvals, RealValues,
num_gridpz_m);
138 RealValues[ii] = gsl_spline_eval(Ez_interpolant, z, Ez_accel);
144 RealValues[i] = RealValues[ii];
157 for (
int i = 1; i < 2 *
accuracy_m - 1; i++) {
161 gsl_fft_real_workspace_free(work);
162 gsl_fft_real_wavetable_free(
real);
164 gsl_spline_free(Ez_interpolant);
165 gsl_interp_accel_free(Ez_accel);
FLieGenerator< T, N > real(const FLieGenerator< std::complex< T >, N > &)
Take real part of a complex generator.