WarpX
|
This is a functor for performing a "smart create" that works in both host and device code. More...
#include <SmartCreate.H>
Public Member Functions | |
template<typename PartData > | |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void | operator() (PartData &prt, const int i_prt, amrex::RandomEngine const &engine, const amrex::Real x=0.0, const amrex::Real y=0.0, const amrex::Real z=0.0, const int cpu=0, const int id=0) const noexcept |
Public Attributes | |
const InitializationPolicy * | m_policy_real |
const InitializationPolicy * | m_policy_int |
const int | m_weight_index = 0 |
This is a functor for performing a "smart create" that works in both host and device code.
A "smart" create does the following: First, it initializes the position, cpuid and id of the particle (in most cases IDs should be initialized using setNewParticleIDs after their creation). Then, it initializes all the other components according to initialization policies.
You don't create this directly - use the SmartCreateFactory object below.
|
inlinenoexcept |
const InitializationPolicy* SmartCreate::m_policy_int |
const InitializationPolicy* SmartCreate::m_policy_real |
const int SmartCreate::m_weight_index = 0 |