20 template <
typename FieldFunction,
typename ... Arguments>
25 Arguments& ... args)
const
27 bool flagNoDeletion =
true;
30 push_m(bunch->
R[i], bunch->
P[i], 0.5 * dt * 1.0e-9);
32 flagNoDeletion = kick_m(bunch, i, t, dt * 1.0e-9, args ...);
35 push_m(bunch->
R[i], bunch->
P[i], 0.5 * dt * 1.0e-9);
37 return flagNoDeletion;
41 template <
typename FieldFunction,
typename ... Arguments>
43 const double& h)
const
45 double const gamma =
sqrt(1.0 +
dot(P, P));
52 template <
typename FieldFunction,
typename ... Arguments>
54 const double& t,
const double& h,
55 Arguments& ... args)
const
60 bool outOfBound = this->fieldfunc_m(t, i, externalE, externalB, args ...);
67 double const M = bunch->
M[0] * 1.0e9;
71 pusher.
kick(bunch->
R[i], bunch->
P[i],
Tps< T > sqrt(const Tps< T > &x)
Square root.
double dot(const Vector3D &lhs, const Vector3D &rhs)
Vector dot product.
constexpr double q_e
The elementary charge in As.
constexpr double c
The velocity of light in m/s.
ParticleAttrib< double > M
ParticleAttrib< Vector_t > P
ParticleAttrib< double > Q
void kick(const Vector_t &R, Vector_t &P, const Vector_t &Ef, const Vector_t &Bf, const double &dt) const
bool doAdvance_m(PartBunchBase< double, 3 > *bunch, const size_t &i, const double &t, const double dt, Arguments &... args) const
bool kick_m(PartBunchBase< double, 3 > *bunch, const size_t &i, const double &t, const double &h, Arguments &... args) const
void push_m(Vector_t &R, const Vector_t &P, const double &h) const
Vektor< double, 3 > Vector_t