ARTEMIS
Public Member Functions | Public Attributes | List of all members
SmartCopy Struct Reference

This is a functor for performing a "smart copy" that works in both host and device code. More...

#include <SmartCopy.H>

Public Member Functions

template<typename DstData , typename SrcData >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void operator() (DstData &dst, const SrcData &src, int i_src, int i_dst, amrex::RandomEngine const &engine) const noexcept
 

Public Attributes

int m_num_copy_real
 
const int * m_src_comps_r
 
const int * m_dst_comps_r
 
int m_num_copy_int
 
const int * m_src_comps_i
 
const int * m_dst_comps_i
 
const InitializationPolicym_policy_real
 
const InitializationPolicym_policy_int
 

Detailed Description

This is a functor for performing a "smart copy" that works in both host and device code.

A "smart" copy does the following. First, the destination particle components are initialized to the default values for that component type. Second, if a given component name is found in both the src and the dst, then the src value is copied.

Particle structs - positions and id numbers - are always copied.

You don't create this directly - use the SmartCopyFactory object below.

Member Function Documentation

◆ operator()()

template<typename DstData , typename SrcData >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void SmartCopy::operator() ( DstData &  dst,
const SrcData &  src,
int  i_src,
int  i_dst,
amrex::RandomEngine const &  engine 
) const
inlinenoexcept

Member Data Documentation

◆ m_dst_comps_i

const int* SmartCopy::m_dst_comps_i

◆ m_dst_comps_r

const int* SmartCopy::m_dst_comps_r

◆ m_num_copy_int

int SmartCopy::m_num_copy_int

◆ m_num_copy_real

int SmartCopy::m_num_copy_real

◆ m_policy_int

const InitializationPolicy* SmartCopy::m_policy_int

◆ m_policy_real

const InitializationPolicy* SmartCopy::m_policy_real

◆ m_src_comps_i

const int* SmartCopy::m_src_comps_i

◆ m_src_comps_r

const int* SmartCopy::m_src_comps_r

The documentation for this struct was generated from the following file: