Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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
  • winklehner_d @winklehner_d ·
    Author Developer

    Ok, don't know why it changet my 0 to -1 :) Should say cases where both main field Bz and trimCoilThreshold are 0 This is the case for my spiral inflector simulations, because I use a zero midplane field and supply the magnetic field of the cyclotron as 3D field. If the particles start outside of the 3D field, there is no Bz... -Daniel

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment