XGCa
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
cpp_particles.tpp File Reference
#include "cpp_particles.hpp"
Include dependency graph for cpp_particles.tpp:
This graph shows which files directly or indirectly include this file:

Functions

KOKKOS_INLINE_FUNCTION void remove_particles (Simd< long long int > &gid, const Simd< bool > &deactivate)
 
KOKKOS_INLINE_FUNCTION void update_phases (SimdPhase &ph_new, const SimdPhase &ph, double local_dt, const SimdPhase &dph)
 
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)
 
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 AoSoA_indices (int i_item, int &s_vec, int &a_vec)
 
int p_range (int num_particle)
 

Function Documentation

KOKKOS_INLINE_FUNCTION void AoSoA_2_simd ( SimdParticles part_one,
const VecParticles part,
int  a_vec,
int  s_vec 
)

Copy from the AoSoA to a local SoA of array length SIMD_SIZE. This should be obsolete at some point

Parameters
[out]part_oneThe local SimdParticle array
[in]partThe particle AoSoA
[in]a_vecThe index in the inner array of the AoSoA
[in]s_vecThe index in the outer array of the AoSoA

Here is the caller graph for this function:

KOKKOS_INLINE_FUNCTION void AoSoA_indices ( int  i_item,
int &  s_vec,
int &  a_vec 
)

From the particle index, get the position in the AoSoA

Parameters
[in]i_itemThe particle index
[out]a_vecThe index in the inner array of the AoSoA
[out]s_vecThe index in the outer array of the AoSoA

Here is the caller graph for this function:

int p_range ( int  num_particle)
inline

Determine parallel for range for particles. Returns number of particles or number of vectors

Parameters
[in]num_particleNumber of particles

Here is the caller graph for this function:

KOKKOS_INLINE_FUNCTION void remove_particles ( Simd< long long int > &  gid,
const Simd< bool > &  deactivate 
)

Set global IDs of particles staged for removal to negative. Ideally we wouldnt overload gid like this.

Parameters
[in,out]gidVector of particle global IDs
[in]deactivateVector of bools whether the particles should be removed

Here is the caller graph for this function:

KOKKOS_INLINE_FUNCTION void simd_2_AoSoA ( VecParticles part,
const SimdParticles part_one,
int  a_vec,
int  s_vec 
)

Copy from local SoA of array length SIMD_SIZE back into the AoSoA. This should be obsolete at some point

Parameters
[in,out]partThe particle AoSoA
[in]part_oneThe local SimdParticle array
[in]a_vecThe index in the inner array of the AoSoA
[in]s_vecThe index in the outer array of the AoSoA

Here is the caller graph for this function:

KOKKOS_INLINE_FUNCTION void update_dphm ( SimdPhase dphm,
const SimdPhase dpht 
)

Add the second vector of phase derivatives to the first (for use in RK4)

Parameters
[in,out]dphmVector of phase derivatives
[in]dphtVector of phase derivatives

Here is the caller graph for this function:

KOKKOS_INLINE_FUNCTION void update_dpht ( SimdPhase dpht,
const SimdPhase dph,
const SimdPhase dphm 
)

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]dphtVector of phase derivatives
[in]dphVector of phase derivatives
[in]dphmVector of phase derivatives

Here is the caller graph for this function:

KOKKOS_INLINE_FUNCTION void update_phases ( SimdPhase ph_new,
const SimdPhase ph,
double  local_dt,
const SimdPhase dph 
)

Update a vector of particle phases with a time step

Parameters
[out]ph_newVector of new phase
[in]phVector of old phase
[in]local_dtTime step size
[in]dphVector of time derivatives of the phase

Here is the caller graph for this function: