10 #ifndef IMPACTX_TO_FIXED_T_H
11 #define IMPACTX_TO_FIXED_T_H
52 amrex::ParticleReal & x,
53 amrex::ParticleReal & y,
54 amrex::ParticleReal & t,
55 amrex::ParticleReal & px,
56 amrex::ParticleReal & py,
57 amrex::ParticleReal & pt)
const
59 using namespace amrex::literals;
62 constexpr amrex::ParticleReal tol = 1.0e-8_prt;
65 amrex::ParticleReal
const argd = -1.0_prt +
pow(
m_ptd, 2);
67 amrex::ParticleReal
const pzdf = argd > 0.0_prt ?
sqrt(argd) : tol;
76 amrex::ParticleReal
const arg = -1.0_prt +
pow(
m_ptd+pt, 2) -
pow(px, 2) -
pow(py, 2);
78 amrex::ParticleReal
const pzf =
arg > 0.0_prt ?
sqrt(
arg) : tol;
86 z = pzf *
t / (
m_ptd + pt);
#define AMREX_FORCE_INLINE
#define AMREX_GPU_HOST_DEVICE
T_ParticleType ParticleType
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T arg(const GpuComplex< T > &a_z) noexcept
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
@ t
fixed t as the independent variable