#include <Cabana_AoSoA.hpp>
#include <Kokkos_Core.hpp>
#include "globals.hpp"
#include "particles.tpp"
Go to the source code of this file.
|
KOKKOS_INLINE_FUNCTION void | update_phases (SimdPhase &ph_new, const SimdPhase &ph, double local_dt, const SimdPhase &dph) |
|
KOKKOS_INLINE_FUNCTION void | simd_2_AoSoA (VecParticles *part, const SimdParticles &part_one, int a_vec, int s_vec) |
|
KOKKOS_INLINE_FUNCTION void | AoSoA_2_simd (SimdParticles &part_one, const VecParticles *part, int a_vec, int s_vec) |
|
KOKKOS_INLINE_FUNCTION void | update_dphm (SimdPhase &dphm, const SimdPhase &dpht) |
|
KOKKOS_INLINE_FUNCTION void | update_dpht (SimdPhase &dpht, const SimdPhase &dph, const SimdPhase &dphm) |
|
template<class Device > |
int | p_range (int num_particle) |
|
template<> |
int | p_range< DeviceType > (int num_particle) |
|
int | add_vec_buffer (int n_ptl) |
|
int add_vec_buffer |
( |
int |
n_ptl | ) |
|
|
inline |
Return n_ptl rounded up to the nearest full vector
Copy from the AoSoA to a local SoA of array length SIMD_SIZE. This should be obsolete at some point
- Parameters
-
[out] | part_one | The local SimdParticle array |
[in] | part | The particle AoSoA |
[in] | a_vec | The index in the inner array of the AoSoA |
[in] | s_vec | The index in the outer array of the AoSoA |
template<class Device >
int p_range |
( |
int |
num_particle | ) |
|
|
inline |
Determine parallel for range for particles. Returns number of vectors
- Parameters
-
[in] | num_particle | Number of particles |
Determine parallel for range for particles. Returns number of particles
- Parameters
-
[in] | num_particle | Number of particles |
Copy from local SoA of array length SIMD_SIZE back into the AoSoA. This should be obsolete at some point
- Parameters
-
[in,out] | part | The particle AoSoA |
[in] | part_one | The local SimdParticle array |
[in] | a_vec | The index in the inner array of the AoSoA |
[in] | s_vec | The index in the outer array of the AoSoA |
Add the second vector of phase derivatives to the first (for use in RK4)
- Parameters
-
[in,out] | dphm | Vector of phase derivatives |
[in] | dpht | Vector of phase derivatives |
Add the second vector of phase derivatives and 2x the third vector to the first, i.e. dpht = dpht + dph + 2 dphm (for use in RK4)
- Parameters
-
[in,out] | dpht | Vector of phase derivatives |
[in] | dph | Vector of phase derivatives |
[in] | dphm | Vector of phase derivatives |
Update a vector of particle phases with a time step
- Parameters
-
[out] | ph_new | Vector of new phase |
[in] | ph | Vector of old phase |
[in] | local_dt | Time step size |
[in] | dph | Vector of time derivatives of the phase |