Commit 2c83690a authored by kraus's avatar kraus Committed by kraus

Resolve "Orbit threader throws an exception when TRACKBACK = TRUE and...

Resolve "Orbit threader throws an exception when TRACKBACK = TRUE and traveling wave structure present"
parent ebb89c52
......@@ -61,9 +61,9 @@ RFCavity::RFCavity(const RFCavity &right):
autophaseVeto_m(right.autophaseVeto_m),
designEnergy_m(right.designEnergy_m),
fieldmap_m(right.fieldmap_m),
length_m(right.length_m),
startField_m(right.startField_m),
endField_m(right.endField_m),
length_m(right.length_m),
type_m(right.type_m),
rmin_m(right.rmin_m),
rmax_m(right.rmax_m),
......@@ -97,9 +97,9 @@ RFCavity::RFCavity(const std::string &name):
autophaseVeto_m(false),
designEnergy_m(-1.0),
fieldmap_m(nullptr),
length_m(0.0),
startField_m(0.0),
endField_m(0.0),
length_m(0.0),
type_m(SW),
rmin_m(0.0),
rmax_m(0.0),
......@@ -112,9 +112,6 @@ RFCavity::RFCavity(const std::string &name):
RNormal_m(nullptr),
VrNormal_m(nullptr),
DvDr_m(nullptr),
// RNormal_m(std::nullptr_t(NULL)),
// VrNormal_m(std::nullptr_t(NULL)),
// DvDr_m(std::nullptr_t(NULL)),
num_points_m(0)
{
setElType(isRF);
......@@ -122,13 +119,6 @@ RFCavity::RFCavity(const std::string &name):
RFCavity::~RFCavity() {
// FIXME: in deleteFielmak, a map find makes problems
// Fieldmap::deleteFieldmap(filename_m);
//~ if(RNormal_m) {
//~ delete[] RNormal_m;
//~ delete[] VrNormal_m;
//~ delete[] DvDr_m;
//~ }
}
void RFCavity::accept(BeamlineVisitor &visitor) const {
......@@ -252,6 +242,7 @@ bool RFCavity::applyToReferenceParticle(const Vector_t &R,
void RFCavity::initialise(PartBunchBase<double, 3> *bunch, double &startField, double &endField) {
using Physics::two_pi;
startField_m = endField_m = 0.0;
if (bunch == NULL) {
startField = startField_m;
endField = endField_m;
......@@ -265,29 +256,30 @@ void RFCavity::initialise(PartBunchBase<double, 3> *bunch, double &startField, d
RefPartBunch_m = bunch;
fieldmap_m = Fieldmap::getFieldmap(filename_m, fast_m);
fieldmap_m->getFieldDimensions(startField_m, endField_m, rBegin, rEnd);
if(endField_m > startField_m) {
msg << level2 << getName() << " using file ";
fieldmap_m->getInfo(&msg);
if(std::abs((frequency_m - fieldmap_m->getFrequency()) / frequency_m) > 0.01) {
errormsg << "FREQUENCY IN INPUT FILE DIFFERENT THAN IN FIELD MAP '" << filename_m << "';\n"
<< frequency_m / two_pi * 1e-6 << " MHz <> "
<< fieldmap_m->getFrequency() / two_pi * 1e-6 << " MHz; TAKE ON THE LATTER";
std::string errormsg_str = Fieldmap::typeset_msg(errormsg.str(), "warning");
ERRORMSG(errormsg_str << "\n" << endl);
if(Ippl::myNode() == 0) {
std::ofstream omsg("errormsg.txt", std::ios_base::app);
omsg << errormsg_str << std::endl;
omsg.close();
}
frequency_m = fieldmap_m->getFrequency();
if (endField_m <= startField_m) {
throw GeneralClassicException("RFCavity::initialise",
"The length of the field map '" + filename_m + "' is zero or negativ");
}
msg << level2 << getName() << " using file ";
fieldmap_m->getInfo(&msg);
if(std::abs((frequency_m - fieldmap_m->getFrequency()) / frequency_m) > 0.01) {
errormsg << "FREQUENCY IN INPUT FILE DIFFERENT THAN IN FIELD MAP '" << filename_m << "';\n"
<< frequency_m / two_pi * 1e-6 << " MHz <> "
<< fieldmap_m->getFrequency() / two_pi * 1e-6 << " MHz; TAKE ON THE LATTER";
std::string errormsg_str = Fieldmap::typeset_msg(errormsg.str(), "warning");
ERRORMSG(errormsg_str << "\n" << endl);
if(Ippl::myNode() == 0) {
std::ofstream omsg("errormsg.txt", std::ios_base::app);
omsg << errormsg_str << std::endl;
omsg.close();
}
length_m = endField_m - startField_m;
endField = startField + length_m;
} else {
endField = startField - 1e-3;
frequency_m = fieldmap_m->getFrequency();
}
length_m = endField_m - startField_m;
endField = startField + length_m;
}
// In current version ,this function reads in the cavity voltage profile data from file.
......@@ -783,9 +775,9 @@ pair<double, double> RFCavity::trackOnAxisParticle(const double &p0,
integrator.push(z, p, dt);
z *= cdt;
Ef = 0.0;
Bf = 0.0;
if(z(2) >= zbegin && z(2) <= zend) {
Ef = 0.0;
Bf = 0.0;
applyToReferenceParticle(z, p, t + 0.5 * dt, Ef, Bf);
}
integrator.kick(z, p, Ef, Bf, dt);
......
......@@ -228,11 +228,13 @@ protected:
bool autophaseVeto_m;
double designEnergy_m;
private:
Fieldmap* fieldmap_m;
double length_m;
double startField_m; /**< starting point of field(m)*/
private:
double endField_m;
double length_m;
CavityType type_m;
......
This diff is collapsed.
......@@ -66,13 +66,6 @@ public:
virtual double getAutoPhaseEstimate(const double & E0, const double & t0, const double & q, const double & m) override;
virtual std::pair<double, double> trackOnAxisParticle(const double & p0,
const double & t0,
const double & dt,
const double & q,
const double & mass,
std::ofstream *out = NULL) override;
virtual void addKR(int i, double t, Vector_t &K) override;
virtual void addKT(int i, double t, Vector_t &K) override;
......@@ -107,10 +100,6 @@ public:
virtual CoordinateSystemTrafo getEdgeToEnd() const override;
private:
Fieldmap *CoreFieldmap_m;
/* Fieldmap *EntryFringeField_m; */
/* Fieldmap *ExitFringeField_m; */
double scaleCore_m;
double scaleCoreError_m;
......@@ -118,7 +107,6 @@ private:
double phaseCore2_m;
double phaseExit_m;
double length_m;
double startCoreField_m; /**< starting point of field(m)*/
double startExitField_m;
double mappedStartExitField_m;
......@@ -128,11 +116,6 @@ private:
double CellLength_m;
double Mode_m;
bool fast_m;
bool autophaseVeto_m;
double designEnergy_m;
inline double getdE(const int & i,
const int & I,
const std::vector<double> & t,
......@@ -258,4 +241,4 @@ CoordinateSystemTrafo TravelingWave::getEdgeToEnd() const
return ret;
}
#endif // CLASSIC_TravelingWave_HH
#endif // CLASSIC_TravelingWave_HH
\ No newline at end of file
......@@ -33,11 +33,11 @@ Astra1DDynamic::Astra1DDynamic(std::string aFilename):
if (file.good()) {
bool parsing_passed = true;
try {
parsing_passed = interpreteLine<std::string, int>(file,
parsing_passed = interpretLine<std::string, int>(file,
tmpString,
accuracy_m);
} catch (GeneralClassicException &e) {
parsing_passed = interpreteLine<std::string, int, std::string>(file,
parsing_passed = interpretLine<std::string, int, std::string>(file,
tmpString,
accuracy_m,
tmpString);
......@@ -53,13 +53,13 @@ Astra1DDynamic::Astra1DDynamic(std::string aFilename):
}
parsing_passed = parsing_passed &&
interpreteLine<double>(file, frequency_m);
interpretLine<double>(file, frequency_m);
parsing_passed = parsing_passed &&
interpreteLine<double, double>(file, zbegin_m, tmpDouble);
interpretLine<double, double>(file, zbegin_m, tmpDouble);
tmpDouble2 = zbegin_m;
while(!file.eof() && parsing_passed) {
parsing_passed = interpreteLine<double, double>(file, zend_m, tmpDouble, false);
parsing_passed = interpretLine<double, double>(file, zend_m, tmpDouble, false);
if (zend_m - tmpDouble2 > 1e-10) {
tmpDouble2 = zend_m;
} else if (parsing_passed) {
......@@ -124,7 +124,7 @@ void Astra1DDynamic::readMap() {
tmpDouble = zbegin_m - dz;
for (int i = 0; i < num_gridpz_m && parsing_passed; /* skip increment of i here */) {
parsing_passed = interpreteLine<double, double>(in, zvals[i], RealValues[i]);
parsing_passed = interpretLine<double, double>(in, zvals[i], RealValues[i]);
// the sequence of z-position should be strictly increasing
// drop sampling points that don't comply to this
if (zvals[i] - tmpDouble > 1e-10) {
......@@ -274,11 +274,11 @@ void Astra1DDynamic::getOnaxisEz(vector<pair<double, double> > & F) {
F.resize(num_gridpz_m);
ifstream in(Filename_m.c_str());
interpreteLine<std::string, int>(in, tmpString, tmpInt);
interpreteLine<double>(in, tmpDouble);
interpretLine<std::string, int>(in, tmpString, tmpInt);
interpretLine<double>(in, tmpDouble);
for (int i = 0; i < num_gridpz_m; ++ i) {
interpreteLine<double, double>(in, F[i].first, F[i].second);
interpretLine<double, double>(in, F[i].first, F[i].second);
if (std::abs(F[i].second) > Ez_max) {
Ez_max = std::abs(F[i].second);
}
......
......@@ -141,14 +141,14 @@ void Astra1DDynamic_fast::getOnaxisEz(std::vector<std::pair<double, double> > &
std::string tmpString;
std::ifstream in(Filename_m.c_str());
interpreteLine<std::string, int>(in, tmpString, tmpInt);
interpreteLine<double, double, int>(in, tmpDouble, tmpDouble, tmpInt);
interpreteLine<double>(in, tmpDouble);
interpreteLine<double, double, int>(in, tmpDouble, tmpDouble, tmpInt);
interpretLine<std::string, int>(in, tmpString, tmpInt);
interpretLine<double, double, int>(in, tmpDouble, tmpDouble, tmpInt);
interpretLine<double>(in, tmpDouble);
interpretLine<double, double, int>(in, tmpDouble, tmpDouble, tmpInt);
for(int i = 0; i < num_gridpz_m; ++ i) {
F[i].first = hz_m * i;
interpreteLine<double>(in, F[i].second);
interpretLine<double>(in, F[i].second);
if(fabs(F[i].second) > Ez_max) {
Ez_max = fabs(F[i].second);
}
......@@ -172,9 +172,9 @@ bool Astra1DDynamic_fast::readFileHeader(std::ifstream &file) {
bool passed = true;
try {
passed = interpreteLine<std::string, int>(file, tmpString, tmpInt);
passed = interpretLine<std::string, int>(file, tmpString, tmpInt);
} catch (GeneralClassicException &e) {
passed = interpreteLine<std::string, int, std::string>(file, tmpString, tmpInt, tmpString);
passed = interpretLine<std::string, int, std::string>(file, tmpString, tmpInt, tmpString);
tmpString = Util::toUpper(tmpString);
if (tmpString != "TRUE" &&
......@@ -186,7 +186,7 @@ bool Astra1DDynamic_fast::readFileHeader(std::ifstream &file) {
normalize_m = (tmpString == "TRUE");
}
passed = passed && interpreteLine<double>(file, frequency_m);
passed = passed && interpretLine<double>(file, frequency_m);
return passed;
}
......@@ -197,12 +197,12 @@ int Astra1DDynamic_fast::stripFileHeader(std::ifstream &file) {
int accuracy;
try {
interpreteLine<std::string, int>(file, tmpString, accuracy);
interpretLine<std::string, int>(file, tmpString, accuracy);
} catch (GeneralClassicException &e) {
interpreteLine<std::string, int, std::string>(file, tmpString, accuracy, tmpString);
interpretLine<std::string, int, std::string>(file, tmpString, accuracy, tmpString);
}
interpreteLine<double>(file, tmpDouble);
interpretLine<double>(file, tmpDouble);
return accuracy;
}
\ No newline at end of file
......@@ -31,9 +31,9 @@ Astra1DElectroStatic::Astra1DElectroStatic(std::string aFilename)
if(file.good()) {
bool parsing_passed = true;
try {
parsing_passed = interpreteLine<std::string, int>(file, tmpString, accuracy_m);
parsing_passed = interpretLine<std::string, int>(file, tmpString, accuracy_m);
} catch (GeneralClassicException &e) {
parsing_passed = interpreteLine<std::string, int, std::string>(file,
parsing_passed = interpretLine<std::string, int, std::string>(file,
tmpString,
accuracy_m,
tmpString);
......@@ -49,11 +49,11 @@ Astra1DElectroStatic::Astra1DElectroStatic(std::string aFilename)
}
parsing_passed = parsing_passed &&
interpreteLine<double, double>(file, zbegin_m, tmpDouble);
interpretLine<double, double>(file, zbegin_m, tmpDouble);
tmpDouble2 = zbegin_m;
while(!file.eof() && parsing_passed) {
parsing_passed = interpreteLine<double, double>(file, zend_m, tmpDouble, false);
parsing_passed = interpretLine<double, double>(file, zend_m, tmpDouble, false);
if(zend_m - tmpDouble2 > 1e-10) {
tmpDouble2 = zend_m;
} else if(parsing_passed) {
......@@ -113,7 +113,7 @@ void Astra1DElectroStatic::readMap() {
getLine(in, tmpString);
for(int i = 0; i < num_gridpz_m && parsing_passed; /* skip increment of i here */) {
parsing_passed = interpreteLine<double, double>(in, zvals[i], RealValues[i]);
parsing_passed = interpretLine<double, double>(in, zvals[i], RealValues[i]);
// the sequence of z-position should be strictly increasing
// drop sampling points that don't comply to this
if(zvals[i] - tmpDouble > 1e-10) {
......
......@@ -120,9 +120,9 @@ bool Astra1DElectroStatic_fast::readFileHeader(std::ifstream &file) {
bool passed;
try {
passed = interpreteLine<std::string, int>(file, tmpString, tmpInt);
passed = interpretLine<std::string, int>(file, tmpString, tmpInt);
} catch (GeneralClassicException &e) {
passed = interpreteLine<std::string, int, std::string>(file, tmpString, tmpInt, tmpString);
passed = interpretLine<std::string, int, std::string>(file, tmpString, tmpInt, tmpString);
tmpString = Util::toUpper(tmpString);
if (tmpString != "TRUE" &&
......@@ -142,9 +142,9 @@ int Astra1DElectroStatic_fast::stripFileHeader(std::ifstream &file) {
int accuracy;
try {
interpreteLine<std::string, int>(file, tmpString, accuracy);
interpretLine<std::string, int>(file, tmpString, accuracy);
} catch (GeneralClassicException &e) {
interpreteLine<std::string, int, std::string>(file, tmpString, accuracy, tmpString);
interpretLine<std::string, int, std::string>(file, tmpString, accuracy, tmpString);
}
return accuracy;
......
......@@ -32,9 +32,9 @@ Astra1DMagnetoStatic::Astra1DMagnetoStatic(std::string aFilename)
if(file.good()) {
bool parsing_passed = true;
try {
parsing_passed = interpreteLine<std::string, int>(file, tmpString, accuracy_m);
parsing_passed = interpretLine<std::string, int>(file, tmpString, accuracy_m);
} catch (GeneralClassicException &e) {
parsing_passed = interpreteLine<std::string, int, std::string>(file, tmpString, accuracy_m, tmpString);
parsing_passed = interpretLine<std::string, int, std::string>(file, tmpString, accuracy_m, tmpString);
tmpString = Util::toUpper(tmpString);
if (tmpString != "TRUE" &&
......@@ -46,11 +46,11 @@ Astra1DMagnetoStatic::Astra1DMagnetoStatic(std::string aFilename)
normalize_m = (tmpString == "TRUE");
}
parsing_passed = parsing_passed &&
interpreteLine<double, double>(file, zbegin_m, tmpDouble);
interpretLine<double, double>(file, zbegin_m, tmpDouble);
tmpDouble2 = zbegin_m;
while(!file.eof() && parsing_passed) {
parsing_passed = interpreteLine<double, double>(file, zend_m, tmpDouble, false);
parsing_passed = interpretLine<double, double>(file, zend_m, tmpDouble, false);
if(zend_m - tmpDouble2 > 1e-10) {
tmpDouble2 = zend_m;
} else if(parsing_passed) {
......@@ -109,7 +109,7 @@ void Astra1DMagnetoStatic::readMap() {
getLine(in, tmpString);
for(int i = 0; i < num_gridpz_m && parsing_passed;/* skip increment on i here */) {
parsing_passed = interpreteLine<double, double>(in, zvals[i], RealValues[i]);
parsing_passed = interpretLine<double, double>(in, zvals[i], RealValues[i]);
// the sequence of z-position should be strictly increasing
// drop sampling points that don't comply to this
if(zvals[i] - tmpDouble > 1e-10) {
......
......@@ -121,9 +121,9 @@ bool Astra1DMagnetoStatic_fast::readFileHeader(std::ifstream &file) {
bool passed;
try {
passed = interpreteLine<std::string, int>(file, tmpString, tmpInt);
passed = interpretLine<std::string, int>(file, tmpString, tmpInt);
} catch (GeneralClassicException &e) {
passed = interpreteLine<std::string, int, std::string>(file, tmpString, tmpInt, tmpString);
passed = interpretLine<std::string, int, std::string>(file, tmpString, tmpInt, tmpString);
tmpString = Util::toUpper(tmpString);
if (tmpString != "TRUE" &&
......@@ -143,9 +143,9 @@ int Astra1DMagnetoStatic_fast::stripFileHeader(std::ifstream &file) {
int accuracy;
try {
interpreteLine<std::string, int>(file, tmpString, accuracy);
interpretLine<std::string, int>(file, tmpString, accuracy);
} catch (GeneralClassicException &e) {
interpreteLine<std::string, int, std::string>(file, tmpString, accuracy, tmpString);
interpretLine<std::string, int, std::string>(file, tmpString, accuracy, tmpString);
}
return accuracy;
......
......@@ -40,11 +40,11 @@ void Astra1D_fast::getOnaxisEz(std::vector<std::pair<double, double> > & F)
bool Astra1D_fast::determineNumSamplingPoints(std::ifstream &file) {
double tmpDouble, tmpDouble2;
unsigned int skippedValues = 0;
bool passed = interpreteLine<double, double>(file, zbegin_m, tmpDouble);
bool passed = interpretLine<double, double>(file, zbegin_m, tmpDouble);
tmpDouble2 = zbegin_m;
while (!file.eof() && passed) {
passed = interpreteLine<double, double>(file, zend_m, tmpDouble, false);
passed = interpretLine<double, double>(file, zend_m, tmpDouble, false);
if (zend_m - tmpDouble2 > 1e-10) {
tmpDouble2 = zend_m;
} else if (passed) {
......@@ -64,7 +64,7 @@ double Astra1D_fast::readFieldData(std::ifstream &file) {
int nsp;
for (nsp = 0; nsp < num_gridpz_m; ) {
interpreteLine<double, double>(file, zvals_m[nsp], onAxisField_m[nsp]);
interpretLine<double, double>(file, zvals_m[nsp], onAxisField_m[nsp]);
if(zvals_m[nsp] - tmpDouble > 1e-10) {
if(std::abs(onAxisField_m[nsp]) > maxValue) {
......
......@@ -148,7 +148,7 @@ bool FM1DDynamic::checkFileData(std::ifstream &fieldFile, bool parsingPassed) {
double tempDouble;
for(int dataIndex = 0; dataIndex < numberOfGridPoints_m; ++ dataIndex)
parsingPassed = parsingPassed
&& interpreteLine<double>(fieldFile, tempDouble);
&& interpretLine<double>(fieldFile, tempDouble);
return parsingPassed && interpreteEOF(fieldFile);
......@@ -251,7 +251,7 @@ double FM1DDynamic::readFileData(std::ifstream &fieldFile, double fieldData[]) {
double maxEz = 0.0;
for(int dataIndex = 0; dataIndex < numberOfGridPoints_m; ++ dataIndex) {
interpreteLine<double>(fieldFile, fieldData[numberOfGridPoints_m
interpretLine<double>(fieldFile, fieldData[numberOfGridPoints_m
- 1 + dataIndex]);
if(std::abs(fieldData[numberOfGridPoints_m + dataIndex]) > maxEz)
maxEz = std::abs(fieldData[numberOfGridPoints_m + dataIndex]);
......@@ -278,7 +278,7 @@ double FM1DDynamic::readFileData(std::ifstream &fieldFile,
double deltaZ = (zEnd_m - zBegin_m) / (numberOfGridPoints_m - 1);
for(int dataIndex = 0; dataIndex < numberOfGridPoints_m; ++ dataIndex) {
eZ.at(dataIndex).first = deltaZ * dataIndex;
interpreteLine<double>(fieldFile, eZ.at(dataIndex).second);
interpretLine<double>(fieldFile, eZ.at(dataIndex).second);
if(std::abs(eZ.at(dataIndex).second) > maxEz)
maxEz = std::abs(eZ.at(dataIndex).second);
}
......@@ -296,11 +296,11 @@ bool FM1DDynamic::readFileHeader(std::ifstream &fieldFile) {
bool parsingPassed = true;
try {
parsingPassed = interpreteLine<std::string, int>(fieldFile,
parsingPassed = interpretLine<std::string, int>(fieldFile,
tempString,
accuracy_m);
} catch (GeneralClassicException &e) {
parsingPassed = interpreteLine<std::string, int, std::string>(fieldFile,
parsingPassed = interpretLine<std::string, int, std::string>(fieldFile,
tempString,
accuracy_m,
tempString);
......@@ -316,14 +316,14 @@ bool FM1DDynamic::readFileHeader(std::ifstream &fieldFile) {
}
parsingPassed = parsingPassed &&
interpreteLine<double, double, int>(fieldFile,
interpretLine<double, double, int>(fieldFile,
zBegin_m,
zEnd_m,
numberOfGridPoints_m);
parsingPassed = parsingPassed &&
interpreteLine<double>(fieldFile, frequency_m);
interpretLine<double>(fieldFile, frequency_m);
parsingPassed = parsingPassed &&
interpreteLine<double, double, int>(fieldFile,
interpretLine<double, double, int>(fieldFile,
rBegin_m,
rEnd_m,
tempInt);
......
......@@ -164,7 +164,7 @@ bool FM1DDynamic_fast::checkFileData(std::ifstream &fieldFile,
double tempDouble;
for (unsigned int dataIndex = 0; dataIndex < numberOfGridPoints_m; ++ dataIndex)
parsingPassed = parsingPassed
&& interpreteLine<double>(fieldFile, tempDouble);
&& interpretLine<double>(fieldFile, tempDouble);
return parsingPassed && interpreteEOF(fieldFile);
......@@ -340,7 +340,7 @@ double FM1DDynamic_fast::readFileData(std::ifstream &fieldFile,
double maxEz = 0.0;
for (unsigned int dataIndex = 0; dataIndex < numberOfGridPoints_m; ++ dataIndex) {
interpreteLine<double>(fieldFile, fieldData[dataIndex]);
interpretLine<double>(fieldFile, fieldData[dataIndex]);
if (std::abs(fieldData[dataIndex]) > maxEz)
maxEz = std::abs(fieldData[dataIndex]);
}
......@@ -358,7 +358,7 @@ double FM1DDynamic_fast::readFileData(std::ifstream &fieldFile,
double deltaZ = (zEnd_m - zBegin_m) / (numberOfGridPoints_m - 1);
for (unsigned int dataIndex = 0; dataIndex < numberOfGridPoints_m; ++ dataIndex) {
eZ.at(dataIndex).first = deltaZ * dataIndex;
interpreteLine<double>(fieldFile, eZ.at(dataIndex).second);
interpretLine<double>(fieldFile, eZ.at(dataIndex).second);
if (std::abs(eZ.at(dataIndex).second) > maxEz)
maxEz = std::abs(eZ.at(dataIndex).second);
}
......@@ -376,11 +376,11 @@ bool FM1DDynamic_fast::readFileHeader(std::ifstream &fieldFile) {
bool parsingPassed = true;
try {
parsingPassed = interpreteLine<std::string, unsigned int>(fieldFile,
parsingPassed = interpretLine<std::string, unsigned int>(fieldFile,
tempString,
accuracy_m);
} catch (GeneralClassicException &e) {
parsingPassed = interpreteLine<std::string, unsigned int, std::string>(fieldFile,
parsingPassed = interpretLine<std::string, unsigned int, std::string>(fieldFile,
tempString,
accuracy_m,
tempString);
......@@ -395,14 +395,14 @@ bool FM1DDynamic_fast::readFileHeader(std::ifstream &fieldFile) {
normalize_m = (tempString == "TRUE");
}
parsingPassed = parsingPassed &&
interpreteLine<double, double, unsigned int>(fieldFile,
interpretLine<double, double, unsigned int>(fieldFile,
zBegin_m,
zEnd_m,
numberOfGridPoints_m);
parsingPassed = parsingPassed &&
interpreteLine<double>(fieldFile, frequency_m);
interpretLine<double>(fieldFile, frequency_m);
parsingPassed = parsingPassed &&
interpreteLine<double, double, int>(fieldFile,
interpretLine<double, double, int>(fieldFile,
rBegin_m,
rEnd_m,
tempInt);
......
......@@ -135,7 +135,7 @@ bool FM1DElectroStatic::checkFileData(std::ifstream &fieldFile,
double tempDouble;
for (int dataIndex = 0; dataIndex < numberOfGridPoints_m; ++ dataIndex)
parsingPassed = parsingPassed
&& interpreteLine<double>(fieldFile, tempDouble);
&& interpretLine<double>(fieldFile, tempDouble);
return parsingPassed && interpreteEOF(fieldFile);
......@@ -225,7 +225,7 @@ double FM1DElectroStatic::readFileData(std::ifstream &fieldFile,
double maxEz = 0.0;
for (int dataIndex = 0; dataIndex < numberOfGridPoints_m; ++ dataIndex) {
interpreteLine<double>(fieldFile,
interpretLine<double>(fieldFile,
fieldData[numberOfGridPoints_m - 1 + dataIndex]);
if (std::abs(fieldData[numberOfGridPoints_m + dataIndex]) > maxEz)
maxEz = std::abs(fieldData[numberOfGridPoints_m + dataIndex]);
......@@ -252,11 +252,11 @@ bool FM1DElectroStatic::readFileHeader(std::ifstream &fieldFile) {
bool parsingPassed = true;
try {
parsingPassed = interpreteLine<std::string, int>(fieldFile,
parsingPassed = interpretLine<std::string, int>(fieldFile,
tempString,
accuracy_m);
} catch (GeneralClassicException &e) {
parsingPassed = interpreteLine<std::string, int, std::string>(fieldFile,
parsingPassed = interpretLine<std::string, int, std::string>(fieldFile,
tempString,
accuracy_m,
tempString);
......@@ -272,12 +272,12 @@ bool FM1DElectroStatic::readFileHeader(std::ifstream &fieldFile) {
}
parsingPassed = parsingPassed &&
interpreteLine<double, double, int>(fieldFile,
interpretLine<double, double, int>(fieldFile,
zBegin_m,
zEnd_m,
numberOfGridPoints_m);
parsingPassed = parsingPassed &&
interpreteLine<double, double, int>(fieldFile, rBegin_m,
interpretLine<double, double, int>(fieldFile, rBegin_m,
rEnd_m, tempInt);
++ numberOfGridPoints_m;
......
......@@ -153,7 +153,7 @@ bool FM1DElectroStatic_fast::checkFileData(std::ifstream &fieldFile,
double tempDouble;
for (unsigned int dataIndex = 0; dataIndex < numberOfGridPoints_m; ++ dataIndex)
parsingPassed = parsingPassed
&& interpreteLine<double>(fieldFile, tempDouble);
&& interpretLine<double>(fieldFile, tempDouble);
return parsingPassed && interpreteEOF(fieldFile);
......@@ -311,7 +311,7 @@ double FM1DElectroStatic_fast::readFileData(std::ifstream &fieldFile,
double maxEz = 0.0;
for (unsigned int dataIndex = 0; dataIndex < numberOfGridPoints_m; ++ dataIndex) {
interpreteLine<double>(fieldFile, fieldData[dataIndex]);
interpretLine<double>(fieldFile, fieldData[dataIndex]);
if (std::abs(fieldData[dataIndex]) > maxEz)
maxEz = std::abs(fieldData[dataIndex]);
}
......@@ -329,11 +329,11 @@ bool FM1DElectroStatic_fast::readFileHeader(std::ifstream &fieldFile) {
bool parsingPassed = true;
try {
parsingPassed = interpreteLine<std::string, unsigned int>(fieldFile,
parsingPassed = interpretLine<std::string, unsigned int>(fieldFile,
tempString,
accuracy_m);
} catch (GeneralClassicException &e) {
parsingPassed = interpreteLine<std::string, unsigned int, std::string>(fieldFile,
parsingPassed = interpretLine<std::string, unsigned int, std::string>(fieldFile,
tempString,
accuracy_m,
tempString);
......@@ -348,12 +348,12 @@ bool FM1DElectroStatic_fast::readFileHeader(std::ifstream &fieldFile) {
normalize_m = (tempString == "TRUE");
}
parsingPassed = parsingPassed &&
interpreteLine<double, double, unsigned int>(fieldFile,
interpretLine<double, double, unsigned int>(fieldFile,
zBegin_m,
zEnd_m,
numberOfGridPoints_m);
parsingPassed = parsingPassed &&
interpreteLine<double, double, int>(fieldFile,
interpretLine<double, double, int>(fieldFile,
rBegin_m,
rEnd_m,
tempInt);
......
......@@ -136,7 +136,7 @@ bool FM1DMagnetoStatic::checkFileData(std::ifstream &fieldFile,