Commit c9ca8ac2 authored by kraus's avatar kraus
Browse files

Merge branch 'master' of gitlab.psi.ch:OPAL/src

parents e7ba95a3 2bf2fb40
......@@ -75,13 +75,13 @@
#include "Physics/Physics.h"
#include "Utilities/OpalException.h"
#include "Utilities/Options.h"
#include "BasicActions/DumpFields.h"
#include "BasicActions/DumpEMFields.h"
#include "Structure/H5PartWrapperForPC.h"
#include "Structure/BoundaryGeometry.h"
#include "Utilities/Options.h"
#include "Ctunes.h"
#include <cassert>
......@@ -462,11 +462,11 @@ void ParallelCyclotronTracker::visitCyclotron(const Cyclotron &cycl) {
if(insqrt > -1.0e-10) {
referencePt = 0.0;
referencePt = 0.0;
} else {
throw OpalException("Error in ParallelCyclotronTracker::visitCyclotron",
throw OpalException("Error in ParallelCyclotronTracker::visitCyclotron",
"Pt imaginary!");
}
......@@ -773,10 +773,6 @@ void ParallelCyclotronTracker::visitProbe(const Probe &prob) {
double yend = elptr->getYend();
*gmsg << "YEnd= " << yend << " [mm]" << endl;
double width = elptr->getWidth();
*gmsg << "Width= " << width << " [mm]" << endl;
// initialise, do nothing
elptr->initialise(itsBunch_m);
......@@ -786,7 +782,7 @@ void ParallelCyclotronTracker::visitProbe(const Probe &prob) {
BcParameter[1] = 0.001 * xend;
BcParameter[2] = 0.001 * ystart ;
BcParameter[3] = 0.001 * yend;
BcParameter[4] = 0.001 * width ;
BcParameter[4] = 0.001 ; // width
// store probe parameters in the list
buildupFieldList(BcParameter, ElementBase::PROBE, elptr);
......@@ -1077,9 +1073,6 @@ void ParallelCyclotronTracker::visitStripper(const Stripper &stripper) {
double yend = elptr->getYend();
*gmsg << "YEnd= " << yend << " [mm]" << endl;
double width = elptr->getWidth();
*gmsg << "Width= " << width << " [mm]" << endl;
double opcharge = elptr->getOPCharge();
*gmsg << "Charge of outcoming particle = +e * " << opcharge << endl;
......@@ -1094,7 +1087,7 @@ void ParallelCyclotronTracker::visitStripper(const Stripper &stripper) {
BcParameter[1] = 0.001 * xend;
BcParameter[2] = 0.001 * ystart ;
BcParameter[3] = 0.001 * yend;
BcParameter[4] = 0.001 * width ;
BcParameter[4] = 0.001; // width
BcParameter[5] = opcharge;
BcParameter[6] = opmass;
......@@ -1222,9 +1215,8 @@ void ParallelCyclotronTracker::execute() {
*gmsg << "* Multiple time stepping (MTS) integrator" << endl;
break;
case stepper::INTEGRATOR::UNDEFINED:
itsStepper_mp.reset(nullptr);
// continue here and throw exception
default:
itsStepper_mp.reset(nullptr);
throw OpalException("ParallelCyclotronTracker::execute",
"Invalid name of TIMEINTEGRATOR in Track command");
}
......@@ -1996,8 +1988,8 @@ inline void ParallelCyclotronTracker::rotateAroundX(ParticleAttrib<Vector_t> & p
// Clockwise rotation of particles 'particleVectors' by 'psi' around X axis
Tenzor<double, 3> const rotation(1, 0, 0,
0, cos(psi), sin(psi),
0, -sin(psi), cos(psi));
0, cos(psi), sin(psi),
0, -sin(psi), cos(psi));
for(unsigned int i = 0; i < itsBunch_m->getLocalNum(); ++i) {
......@@ -2009,8 +2001,8 @@ inline void ParallelCyclotronTracker::rotateAroundX(Vector_t & myVector, double
// Clockwise rotation of single vector 'myVector' by 'psi' around X axis
Tenzor<double, 3> const rotation(1, 0, 0,
0, cos(psi), sin(psi),
0, -sin(psi), cos(psi));
0, cos(psi), sin(psi),
0, -sin(psi), cos(psi));
myVector = dot(rotation, myVector);
}
......@@ -2034,9 +2026,9 @@ inline void ParallelCyclotronTracker::getQuaternionTwoVectors(Vector_t u, Vector
resultVectorComponent = cross(u, xaxis);
// If by chance u is parallel to xaxis, use zaxis instead
if (dot(resultVectorComponent, resultVectorComponent) < tolerance2) {
if (dot(resultVectorComponent, resultVectorComponent) < tolerance2) {
resultVectorComponent = cross(u, zaxis);
resultVectorComponent = cross(u, zaxis);
}
double halfAngle = 0.5 * pi;
......@@ -2164,12 +2156,10 @@ void ParallelCyclotronTracker::borisExternalFields(double h) {
push(0.5 * h);
// apply the plugin elements: probe, collimator, stripper, septum
//itsBunch_m->R *= Vector_t(1000.0); // applyPluginElements expects [R] = mm
applyPluginElements(h);
// destroy particles if they are marked as Bin=-1 in the plugin elements or out of global apeture
bool const flagNeedUpdate = deleteParticle();
//itsBunch_m->R *= Vector_t(0.001);
if(itsBunch_m->weHaveBins() && flagNeedUpdate) itsBunch_m->resetPartBinID2(eta_m);
}
......@@ -2208,7 +2198,6 @@ void ParallelCyclotronTracker::applyPluginElements(const double dt) {
}
itsBunch_m->R *= Vector_t(0.001);
}
bool ParallelCyclotronTracker::deleteParticle(){
......@@ -2290,7 +2279,7 @@ void ParallelCyclotronTracker::initDistInGlobalFrame() {
double const initialReferenceTheta = referenceTheta * Physics::deg2rad;
PathLength_m = 0.0;
// TODO: Replace with TracerParticle
// TODO: Replace with TracerParticle
// Force the initial phase space values of the particle with ID = 0 to zero,
// to set it as a reference particle.
if(initialTotalNum_m > 2) {
......@@ -2305,7 +2294,7 @@ void ParallelCyclotronTracker::initDistInGlobalFrame() {
// Initialize global R
//itsBunch_m->R *= Vector_t(1000.0); // m --> mm
// NEW OPAL 2.0: Immediately change to m -DW
// NEW OPAL 2.0: Immediately change to m -DW
Vector_t const initMeanR = Vector_t(0.001 * referenceR * cosRefTheta_m, // mm --> m
0.001 * referenceR * sinRefTheta_m, // mm --> m
0.001 * referenceZ); // mm --> m
......@@ -2602,7 +2591,7 @@ void ParallelCyclotronTracker::bunchDumpStatData(){
if (Options::psDumpFrame == Options::BUNCH_MEAN) {
meanR = calcMeanR();
meanP = calcMeanP();
} else {
} else if (itsBunch_m->getLocalNum() > 0) {
meanR = itsBunch_m->R[0];
meanP = itsBunch_m->P[0];
}
......@@ -2674,7 +2663,7 @@ void ParallelCyclotronTracker::bunchDumpPhaseSpaceData() {
if (Options::psDumpFrame == Options::BUNCH_MEAN || multiBunchMode_m != MB_MODE::NONE ) {
meanR = calcMeanR();
meanP = calcMeanP();
} else {
} else if (itsBunch_m->getLocalNum() > 0) {
meanR = itsBunch_m->R[0];
meanP = itsBunch_m->P[0];
}
......@@ -2791,16 +2780,20 @@ void ParallelCyclotronTracker::update_m(double& t, const double& dt,
const bool& dumpEachTurn)
{
// Reference parameters
t += dt;
itsBunch_m->setT(t * 1.0e-9);
itsBunch_m->setLocalTrackStep((step_m + 1));
if (!(step_m + 1 % 1000))
*gmsg << "Step " << step_m + 1 << endl;
if (itsBunch_m->getLocalNum() == 0) return;
double tempP2 = dot(itsBunch_m->P[0], itsBunch_m->P[0]);
double tempGamma = sqrt(1.0 + tempP2);
double tempBeta = sqrt(tempP2) / tempGamma;
PathLength_m += c_mmtns * dt / 1000.0 * tempBeta; // unit: m
t += dt;
itsBunch_m->setT(t * 1.0e-9);
itsBunch_m->setLPath(PathLength_m);
itsBunch_m->setLocalTrackStep((step_m + 1)); // TEMP moved this here from inside if statement below -DW
// Here is global frame, don't do itsBunch_m->boundp();
......@@ -2821,9 +2814,6 @@ void ParallelCyclotronTracker::update_m(double& t, const double& dt,
bunchDumpStatData();
}
}
if (!(step_m + 1 % 1000))
*gmsg << "Step " << step_m + 1 << endl;
}
......@@ -2966,11 +2956,7 @@ void ParallelCyclotronTracker::finalizeTracking_m(dvector_t& Ttime,
closeFiles();
// no break, continue here!
}
case MODE::BUNCH:
{
// we do nothing
// no break, continue here!
}
case MODE::BUNCH: // we do nothing
case MODE::UNDEFINED:
default:
{
......@@ -2991,17 +2977,10 @@ void ParallelCyclotronTracker::finalizeTracking_m(dvector_t& Ttime,
*gmsg << endl << "* *********************** Bunch information in global frame: ***********************";
if (itsBunch_m->getTotalNum() > 0){
// Print out the Bunch information at end of the run. Because the bunch information
// displays in units of m we have to change back and forth one more time.
// Furthermore it is my opinion that the same units should be used throughout OPAL. -DW
//itsBunch_m->R *= Vector_t(0.001); // mm --> m
// Print out the Bunch information at end of the run.
itsBunch_m->calcBeamParameters();
*gmsg << *itsBunch_m << endl;
//itsBunch_m->R *= Vector_t(1000.0); // m --> mm
} else {
*gmsg << endl << "* No Particles left in bunch!" << endl;
......@@ -3073,10 +3052,12 @@ void ParallelCyclotronTracker::singleMode_m(double& t, const double dt,
// apply the plugin elements: probe, collimator, stripper, septum
applyPluginElements(dt);
// check if we loose particles at the boundary
// check if we lose particles at the boundary
bgf_main_collision_test();
// ********************************************************************************** //
if (itsBunch_m->getLocalNum() == 0) return; // might happen if particle is in collimator
IpplTimings::startTimer(IntegrationTimer_m);
unsigned int i = 0; // we only have a single particle
......@@ -3178,7 +3159,7 @@ void ParallelCyclotronTracker::bunchMode_m(double& t, const double dt, bool& dum
// Apply the plugin elements: probe, collimator, stripper, septum
applyPluginElements(dt);
// check if we loose particles at the boundary
// check if we lose particles at the boundary
bgf_main_collision_test();
IpplTimings::startTimer(IntegrationTimer_m);
......
......@@ -227,7 +227,7 @@ Option::Option():
("BOUNDPDESTROYFQ", "The frequency to do boundp_destroy to delete lost particles. Default 10",10.0);
itsAttr[BEAMHALOBOUNDARY] = Attributes::makeReal
("BEAMHALOBOUNDARY", "Defines in therms of sigma where the halo starts. Default 0.0",0.0);
("BEAMHALOBOUNDARY", "Defines in terms of sigma where the halo starts. Default 0.0",0.0);
itsAttr[IDEALIZED] = Attributes::makeBool
("IDEALIZED", "Using the hard edge model for the calculation of path length. Default: false", false);
......
......@@ -108,7 +108,7 @@ bool CCollimator::checkCollimator(Vector_t r, Vector_t rmin, Vector_t rmax) {
}
// rectangle collimators in cyclotron cyclindral coordinates
// rectangle collimators in cyclotron cylindrical coordinates
// without particlematterinteraction, the particle hitting collimator is deleted directly
bool CCollimator::checkCollimator(PartBunchBase<double, 3> *bunch, const int turnnumber, const double t, const double tstep) {
......@@ -132,12 +132,12 @@ bool CCollimator::checkCollimator(PartBunchBase<double, 3> *bunch, const int tur
for (unsigned int i = 0; i < tempnum; ++i) {
if (bunch->PType[i] == ParticleType::REGULAR && bunch->R[i](2) < zend_m && bunch->R[i](2) > zstart_m ) {
pflag = checkPoint(bunch->R[i](0), bunch->R[i](1));
/// bunch->Bin[i] != -1 makes sure the partcile is not stored in more than one collimator
/// bunch->Bin[i] != -1 makes sure the particle is not stored in more than one collimator
if ((pflag != 0) && (bunch->Bin[i] != -1)) {
if (!parmatint_m)
lossDs_m->addParticle(bunch->R[i], bunch->P[i], bunch->ID[i]);
bunch->Bin[i] = -1;
flagNeedUpdate = true;
if (!parmatint_m)
lossDs_m->addParticle(bunch->R[i], bunch->P[i], bunch->ID[i]);
bunch->Bin[i] = -1;
flagNeedUpdate = true;
}
}
}
......
......@@ -396,6 +396,7 @@ bool Cyclotron::apply(const Vector_t &R, const Vector_t &P, const double &t, Vec
if (std::abs(bz) > trimCoilThreshold_m)
applyTrimCoil(rad, R[2], &br, &bz);
else {
// make sure to have a smooth transition
double tmp_bz = 0.0;
applyTrimCoil(rad, R[2], &br, &tmp_bz);
bz += tmp_bz * std::abs(bz) / trimCoilThreshold_m;
......@@ -435,9 +436,9 @@ bool Cyclotron::apply(const Vector_t &R, const Vector_t &P, const double &t, Vec
(*fi)->getFieldDimensions(xBegin, xEnd, yBegin, yEnd, zBegin, zEnd);
bool SuperPose = *superposei;
if (fcount > 0 && !SuperPose) {
if (fcount > 0 && SuperPose == false) {
//INFOMSG ("Field maps taken : " << fcount << "Superpose false" << endl);
break;
continue;
}
// Ok, this is a total patch job, but now that the internal cyclotron units are in m, we have to
......
......@@ -39,7 +39,7 @@ Probe::Probe():
filename_m(""),
position_m(0.0),
step_m(0.0){
setDimensions(0.0, 0.0, 0.0, 0.0, 0.0);
setDimensions(0.0, 0.0, 0.0, 0.0);
}
......@@ -48,7 +48,7 @@ Probe::Probe(const Probe &right):
filename_m(right.filename_m),
position_m(right.position_m),
step_m(right.step_m){
setDimensions(right.xstart_m, right.xend_m, right.ystart_m, right.yend_m, right.width_m);
setDimensions(right.xstart_m, right.xend_m, right.ystart_m, right.yend_m);
}
......@@ -57,7 +57,7 @@ Probe::Probe(const std::string &name):
filename_m(""),
position_m(0.0),
step_m(0.0){
setDimensions(0.0, 0.0, 0.0, 0.0, 0.0);
setDimensions(0.0, 0.0, 0.0, 0.0);
}
Probe::~Probe() {}
......@@ -103,12 +103,11 @@ void Probe::goOffline() {
lossDs_m->save();
}
void Probe::setDimensions(double xstart, double xend, double ystart, double yend, double width) {
void Probe::setDimensions(double xstart, double xend, double ystart, double yend) {
xstart_m = xstart;
ystart_m = ystart;
xend_m = xend;
yend_m = yend;
width_m = width;
rstart_m = std::sqrt(xstart*xstart + ystart * ystart);
rend_m = std::sqrt(xend * xend + yend * yend);
// start position is the one with lowest radius
......@@ -144,10 +143,6 @@ double Probe::getYend() const {
return yend_m;
}
double Probe::getWidth() const {
return width_m;
}
double Probe::getStep() const {
return step_m;
}
......@@ -179,7 +174,7 @@ void Probe::setGeom(const double dist) {
geom_m[4].y = geom_m[0].y;
}
bool Probe::checkProbe(PartBunchBase<double, 3> *bunch, const int turnnumber, const double t, const double tstep) {
bool Probe::checkProbe(PartBunchBase<double, 3> *bunch, const int turnnumber, const double t, const double tstep) {
bool flagprobed = false;
Vector_t rmin, rmax, probepoint;
......@@ -200,6 +195,7 @@ bool Probe::checkProbe(PartBunchBase<double, 3> *bunch, const int turnnumber, c
reduce(meanP, meanP, OpAddAssign());
meanP = meanP / Vector_t(bunch->getTotalNum());
// change probe width depending on step size and angle of particle
double sk1, sk2, stangle = 0.0;
if ( B_m == 0.0 ){
sk1 = meanP(1)/meanP(0);
......@@ -218,7 +214,6 @@ bool Probe::checkProbe(PartBunchBase<double, 3> *bunch, const int turnnumber, c
sk2 = - A_m/B_m;
stangle = std::abs(( sk1-sk2 )/(1 + sk1*sk2));
}
// change probe width depending on step size on angle of particle
double lstep = (sqrt(1.0-1.0/(1.0+dot(meanP, meanP))) * Physics::c) * tstep*1.0e-6; // [mm]
double Swidth = lstep / sqrt( 1 + 1/stangle/stangle );
setGeom(Swidth);
......@@ -254,7 +249,7 @@ bool Probe::checkProbe(PartBunchBase<double, 3> *bunch, const int turnnumber, c
probepoint(2) = bunch->R[i](2);
lossDs_m->addParticle(probepoint, bunch->P[i], bunch->ID[i], t+dt, turnnumber);
flagprobed = true;
peakfinder_m->addParticle(bunch->R[i]);
}
}
......
......@@ -60,7 +60,7 @@ public:
virtual void goOffline();
/// Set dimensions and consistency checks
void setDimensions(double xstart, double xend, double ystart, double yend, double width);
void setDimensions(double xstart, double xend, double ystart, double yend);
void setStep(double step);
......@@ -70,7 +70,6 @@ public:
virtual double getYstart() const;
virtual double getYend() const;
virtual double getWidth() const;
virtual double getStep() const;
bool checkProbe(PartBunchBase<double, 3> *bunch, const int turnnumber, const double t, const double tstep);
......@@ -89,7 +88,6 @@ private:
double rstart_m;
double rend_m;
///@}
double width_m; ///< bin width, not used
Point geom_m[5]; ///< actual geometry positions with adaptive width such that each particle hits probe once per turn
double step_m; ///< Step size of the probe (bin width in histogram file)
......
......@@ -43,7 +43,7 @@ Stripper::Stripper():
opyield_m(1.0),
stop_m(true),
step_m(0) {
setDimensions(0.0, 0.0, 0.0, 0.0, 0.0);
setDimensions(0.0, 0.0, 0.0, 0.0);
}
......@@ -56,7 +56,7 @@ Stripper::Stripper(const Stripper &right):
opyield_m(right.opyield_m),
stop_m(right.stop_m),
step_m(right.step_m) {
setDimensions(right.xstart_m, right.xend_m, right.ystart_m, right.yend_m, right.width_m);
setDimensions(right.xstart_m, right.xend_m, right.ystart_m, right.yend_m);
}
......@@ -69,7 +69,7 @@ Stripper::Stripper(const std::string &name):
opyield_m(1.0),
stop_m(true),
step_m(0){
setDimensions(0.0, 0.0, 0.0, 0.0, 0.0);
setDimensions(0.0, 0.0, 0.0, 0.0);
}
void Stripper::setGeom(const double dist) {
......@@ -137,12 +137,11 @@ void Stripper::goOffline() {
lossDs_m->save();
}
void Stripper::setDimensions(double xstart, double xend, double ystart, double yend, double width) {
void Stripper::setDimensions(double xstart, double xend, double ystart, double yend) {
xstart_m = xstart;
ystart_m = ystart;
xend_m = xend;
yend_m = yend;
width_m = width;
rstart_m = std::sqrt(xstart*xstart + ystart * ystart);
rend_m = std::sqrt(xend * xend + yend * yend);
// start position is the one with lowest radius
......@@ -190,9 +189,6 @@ double Stripper::getYstart() const {
double Stripper::getYend() const {
return yend_m;
}
double Stripper::getWidth() const {
return width_m;
}
double Stripper::getOPCharge() const {
return opcharge_m;
......
......@@ -52,7 +52,7 @@ public:
virtual void goOffline();
/// Set dimensions and consistency checks
void setDimensions(double xstart, double xend, double ystart, double yend, double width);
void setDimensions(double xstart, double xend, double ystart, double yend);
virtual double getXstart() const;
......@@ -71,9 +71,6 @@ public:
void setOPYield(double yield);
virtual double getOPYield() const;
void setWidth(double width);
virtual double getWidth() const;
void setStop(bool stopflag);
virtual bool getStop() const;
......@@ -93,7 +90,6 @@ private:
double yend_m;
double rstart_m;
double rend_m;
double width_m;
///@}
double opcharge_m;
double opmass_m;
......
......@@ -92,8 +92,6 @@ namespace {
CollimatorPhysics::CollimatorPhysics(const std::string &name, ElementBase *element, std::string &material):
ParticleMatterInteractionHandler(name, element),
// :FIXME: unused
//allParticlesIn_m(false),
T_m(0.0),
dT_m(0.0),
material_m(material),
......@@ -197,6 +195,7 @@ void CollimatorPhysics::doPhysics(PartBunchBase<double, 3> *bunch) {
double Eng = (sqrt(1.0 + dot(P, P)) - 1) * m_p;
if (locParts_m[i].label != -1) {
if (tester->checkHit(R, P, dT_m)) {
bool pdead = EnergyLoss(Eng, dT_m);
if (!pdead) {
......@@ -210,7 +209,7 @@ void CollimatorPhysics::doPhysics(PartBunchBase<double, 3> *bunch) {
// INFOMSG("final energy: " << (sqrt(1.0 + dot(P, P)) - 1) * m_p /1000 << " MeV" <<endl);
CoulombScat(R, P, dT_m);
} else {
// The particle is stopped in the material, set lable_m to -1
// The particle is stopped in the material, set label to -1
locParts_m[i].label = -1.0;
stoppedPartStat_m++;
lossDs_m->addParticle(R, P, -locParts_m[i].IDincol);
......@@ -292,13 +291,13 @@ void CollimatorPhysics::apply(PartBunchBase<double, 3> *bunch,
Particles that have entered material are flagged as Bin[i] == -1.
Fixme: should use PType
Flagged particles are copied to a local structue within Collimator Physics locParts_m.
Flagged particles are copied to a local structure within Collimator Physics locParts_m.
Particles in that structure will be pushed in the material and either come
back to the bunch or will be fully stopped in the material. For the push in the
material we use sub-timesteps.
Newely entered particles will be copied to locParts_m at the end of apply.
Newly entered particles will be copied to locParts_m at the end of apply.
*/
Eavg_m = 0.0;
......@@ -316,7 +315,7 @@ void CollimatorPhysics::apply(PartBunchBase<double, 3> *bunch,
T_m = bunch->getT();
/*
Because this is not propper set in the Component class when calling in the Constructor
Because this is not properly set in the Component class when calling in the Constructor
*/
#ifdef OPAL_DKS
......@@ -387,7 +386,7 @@ void CollimatorPhysics::apply(PartBunchBase<double, 3> *bunch,
IpplTimings::stopTimer(DegraderLoopTimer_m);
if (onlyOneLoopOverParticles)
copyFromBunchDKS(bunch, boundingSphere);
copyFromBunchDKS(bunch, boundingSphere);
T_m += dT_m;
......@@ -470,7 +469,6 @@ void CollimatorPhysics::apply(PartBunchBase<double, 3> *bunch,
} else {
onlyOneLoopOverParticles = true;
}
} while (onlyOneLoopOverParticles == false);
#endif
......@@ -834,7 +832,7 @@ void CollimatorPhysics::addBackToBunch(PartBunchBase<double, 3> *bunch, unsigned
/*
This particle is back to the bunch, by set
ting the lable to -1.0
ting the label to -1.0
the particle will be deleted.
*/
locParts_m[i].label = -1.0;
......@@ -868,7 +866,7 @@ void CollimatorPhysics::copyFromBunch(PartBunchBase<double, 3> *bunch,
tester = new FlexCollimatorInsideTester(element_ref_m);
break;
default:
throw OpalException("CollimatorPhysics::doPhysics",
throw OpalException("CollimatorPhysics::copyFromBunch",
"Unsupported element type");
}
......@@ -890,7 +888,7 @@ void CollimatorPhysics::copyFromBunch(PartBunchBase<double, 3> *bunch,
x.Qincol = bunch->Q[i];
x.Bfincol = bunch->Bf[i];
x.Efincol = bunch->Ef[i];
x.label = 0; // allive in matter
x.label = 0; // alive in matter
locParts_m.push_back(x);
ne++;
......@@ -1055,7 +1053,7 @@ void CollimatorPhysics::addBackToBunchDKS(PartBunchBase<double, 3> *bunch, unsig
}
void CollimatorPhysics::copyFromBunchDKS(PartBunchBase<double, 3> *bunch,
const std::pair<Vector_t, double> &boundingSphere)
const std::pair<Vector_t, double> &boundingSphere)
{
const size_t nL = bunch->getLocalNum();
if (nL == 0) return;
......@@ -1080,7 +1078,7 @@ void CollimatorPhysics::copyFromBunchDKS(PartBunchBase<double, 3> *bunch,
tester = new FlexCollimatorInsideTester(element_ref_m);
break;
default:
throw OpalException("CollimatorPhysics::doPhysics",
throw OpalException("CollimatorPhysics::copyFromBunchDKS",
"Unsupported element type");
}
......@@ -1103,7 +1101,7 @@ void CollimatorPhysics::copyFromBunchDKS(PartBunchBase<double, 3> *bunch,
x.Qincol = bunch->Q[i];
x.Bfincol = bunch->Bf[i];
x.Efincol = bunch->Ef[i];
x.label = 0; // allive in matter
x.label = 0; // alive in matter
PART_DKS x_gpu;
x_gpu.label = x.label;
......@@ -1130,7 +1128,7 @@ void CollimatorPhysics::copyFromBunchDKS(PartBunchBase<double, 3> *bunch,
}
void CollimatorPhysics::setupCollimatorDKS(PartBunchBase<double, 3>