fixing frequency of traveling wave structures; fixing error messages

parent 48e2cee8
......@@ -43,7 +43,6 @@ TravelingWave::TravelingWave():
phaseCore2_m(0.0),
phaseExit_m(0.0),
phaseError_m(0.0),
frequency_m(0.0),
length_m(0.0),
startCoreField_m(0.0),
startExitField_m(0.0),
......@@ -70,7 +69,6 @@ TravelingWave::TravelingWave(const TravelingWave &right):
phaseCore2_m(right.phaseCore2_m),
phaseExit_m(right.phaseExit_m),
phaseError_m(right.phaseError_m),
frequency_m(right.frequency_m),
length_m(right.length_m),
startCoreField_m(right.startCoreField_m),
startExitField_m(right.startExitField_m),
......@@ -97,7 +95,6 @@ TravelingWave::TravelingWave(const std::string &name):
phaseCore2_m(0.0),
phaseExit_m(0.0),
phaseError_m(0.0),
frequency_m(0.0),
length_m(0.0),
startCoreField_m(0.0),
startExitField_m(0.0),
......@@ -375,6 +372,7 @@ void TravelingWave::initialise(PartBunchBase<double, 3> *bunch, double &startFie
<< frequency_m / two_pi * 1e-6 << " MHz <> "
<< CoreFieldmap_m->getFrequency() / two_pi * 1e-6 << " MHz; TAKE ON THE LATTER\n";
std::string errormsg_str = Fieldmap::typeset_msg(errormsg.str(), "warning");
*gmsg << errormsg_str << endl;
ERRORMSG(errormsg_str << "\n" << endl);
if(Ippl::myNode() == 0) {
std::ofstream omsg("errormsg.txt", std::ios_base::app);
......
......@@ -113,8 +113,6 @@ private:
double phaseExit_m;
double phaseError_m;
double frequency_m; /**< Read in frequency of time varying field(MHz)*/
double length_m;
double startCoreField_m; /**< starting point of field(m)*/
double startExitField_m;
......
......@@ -665,9 +665,7 @@ std::string Fieldmap::typeset_msg(const std::string &msg, const std::string &tit
while(remaining_length > 0) {
size_t eol = msg.find("\n", current_position);
std::string next_to_process;
if(eol + 1 == msg.length()) {
break;
} else if(eol != std::string::npos) {
if(eol != std::string::npos) {
next_to_process = msg.substr(current_position, eol - current_position);
} else {
next_to_process = msg.substr(current_position);
......@@ -697,7 +695,6 @@ std::string Fieldmap::typeset_msg(const std::string &msg, const std::string &tit
current_position = eol + 1;
remaining_length = msg.length() - current_position;
}
return_string += frame;
return return_string;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment