From b8856584f4f34a4f29c37b4a2b432f6c813f330b Mon Sep 17 00:00:00 2001 From: Andreas Adelmann <andreas.adelmann@psi.ch> Date: Sun, 23 Jun 2024 00:41:51 +0200 Subject: [PATCH] small fixes --- src/AbsBeamline/Probe.cpp | 4 ++-- src/AbsBeamline/Ring.cpp | 2 +- src/PartBunch/#[-Wunused-variable]# | 2 ++ src/Structure/H5PartWrapper.cpp | 6 +++--- 4 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 src/PartBunch/#[-Wunused-variable]# diff --git a/src/AbsBeamline/Probe.cpp b/src/AbsBeamline/Probe.cpp index 0304b6cf9..12dab2d04 100644 --- a/src/AbsBeamline/Probe.cpp +++ b/src/AbsBeamline/Probe.cpp @@ -99,8 +99,8 @@ bool Probe::doCheck(PartBunch_t* bunch, const int turnnumber, const double t, co // dist1 > 0, right hand, dt > 0; dist1 < 0, left hand, dt < 0 double dist1 = (A_m * bunch->R(i)(0) + B_m * bunch->R(i)(1) + C_m) / R_m; // [m] double dist2 = dist1 * std::sqrt(1.0 + 1.0 / tangle / tangle); - double dt = - dist2 / (std::sqrt(1.0 - 1.0 / (1.0 + dot(bunch->P(i), bunch->P(i)))) * Physics::c); + //double dt = + // dist2 / (std::sqrt(1.0 - 1.0 / (1.0 + dot(bunch->P(i), bunch->P(i)))) * Physics::c); // ADA probepoint = bunch->R(i) + dist2 * bunch->P(i) / euclidean_norm(bunch->P(i)); probepoint = bunch->R(i) + dist2 * bunch->P(i) / std::sqrt(dot(bunch->P(i), bunch->P(i))); diff --git a/src/AbsBeamline/Ring.cpp b/src/AbsBeamline/Ring.cpp index 77e61b6a2..5c8c5d664 100644 --- a/src/AbsBeamline/Ring.cpp +++ b/src/AbsBeamline/Ring.cpp @@ -125,7 +125,7 @@ bool Ring::apply( const double Q = Qview(id); const double M = Mview(id); - const short int Bin = Binview(id); + // const short int Bin = Binview(id); gmsgALL << getName() << ": particle " << id << " at " << R << " m out of the field map boundary" << endl; diff --git a/src/PartBunch/#[-Wunused-variable]# b/src/PartBunch/#[-Wunused-variable]# new file mode 100644 index 000000000..091276e8d --- /dev/null +++ b/src/PartBunch/#[-Wunused-variable]# @@ -0,0 +1,2 @@ + 499 | int tag = 101; + \ No newline at end of file diff --git a/src/Structure/H5PartWrapper.cpp b/src/Structure/H5PartWrapper.cpp index 212567b61..4180ea11f 100644 --- a/src/Structure/H5PartWrapper.cpp +++ b/src/Structure/H5PartWrapper.cpp @@ -484,7 +484,7 @@ void H5PartWrapper::copyStepData(h5_file_t source) { void H5PartWrapper::sendFailureMessage( bool failed, const std::string& where, const std::string& what) { - int tag = 101; + // int tag = 101; /* \todo Message* mess = new Message(); putMessage(*mess, failed); Ippl::Comm->broadcast_all(mess, tag); @@ -496,8 +496,8 @@ void H5PartWrapper::sendFailureMessage( void H5PartWrapper::receiveFailureMessage( int sourceNode, const std::string& where, const std::string& what) { - int tag = 101; - bool failed; + // int tag = 101; + bool failed=false; /* \todo Message* mess = Ippl::Comm->receive_block(sourceNode, tag); getMessage(*mess, failed); -- GitLab