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