18#ifndef OPALX_PartPusher_H
19#define OPALX_PartPusher_H
23#include "Expression/IpplExpressions.h"
36 KOKKOS_INLINE_FUNCTION
void kick(
39 const double& charge)
const;
41 KOKKOS_INLINE_FUNCTION
void push(
48 const double& charge)
const {
76 P += 0.5 * dt * charge *
Physics::c / mass * Ef;
87 double gamma = Kokkos::sqrt(1.0 +
dot(P, P));
98 P += 0.5 * dt * charge *
Physics::c / mass * Ef;
110 R += 0.5 * P / Kokkos::sqrt(1.0 +
dot(P));
ippl::Vector< T, Dim > Vector_t
Vector3D cross(const Vector3D &lhs, const Vector3D &rhs)
Vector cross product.
double dot(const Vector3D &lhs, const Vector3D &rhs)
Vector dot product.
KOKKOS_INLINE_FUNCTION BorisPusher()=default
KOKKOS_INLINE_FUNCTION void kick(const Vector_t< double, 3 > &R, Vector_t< double, 3 > &P, const Vector_t< double, 3 > &Ef, const Vector_t< double, 3 > &Bf, const double &dt, const double &mass, const double &charge) const
KOKKOS_INLINE_FUNCTION void push(Vector_t< double, 3 > &R, const Vector_t< double, 3 > &P, const double &dt) const
constexpr double c
The velocity of light in m/s.