Commit 5efa7eff authored by winklehner_d's avatar winklehner_d
Browse files

Small modification to account for cases where bz of main field is -1 and...

Small modification to account for cases where bz of main field is -1 and trimCoilThreshold_m is 0 as well. -DW
parent 4b5b5ef0
......@@ -392,8 +392,9 @@ bool Cyclotron::apply(const Vector_t &R, const Vector_t &P, const double &t, Vec
/* Bz */
double bz = - bzint;
if (std::abs(bz) > trimCoilThreshold_m)
//Changed from > to >= to include case where bz == 0 and trimCoilThreshold_m == 0 -DW
if (std::abs(bz) >= trimCoilThreshold_m)
applyTrimCoil(rad, R[2], &br, &bz);
else {
// make sure to have a smooth transition
......@@ -1533,4 +1534,4 @@ void Cyclotron::getFieldFromFile_Synchrocyclotron(const double &scaleFactor) {
void Cyclotron::getDimensions(double &zBegin, double &zEnd) const
{ }
#undef CHECK_CYC_FSCANF_EOF
\ No newline at end of file
#undef CHECK_CYC_FSCANF_EOF
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