template<unsigned int dim, typename St, typename prop, typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, template< typename > class layout_base = memory_traits_lin>
class vector_dist_comm< dim, St, prop, Decomposition, Memory, layout_base >
This class is an helper for the communication of vector_dist.
- Template Parameters
-
dim | Dimensionality of the space where the elements lives |
St | type of space float, double ... |
prop | properties the vector element store in OpenFPM data structure format |
Decomposition | Decomposition strategy to use CartDecomposition ... |
Memory | Memory pool where store the information HeapMemory ... |
- See also
- vector_dist
Definition at line 346 of file vector_dist_comm.hpp.
|
| vector_dist_comm (const vector_dist_comm< dim, St, prop, Decomposition, Memory, layout_base > &v) |
| Copy Constructor. More...
|
|
| vector_dist_comm (const Decomposition &dec) |
| Constructor. More...
|
|
| vector_dist_comm (Decomposition &&dec) |
| Constructor. More...
|
|
| vector_dist_comm () |
| Constructor. More...
|
|
| ~vector_dist_comm () |
| Destructor. More...
|
|
size_t | getDecompositionGranularity () |
| Get the number of minimum sub-domain per processor. More...
|
|
void | setDecompositionGranularity (size_t n_sub) |
| Set the minimum number of sub-domain per processor. More...
|
|
void | init_decomposition (Box< dim, St > &box, const size_t(&bc)[dim], const Ghost< dim, St > &g, size_t opt, const grid_sm< dim, void > &gdist) |
| Initialize the decomposition. More...
|
|
void | init_decomposition_gr_cell (Box< dim, St > &box, const size_t(&bc)[dim], const Ghost< dim, St > &g, size_t opt, const grid_sm< dim, void > &gdist) |
| Initialize the decomposition. More...
|
|
template<unsigned int impl, int ... prp> |
void | ghost_get_ (openfpm::vector< Point< dim, St >, Memory, layout_base > &v_pos, openfpm::vector< prop, Memory, layout_base > &v_prp, size_t &g_m, size_t opt=WITH_POSITION) |
| It synchronize the properties and position of the ghost particles. More...
|
|
template<int ... prp> |
void | ghost_wait_ (openfpm::vector< Point< dim, St >, Memory, layout_base > &v_pos, openfpm::vector< prop, Memory, layout_base > &v_prp, size_t &g_m, size_t opt=WITH_POSITION) |
| It synchronize the properties and position of the ghost particles. More...
|
|
template<unsigned int ... prp> |
void | map_list_ (openfpm::vector< Point< dim, St >> &v_pos, openfpm::vector< prop > &v_prp, size_t &g_m, size_t opt) |
| It move all the particles that does not belong to the local processor to the respective processor. More...
|
|
template<typename obp = KillParticle> |
void | map_ (openfpm::vector< Point< dim, St >, Memory, layout_base > &v_pos, openfpm::vector< prop, Memory, layout_base > &v_prp, size_t &g_m, size_t opt) |
| It move all the particles that does not belong to the local processor to the respective processor. More...
|
|
Decomposition & | getDecomposition () |
| Get the decomposition. More...
|
|
const Decomposition & | getDecomposition () const |
| Get the decomposition. More...
|
|
vector_dist_comm< dim, St, prop, Decomposition, Memory, layout_base > & | operator= (const vector_dist_comm< dim, St, prop, Decomposition, Memory, layout_base > &vc) |
| Copy a vector. More...
|
|
vector_dist_comm< dim, St, prop, Decomposition, Memory, layout_base > & | operator= (vector_dist_comm< dim, St, prop, Decomposition, Memory, layout_base > &&vc) |
| Copy a vector. More...
|
|
template<template< typename, typename > class op, int ... prp> |
void | ghost_put_ (openfpm::vector< Point< dim, St >, Memory, layout_base > &v_pos, openfpm::vector< prop, Memory, layout_base > &v_prp, size_t &g_m, size_t opt) |
| Ghost put. More...
|
|
|
size_t | get_last_ghost_get_received_parts (size_t i) |
| Get the number of particles received from each processor during the last ghost_get. More...
|
|
size_t | get_last_ghost_get_num_proc () |
| Get the number of processor involved during the last ghost_get. More...
|
|
openfpm::vector< size_t > & | get_last_ghost_get_num_proc_vector () |
| Get the number of processor involved during the last ghost_get. More...
|
|
void | calc_send_buffers (openfpm::vector< aggregate< unsigned int, unsigned int >, Memory, layout_base > &prc_sz, openfpm::vector< size_t > &prc_sz_r, openfpm::vector< size_t > &prc_r, size_t opt) |
| Calculate sending buffer size for each processor. More...
|
|
void | createShiftBox () |
| For every internal ghost box we create a structure that order such internal local ghost box in shift vectors. More...
|
|
void | local_ghost_from_opart (openfpm::vector< Point< dim, St >, Memory, layout_base > &v_pos, openfpm::vector< prop, Memory, layout_base > &v_prp, size_t opt) |
| Local ghost from labeled particles. More...
|
|
void | local_ghost_from_dec (openfpm::vector< Point< dim, St >, Memory, layout_base > &v_pos, openfpm::vector< prop, Memory, layout_base > &v_prp, size_t g_m, size_t opt) |
| Local ghost from decomposition. More...
|
|
void | add_loc_particles_bc (openfpm::vector< Point< dim, St >, Memory, layout_base > &v_pos, openfpm::vector< prop, Memory, layout_base > &v_prp, size_t &g_m, size_t opt) |
| Add local particles based on the boundary conditions. More...
|
|
void | fill_send_ghost_pos_buf (openfpm::vector< Point< dim, St >, Memory, layout_base > &v_pos, openfpm::vector< size_t > &prc_sz, openfpm::vector< send_pos_vector > &g_pos_send, size_t opt, bool async) |
| This function fill the send buffer for the particle position after the particles has been label with labelParticles. More...
|
|
template<typename send_vector , typename prp_object , int ... prp> |
void | fill_send_ghost_put_prp_buf (openfpm::vector< prop, Memory, layout_base > &v_prp, openfpm::vector< send_vector > &g_send_prp, size_t &g_m, size_t opt) |
| This function fill the send buffer for ghost_put. More...
|
|
void | resize_retained_buffer (openfpm::vector_fr< Memory > &rt_buf, size_t nbf) |
| resize the retained buffer by nbf More...
|
|
template<typename send_vector , typename prp_object , int ... prp> |
void | fill_send_ghost_prp_buf (openfpm::vector< prop, Memory, layout_base > &v_prp, openfpm::vector< size_t > &prc_sz, openfpm::vector< send_vector > &g_send_prp, size_t opt) |
| This function fill the send buffer for properties after the particles has been label with labelParticles. More...
|
|
void | fill_send_map_buf (openfpm::vector< Point< dim, St >, Memory, layout_base > &v_pos, openfpm::vector< prop, Memory, layout_base > &v_prp, openfpm::vector< size_t > &prc_sz_r, openfpm::vector< size_t > &prc_r, openfpm::vector< openfpm::vector< Point< dim, St >, Memory, layout_base, openfpm::grow_policy_identity >> &m_pos, openfpm::vector< openfpm::vector< prop, Memory, layout_base, openfpm::grow_policy_identity >> &m_prp, openfpm::vector< aggregate< unsigned int, unsigned int >, Memory, layout_base > &prc_sz, size_t opt) |
| allocate and fill the send buffer for the map function More...
|
|
template<typename prp_object , int ... prp> |
void | fill_send_map_buf_list (openfpm::vector< Point< dim, St >> &v_pos, openfpm::vector< prop, Memory, layout_base > &v_prp, openfpm::vector< size_t > &prc_sz_r, openfpm::vector< openfpm::vector< Point< dim, St >>> &m_pos, openfpm::vector< openfpm::vector< prp_object >> &m_prp) |
| allocate and fill the send buffer for the map function More...
|
|
template<typename obp > |
void | labelParticleProcessor (openfpm::vector< Point< dim, St >, Memory, layout_base > &v_pos, openfpm::vector< aggregate< int, int, int >, Memory, layout_base > &lbl_p, openfpm::vector< aggregate< unsigned int, unsigned int >, Memory, layout_base > &prc_sz, size_t opt) |
| Label particles for mappings. More...
|
|
void | labelParticlesGhost (openfpm::vector< Point< dim, St >, Memory, layout_base > &v_pos, openfpm::vector< prop, Memory, layout_base > &v_prp, openfpm::vector< size_t > &prc, openfpm::vector< size_t > &prc_sz, openfpm::vector< aggregate< unsigned int, unsigned int >, Memory, layout_base > &prc_offset, size_t &g_m, size_t opt) |
| Label the particles. More...
|
|
|
size_t | v_sub_unit_factor = 64 |
| Number of units for each sub-domain.
|
|
Vcluster< Memory > & | v_cl |
| VCluster.
|
|
Decomposition | dec |
| Domain decomposition.
|
|
openfpm::vector< size_t > | p_map_req |
| It map the processor id with the communication request into map procedure.
|
|
openfpm::vector< aggregate< int, int, int >, Memory, layout_base > | m_opart |
|
openfpm::vector< openfpm::vector< aggregate< size_t, size_t > > > | g_opart |
|
openfpm::vector< aggregate< unsigned int, unsigned long int >, CudaMemory, memory_traits_inte > | g_opart_device |
| Same as g_opart but on device, the vector of vector is flatten into a single vector.
|
|
openfpm::vector< Point< dim, St >, Memory, layout_base > | v_pos_tmp |
| Helper buffer for computation (on GPU) of local particles (position)
|
|
openfpm::vector< prop, Memory, layout_base > | v_prp_tmp |
| Helper buffer for computation (on GPU) of local particles (properties)
|
|
openfpm::vector< size_t > | g_opart_sz |
| Per processor number of particle g_opart_sz.get(i) = g_opart.get(i).size()
|
|
openfpm::vector< size_t > | prc_g_opart |
| processor rank list of g_opart
|
|
openfpm::vector< size_t > | prc_recv_get_pos |
|
openfpm::vector< size_t > | prc_recv_get_prp |
|
openfpm::vector< size_t > | prc_recv_put |
| the same as prc_recv_get but for put
|
|
openfpm::vector< size_t > | prc_recv_map |
| the same as prc_recv_get but for map
|
|
openfpm::vector< size_t > | recv_sz_get_pos |
|
openfpm::vector< size_t > | recv_sz_get_prp |
|
openfpm::vector< size_t > | recv_sz_get_byte |
| Conversion to byte of recv_sz_get.
|
|
openfpm::vector< size_t > | recv_sz_put |
| The same as recv_sz_get but for put.
|
|
openfpm::vector< size_t > | recv_sz_map |
| The same as recv_sz_get but for map.
|
|
openfpm::vector< size_t > | prc_sz_gg |
| elements sent for each processors (ghost_get)
|
|
openfpm::vector< aggregate< unsigned int >, Memory, layout_base > | proc_id_out |
| temporary buffer to processors ids
|
|
openfpm::vector< aggregate< unsigned int >, Memory, layout_base > | starts |
| temporary buffer for the scan result
|
|
openfpm::vector< aggregate< unsigned int, unsigned int >, Memory, layout_base > | prc_offset |
| Processor communication size.
|
|
CudaMemory | mem |
| Temporary CudaMemory to do stuff.
|
|
size_t | lg_m |
|
openfpm::vector_fr< Memory > | hsmem |
| Sending buffer.
|
|
long int | shift_box_ndec = -1 |
| From which decomposition the shift boxes are calculated.
|
|
std::unordered_map< size_t, size_t > | map_cmb |
| this map is used to check if a combination is already present
|
|
openfpm::vector_std< openfpm::vector_std< Box< dim, St > > > | box_f |
|
openfpm::vector< Box< dim, St >, Memory, layout_base > | box_f_dev |
| The boxes touching the border of the domain + shift vector linearized from where they come from.
|
|
openfpm::vector< aggregate< unsigned int >, Memory, layout_base > | box_f_sv |
|
openfpm::vector_std< comb< dim > > | box_cmb |
| Store the sector for each group (previous vector)
|
|
openfpm::vector< aggregate< unsigned int, unsigned int >, Memory, layout_base > | o_part_loc |
| Id of the local particle to replicate for ghost_get.
|
|
openfpm::vector< aggregate< unsigned int, unsigned int >, Memory, layout_base > | prc_sz |
| Processor communication size.
|
|
template<unsigned int dim, typename St, typename prop, typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, template< typename > class layout_base = memory_traits_lin>
void vector_dist_comm< dim, St, prop, Decomposition, Memory, layout_base >::add_loc_particles_bc |
( |
openfpm::vector< Point< dim, St >, Memory, layout_base > & |
v_pos, |
|
|
openfpm::vector< prop, Memory, layout_base > & |
v_prp, |
|
|
size_t & |
g_m, |
|
|
size_t |
opt |
|
) |
| |
|
inlineprivate |
Add local particles based on the boundary conditions.
In order to understand what this function use the following
[1,1]
+---------+------------------------+---------+
| (1,-1) | | (1,1) |
| | | (1,0) --> 7 | | |
| v | | v |
| 6 | | 8 |
+--------------------------------------------+
| | | |
| | | |
| | | |
| (-1,0) | | (1,0) |
| | | | | |
| v | (0,0) --> 4 | v |
| 3 | | 5 |
| | | |
B | | | A |
* | | | * |
| | | |
| | | |
| | | |
+--------------------------------------------+
| (-1,-1) | | (-1,1) |
| | | (-1,0) --> 1 | | |
| v | | v |
| 0 | | 2 |
+---------+------------------------+---------+
The box is the domain, while all boxes at the border (so not (0,0) ) are the
ghost part at the border of the domain. If a particle A is in the position in figure
a particle B must be created. This function duplicate the particle A, if A and B are
local
\param v_pos vector of particle of positions
\param v_prp vector of particle properties
\param g_m ghost marker
\param opt options
Definition at line 845 of file vector_dist_comm.hpp.