10 #ifndef IMPACTX_TO_FIXED_S_H 11 #define IMPACTX_TO_FIXED_S_H 24 namespace transformation
53 amrex::ParticleReal & px,
54 amrex::ParticleReal & py,
55 amrex::ParticleReal & pt)
const 57 using namespace amrex::literals;
60 amrex::ParticleReal
const x = p.
pos(0);
61 amrex::ParticleReal
const y = p.
pos(1);
62 amrex::ParticleReal
const t = p.
pos(2);
65 amrex::ParticleReal
const argd = 1.0_prt +
pow(
m_pzd, 2);
67 amrex::ParticleReal
const ptdf = argd > 0.0_prt ? -
sqrt(argd) : -1.0_prt;
76 amrex::ParticleReal
const arg = 1.0_prt +
pow(m_pzd+pt, 2) +
pow(px, 2) +
pow(py, 2);
78 amrex::ParticleReal
const ptf = arg > 0.0_prt ? -
sqrt(arg) : -1.0_prt;
82 p.
pos(0) = x - px*t/(m_pzd+pt);
84 p.
pos(1) = y - py*t/(m_pzd+pt);
86 p.
pos(2) = ptf*t/(m_pzd+pt);
104 #endif // IMPACTX_TO_FIXED_S_H
Definition: ImpactX.cpp:31
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T arg(const GpuComplex< T > &a_z) noexcept
#define AMREX_ASSERT_WITH_MESSAGE(EX, MSG)
#define AMREX_FORCE_INLINE
#define AMREX_GPU_HOST_DEVICE
Particle< NStructReal, NStructInt > ParticleType
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE RealVect pos() const &
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE GpuComplex< T > pow(const GpuComplex< T > &a_z, const T &a_y) noexcept
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE GpuComplex< T > sqrt(const GpuComplex< T > &a_z) noexcept