10 #define SMART_UTILS_H_
14 #include <AMReX_Config.H>
25 using NameMap = std::map<std::string, int>;
50 template <
typename PTile>
55 #pragma omp critical (ionization_nextid)
58 pid = PTile::ParticleType::NextID();
59 PTile::ParticleType::NextID(pid + num_added);
63 auto pp = ptile.GetArrayOfStructs()().
data() + old_size;
std::map< std::string, int > NameMap
Definition: SmartUtils.H:25
PolicyVec getPolicies(const NameMap &names) noexcept
Definition: SmartUtils.cpp:16
SmartCopyTag getSmartCopyTag(const NameMap &src, const NameMap &dst) noexcept
Definition: SmartUtils.cpp:34
void setNewParticleIDs(PTile &ptile, int old_size, int num_added)
Sets the ids of newly created particles to the next values.
Definition: SmartUtils.H:51
list data
open text file and read data #####
Definition: Excitation_Flag_Generator.py:24
std::enable_if_t< std::is_integral_v< T > > ParallelFor(TypeList< CTOs... > ctos, std::array< int, sizeof...(CTOs)> const &runtime_options, T N, F &&f)
names
Definition: plot_results.py:42
Definition: SmartUtils.H:29
amrex::Gpu::DeviceVector< int > dst_comps
Definition: SmartUtils.H:32
int size() const noexcept
Definition: SmartUtils.H:34
amrex::Gpu::DeviceVector< int > src_comps
Definition: SmartUtils.H:31
std::vector< std::string > common_names
Definition: SmartUtils.H:30