3 #include <Cabana_AoSoA.hpp>
4 #include <Kokkos_Core.hpp>
9 using ParticleDataTypes = Cabana::MemberTypes<double[PTL_NPHASE],double[PTL_NCONST],long long int, long long int>;
11 using ParticleDataTypes = Cabana::MemberTypes<double[PTL_NPHASE],double[PTL_NCONST],long long int>;
46 return *(
reinterpret_cast<const SimdVector*
>(
this));
69 KOKKOS_INLINE_FUNCTION
bool is_active(
int i_simd)
const{
70 return (
gid[i_simd]>0);
74 return (
gid[i_simd]<=0);
80 for (
int i_simd = 0; i_simd<SIMD_SIZE; i_simd++){
118 long long int gid[VEC_LEN];
120 long long int flag[VEC_LEN];
124 return (
gid[i_vec]>0);
128 return (
gid[i_vec]<=0);
153 template<
class Device>
163 template<
class Device>
183 template<
class Device>
KOKKOS_INLINE_FUNCTION int divide_and_round_up(int a, int b)
Definition: globals.hpp:226
KOKKOS_INLINE_FUNCTION void update_phases(SimdPhase &ph_new, const SimdPhase &ph, double local_dt, const SimdPhase &dph)
Definition: particles.tpp:6
Cabana::MemberTypes< double[PTL_NPHASE]> PhaseDataTypes
Definition: particles.hpp:14
Cabana::MemberTypes< double[PTL_NPHASE], double[PTL_NCONST], long long int > ParticleDataTypes
Definition: particles.hpp:11
int p_range< DeviceType >(int num_particle)
Definition: particles.hpp:193
KOKKOS_INLINE_FUNCTION void update_dphm(SimdPhase &dphm, const SimdPhase &dpht)
Definition: particles.tpp:21
KOKKOS_INLINE_FUNCTION void simd_2_AoSoA(VecParticles *part, const SimdParticles &part_one, int a_vec, int s_vec)
Definition: particles.tpp:54
int add_vec_buffer(int n_ptl)
Definition: particles.hpp:200
int p_range(int num_particle)
Definition: particles.hpp:184
KOKKOS_INLINE_FUNCTION void update_dpht(SimdPhase &dpht, const SimdPhase &dph, const SimdPhase &dphm)
Definition: particles.tpp:37
KOKKOS_INLINE_FUNCTION void AoSoA_2_simd(SimdParticles &part_one, const VecParticles *part, int a_vec, int s_vec)
Definition: particles.tpp:83
Definition: particles.hpp:154
KOKKOS_INLINE_FUNCTION AoSoAIndices(int idx)
Definition: particles.hpp:164
int s
The index in the outer array of the AoSoA.
Definition: particles.hpp:155
int a
The index in the inner array of the AoSoA.
Definition: particles.hpp:156
Definition: particles.hpp:139
double data[T]
Definition: particles.hpp:140
Definition: particles.hpp:51
Simd< double > w0
Full-f weight.
Definition: particles.hpp:53
Simd< double > mu
m*v_perp^2/(2B)
Definition: particles.hpp:52
Simd< double > f0
w0*(marker density)
Definition: particles.hpp:54
Definition: particles.hpp:61
KOKKOS_INLINE_FUNCTION bool is_inactive(int i_simd) const
Definition: particles.hpp:73
Simd< long long int > gid
Definition: particles.hpp:64
SimdPhase ph
Definition: particles.hpp:62
SimdConstants ct
Definition: particles.hpp:63
KOKKOS_INLINE_FUNCTION bool is_active(int i_simd) const
Definition: particles.hpp:69
KOKKOS_INLINE_FUNCTION void deactivate(int i_simd)
Definition: particles.hpp:88
KOKKOS_INLINE_FUNCTION void deactivate(const Simd< bool > &mask)
Definition: particles.hpp:79
Definition: particles.hpp:17
Simd< double > w2
(1 - background distribution)/f0
Definition: particles.hpp:23
KOKKOS_INLINE_FUNCTION SimdVector2D & x()
Definition: particles.hpp:27
Simd< double > w1
delta-f weight
Definition: particles.hpp:22
Simd< double > rho
m*v_para/(q*B) - A_para^h/B (should it be plus or minus?)
Definition: particles.hpp:21
KOKKOS_INLINE_FUNCTION const SimdVector2D & x() const
Definition: particles.hpp:33
Simd< double > z
Cylindrical coordinate Z.
Definition: particles.hpp:19
Simd< double > r
Cylindrical coordinate R (major radial direction)
Definition: particles.hpp:18
Simd< double > phi
Cylindrical coordinate phi (toroidal direction)
Definition: particles.hpp:20
KOKKOS_INLINE_FUNCTION const SimdVector & v() const
Definition: particles.hpp:45
KOKKOS_INLINE_FUNCTION SimdVector & v()
Definition: particles.hpp:39
Definition: particles.hpp:105
double f0[VEC_LEN]
Definition: particles.hpp:108
double mu[VEC_LEN]
Definition: particles.hpp:106
double w0[VEC_LEN]
Definition: particles.hpp:107
Definition: particles.hpp:134
double data[T *VEC_LEN]
Definition: particles.hpp:135
Definition: particles.hpp:115
KOKKOS_INLINE_FUNCTION bool is_active(int i_vec) const
Definition: particles.hpp:123
VecPhase ph
Definition: particles.hpp:116
long long int gid[VEC_LEN]
Definition: particles.hpp:118
VecConstants ct
Definition: particles.hpp:117
KOKKOS_INLINE_FUNCTION bool is_inactive(int i_vec) const
Definition: particles.hpp:127
Definition: particles.hpp:95
double r[VEC_LEN]
Definition: particles.hpp:96
double w2[VEC_LEN]
Definition: particles.hpp:101
double phi[VEC_LEN]
Definition: particles.hpp:98
double rho[VEC_LEN]
Definition: particles.hpp:99
double w1[VEC_LEN]
Definition: particles.hpp:100
double z[VEC_LEN]
Definition: particles.hpp:97