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

Go to the source code of this file.

Functions

template<class Device >
KOKKOS_INLINE_FUNCTION void bounce (const Simulation< Device > &sml, const MagneticField< Device > &magnetic_field, SimdParticles &part, const SimdPhase &ph_old)
 

Function Documentation

template<class Device >
KOKKOS_INLINE_FUNCTION void bounce ( const Simulation< Device > &  sml,
const MagneticField< Device > &  magnetic_field,
SimdParticles part,
const SimdPhase ph_old 
)

Bounce particle away from wall. (Simple approach to particles that leave the domain.) Particle gets its old location, except the z coordinate is made negative. So not so much a true bounce as making the particle reappear on the other side. Also there's an option for setting the particle's W1 weight to 0.

Parameters
[in,out]partThe particle
[in]ph_oldThe most recent phase prior to leaving the domain