OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
vector_dist_ws< dim, St, prop, Decomposition, Memory, layout_base > Class Template Reference

Detailed Description

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_ws< dim, St, prop, Decomposition, Memory, layout_base >

Definition at line 16 of file vector_dist_subset.hpp.

+ Inheritance diagram for vector_dist_ws< dim, St, prop, Decomposition, Memory, layout_base >:

Public Types

typedef prop value_type
 
typedef boost::mpl::int_< AggregateAppend< int, prop >::type::max_prop-1 > flag_prop
 
- Public Types inherited from vector_dist< dim, St, AggregateAppend< int, prop >::type, Decomposition, Memory, layout_base >
typedef vector_dist< dim, St, AggregateAppend< int, prop >::type, Decomposition, Memory, layout_base > self
 Self type.
 
typedef AggregateAppend< int, prop >::type value_type
 property object
 
typedef Decomposition Decomposition_type
 
typedef CellList< dim, St, Mem_fast<>, shift< dim, St >, internal_position_vector_type > CellList_type
 
typedef St stype
 space type
 
typedef int yes_i_am_vector_dist
 yes I am vector dist
 
typedef std::integral_constant< bool, false > is_it_a_subset
 yes I am vector subset dist
 

Public Member Functions

void setSubset (vect_dist_key_dx key, int sub_id)
 
void ghost_get_subset ()
 
void getLastSubset (int sub_id)
 
bool write_frame (std::string out, size_t iteration, int opt=VTK_WRITER)
 
bool write (std::string out, int opt=VTK_WRITER)
 
- Public Member Functions inherited from vector_dist< dim, St, AggregateAppend< int, prop >::type, Decomposition, Memory, layout_base >
vector_dist< dim, St, AggregateAppend< int, prop >::type, Decomposition, Memory, layout_base > & operator= (const vector_dist< dim, St, AggregateAppend< int, prop >::type, Decomposition, Memory, layout_base > &v)
 Operator= for distributed vector. More...
 
vector_dist< dim, St, AggregateAppend< int, prop >::type, Decomposition, Memory, layout_base > & operator= (vector_dist< dim, St, AggregateAppend< int, prop >::type, Decomposition, Memory, layout_base > &&v)
 Operator= for distributed vector. More...
 
 vector_dist (const vector_dist< dim, St, AggregateAppend< int, prop >::type, Decomposition, Memory, layout_base > &v)
 Copy Constructor. More...
 
 vector_dist (vector_dist< dim, St, AggregateAppend< int, prop >::type, Decomposition, Memory, layout_base > &&v) noexcept
 Copy constructor. More...
 
 vector_dist (const Decomposition &dec, size_t np)
 Constructor with predefined decomposition. More...
 
 vector_dist (size_t np, Box< dim, St > box, const size_t(&bc)[dim], const Ghost< dim, St > &g, const grid_sm< dim, void > &gdist)
 Constructor of a distributed vector. More...
 
 vector_dist (size_t np, Box< dim, St > box, const size_t(&bc)[dim], const Ghost< dim, St > &g, size_t opt=0, const grid_sm< dim, void > &gdist=grid_sm< dim, void >())
 Constructor of a distributed vector. More...
 
void setReferenceCounterToOne ()
 
void clear ()
 remove all the elements More...
 
size_t size_local () const
 return the local size of the vector More...
 
size_t size_local_orig () const
 return the local size of the vector More...
 
size_t size_local_with_ghost () const
 return the local size of the vector More...
 
auto getPos (vect_dist_key_dx vec_key) -> decltype(v_pos.template get< 0 >(vec_key.getKey()))
 Get the position of an element. More...
 
auto getPos (vect_dist_key_dx vec_key) const -> decltype(v_pos.template get< 0 >(vec_key.getKey()))
 Get the position of an element. More...
 
auto getPos (size_t vec_key) -> decltype(v_pos.template get< 0 >(vec_key))
 Get the position of an element. More...
 
auto getPos (size_t vec_key) const -> decltype(v_pos.template get< 0 >(vec_key))
 Get the position of an element. More...
 
auto getPosOrig (vect_dist_key_dx vec_key) const -> decltype(v_pos.template get< 0 >(vec_key.getKey()))
 Get the position of an element. More...
 
auto getPosOrig (size_t vec_key) -> decltype(v_pos.template get< 0 >(vec_key))
 Get the position of an element. More...
 
auto getProp (vect_dist_key_dx vec_key) -> decltype(v_prp.template get< id >(vec_key.getKey()))
 Get the property of an element. More...
 
auto getProp (vect_dist_key_dx vec_key) const -> decltype(v_prp.template get< id >(vec_key.getKey()))
 Get the property of an element. More...
 
auto getProp (size_t vec_key) -> decltype(v_prp.template get< id >(vec_key))
 Get the property of an element. More...
 
auto getProp (size_t vec_key) const -> decltype(v_prp.template get< id >(vec_key))
 Get the property of an element. More...
 
auto getPosNC (vect_dist_key_dx vec_key) -> decltype(v_pos.template get< 0 >(vec_key.getKey()))
 Get the position of an element. More...
 
auto getPosNC (vect_dist_key_dx vec_key) const -> decltype(v_pos.template get< 0 >(vec_key.getKey()))
 Get the position of an element. More...
 
auto getPosNC (size_t vec_key) -> decltype(v_pos.template get< 0 >(vec_key))
 Get the position of an element. More...
 
auto getPosNC (size_t vec_key) const -> decltype(v_pos.template get< 0 >(vec_key))
 Get the position of an element. More...
 
auto getPropNC (vect_dist_key_dx vec_key) -> decltype(v_prp.template get< id >(vec_key.getKey()))
 Get the property of an element. More...
 
auto getPropNC (vect_dist_key_dx vec_key) const -> decltype(v_prp.template get< id >(vec_key.getKey()))
 Get the property of an element. More...
 
auto getPropNC (size_t vec_key) -> decltype(v_prp.template get< id >(vec_key))
 Get the property of an element. More...
 
auto getPropNC (size_t vec_key) const -> decltype(v_prp.template get< id >(vec_key))
 Get the property of an element. More...
 
auto getPosWrite (vect_dist_key_dx vec_key) -> decltype(v_pos.template get< 0 >(vec_key.getKey()))
 Get the position of an element. More...
 
auto getPosRead (vect_dist_key_dx vec_key) const -> decltype(v_pos.template get< 0 >(vec_key.getKey()))
 Get the position of an element. More...
 
auto getPropWrite (vect_dist_key_dx vec_key) -> decltype(v_prp.template get< id >(vec_key.getKey()))
 Get the property of an element. More...
 
auto getPropRead (vect_dist_key_dx vec_key) const -> decltype(v_prp.template get< id >(vec_key.getKey()))
 Get the property of an element. More...
 
void add ()
 Add local particle. More...
 
auto getLastPos () -> decltype(v_pos.template get< 0 >(0))
 Get the position of the last element. More...
 
auto getLastProp () -> decltype(v_prp.template get< id >(0))
 Get the property of the last element. More...
 
auto getLastPosRead () -> decltype(v_pos.template get< 0 >(0))
 Get the position of the last element. More...
 
auto getLastPropRead () -> decltype(v_prp.template get< id >(0))
 Get the property of the last element. More...
 
auto getLastPosWrite () -> decltype(v_pos.template get< 0 >(0))
 Get the position of the last element. More...
 
auto getLastPropWrite () -> decltype(v_prp.template get< id >(0))
 Get the property of the last element. More...
 
vect_dist_key_dx getOriginKey (vect_dist_key_dx vec_key)
 
CellL getCellListSym (St r_cut)
 Construct a cell list symmetric based on a cut of radius. More...
 
CellL getCellListSym (const size_t(&div)[dim], const size_t(&pad)[dim])
 Construct a cell list symmetric based on a cut of radius. More...
 
cell_list_selector< self, impl >::ctype getCellListDev (St r_cut)
 Construct a cell list starting from the stored particles. More...
 
CellL getCellList (St r_cut, bool no_se3=false)
 Construct a cell list starting from the stored particles. More...
 
CellL getCellList (St r_cut, const Ghost< dim, St > &enlarge, bool no_se3=false)
 Construct a cell list starting from the stored particles. More...
 
auto getCellListDevice (St r_cut, bool no_se3=false) -> decltype(this->getCellList(r_cut, no_se3))
 Construct a cell list from the stored particles. More...
 
CellL getCellList_hilb (St r_cut)
 Construct an hilbert cell list starting from the stored particles. More...
 
CellL getCellList_hilb (St r_cut, const Ghost< dim, St > &enlarge)
 Construct an hilbert cell list starting from the stored particles. More...
 
void updateCellList (CellL &cell_list, bool no_se3=false, cl_construct_opt opt=cl_construct_opt::Full)
 Update a cell list using the stored particles. More...
 
void updateCellListSym (CellL &cell_list)
 Update a cell list using the stored particles. More...
 
VerletL getVerletSym (St r_cut)
 for each particle get the symmetric verlet list More...
 
VerletL getVerletCrs (St r_cut)
 for each particle get the symmetric verlet list More...
 
VerletL getVerlet (St r_cut)
 for each particle get the verlet list More...
 
void updateVerlet (VerletList< dim, St, Mem_type, shift< dim, St > > &ver, St r_cut, size_t opt=VL_NON_SYMMETRIC)
 for each particle get the verlet list More...
 
void reorder (int32_t m, reorder_opt opt=reorder_opt::HILBERT)
 Construct a cell list starting from the stored particles and reorder a vector according to the Hilberts curve. More...
 
void reorder (int32_t m, const Ghost< dim, St > &enlarge, reorder_opt opt=reorder_opt::HILBERT)
 Construct a cell list starting from the stored particles and reorder a vector according to the Hilberts curve. More...
 
void reorder_rcut (St r_cut)
 Construct a cell list starting from the stored particles and reorder a vector according to the Hilberts curve. More...
 
size_t init_size_accum (size_t np)
 It return the number of particles contained by the previous processors. More...
 
vector_dist_iterator getIterator ()
 Get an iterator that traverse domain and ghost particles. More...
 
vector_dist_iterator getIterator (size_t start, size_t stop)
 Get an iterator that traverse domain and ghost particles. More...
 
grid_dist_id_iterator_dec< DecompositiongetGridIterator (const size_t(&sz)[dim])
 
vector_dist_iterator getGhostIterator () const
 Get the iterator across the position of the ghost particles. More...
 
vector_dist_iterator getGhostIterator_no_se3 () const
 Get the iterator across the position of the ghost particles. More...
 
ParticleIt_Cells< dim, CellListgetDomainIteratorCells (CellList &NN)
 Get an iterator that traverse the particles in the domain using a cell list. More...
 
vector_dist_iterator getDomainIterator () const
 Get an iterator that traverse the particles in the domain. More...
 
auto getDomainIteratorDevice (size_t n_thr=default_kernel_wg_threads_) const -> decltype(this->getDomainIterator())
 Get an iterator that traverse the particles in the domain. More...
 
vector_dist_iterator getDomainIterator_no_se3 () const
 Get an iterator that traverse the particles in the domain. More...
 
vector_dist_iterator getDomainAndGhostIterator () const
 Get an iterator that traverse the particles in the domain. More...
 
vector_dist_iterator getDomainAndGhostIterator_no_se3 () const
 Get an iterator that traverse the particles in the domain. More...
 
DecompositiongetDecomposition ()
 Get the decomposition. More...
 
const DecompositiongetDecomposition () const
 Get the decomposition. More...
 
void map_list (size_t opt=NONE)
 It move all the particles that does not belong to the local processor to the respective processor. More...
 
void map (size_t opt=NONE)
 It move all the particles that does not belong to the local processor to the respective processor. More...
 
void ghost_get_subset ()
 Stub does not do anything. More...
 
void ghost_get (size_t opt=WITH_POSITION)
 It synchronize the properties and position of the ghost particles. More...
 
void Ighost_get (size_t opt=WITH_POSITION)
 It synchronize the properties and position of the ghost particles. More...
 
void ghost_wait (size_t opt=WITH_POSITION)
 It synchronize the properties and position of the ghost particles. More...
 
void ghost_put (size_t opt_=NONE)
 It synchronize the properties and position of the ghost particles. More...
 
void remove (openfpm::vector< size_t > &keys, size_t start=0)
 Remove a set of elements from the distributed vector. More...
 
void remove (openfpm::vector< aggregate< int >> &keys, size_t start=0)
 Remove a set of elements from the distributed vector. More...
 
void remove (size_t key)
 Remove one element from the distributed vector. More...
 
void addComputationCosts (const self &vd, Model md=Model())
 Add the computation cost on the decomposition coming from the particles. More...
 
void addComputationCosts (Model md=Model(), size_t ts=1)
 Add the computation cost on the decomposition coming from the particles. More...
 
void finalizeComputationCosts (Model md=Model(), size_t ts=1)
 Add the computation cost on the decomposition coming from the particles. More...
 
void initializeComputationCosts ()
 Initialize the computational cost. More...
 
void save (const std::string &filename) const
 Save the distributed vector on HDF5 file. More...
 
void load (const std::string &filename)
 Load the distributed vector from an HDF5 file. More...
 
void setCapacity (unsigned int ns)
 Reserve space for the internal vectors. More...
 
bool write (std::string out, int opt=VTK_WRITER)
 Output particle position and properties. More...
 
bool write (std::string out, std::string meta_info, int opt=VTK_WRITER)
 Output particle position and properties. More...
 
void deleteGhost ()
 Delete the particles on the ghost. More...
 
void resize (size_t rs)
 Resize the vector (locally) More...
 
bool write_frame (std::string out, size_t iteration, int opt=VTK_WRITER)
 Output particle position and properties. More...
 
bool write_frame (std::string out, size_t iteration, std::string meta_info, int opt=VTK_WRITER)
 Output particle position and properties. More...
 
void getCellListParams (St r_cut, size_t(&div)[dim], Box< dim, St > &box, Ghost< dim, St > enlarge=Ghost< dim, St >(0.0))
 Get the Celllist parameters. More...
 
long int who ()
 It return the id of structure in the allocation list. More...
 
Vcluster< Memory > & getVC ()
 Get the Virtual Cluster machine. More...
 
const openfpm::vector< Point< dim, St >, Memory, layout_base > & getPosVector () const
 return the position vector of all the particles More...
 
openfpm::vector< Point< dim, St >, Memory, layout_base > & getPosVector ()
 return the position vector of all the particles More...
 
const openfpm::vector< AggregateAppend< int, prop >::type,Memory, layout_base > & getPropVector () const
 return the property vector of all the particles More...
 
openfpm::vector< AggregateAppend< int, prop >::type,Memory, layout_base > & getPropVector ()
 return the property vector of all the particles More...
 
const openfpm::vector< Point< dim, St >, Memory, layout_base > & getPosVectorSort () const
 return the position vector of all the particles More...
 
openfpm::vector< Point< dim, St >, Memory, layout_base > & getPosVectorSort ()
 return the position vector of all the particles More...
 
const openfpm::vector< AggregateAppend< int, prop >::type,Memory, layout_base > & getPropVectorSort () const
 return the property vector of all the particles More...
 
openfpm::vector< AggregateAppend< int, prop >::type,Memory, layout_base > & getPropVectorSort ()
 return the property vector of all the particles More...
 
size_t accum ()
 It return the sum of the particles in the previous processors. More...
 
ParticleItCRS_Cells< dim, cli, decltype(v_pos)> getParticleIteratorCRS_Cell (cli &NN)
 Get a special particle iterator able to iterate across particles using symmetric crossing scheme. More...
 
void setPropNames (const openfpm::vector< std::string > &names)
 Set the properties names. More...
 
openfpm::vector< std::string > & getPropNames ()
 Get the properties names. More...
 
openfpm::vector_key_iterator_seq< typename vrl::Mem_type_type::local_index_type > getParticleIteratorCRS (vrl &NN)
 Get a special particle iterator able to iterate across particles using symmetric crossing scheme. More...
 
grid_key_dx< dim > getCRSStart (Celllist &NN)
 Return from which cell we have to start in case of CRS interation scheme. More...
 
grid_key_dx< dim > getCRSStop (Celllist &NN)
 Return from which cell we have to stop in case of CRS interation scheme. More...
 
bool isSubset () const
 Indicate that this class is not a subset. More...
 
void deviceToHostProp ()
 Move the memory from the device to host memory. More...
 
void deviceToHostPos ()
 Move the memory from the device to host memory. More...
 
void hostToDeviceProp ()
 Move the memory from the device to host memory. More...
 
void hostToDevicePos ()
 Move the memory from the device to host memory. More...
 
- Public Member Functions inherited from vector_dist_comm< dim, St, AggregateAppend< int, prop >::type, Decomposition, Memory, layout_base >
 vector_dist_comm (const vector_dist_comm< dim, St, AggregateAppend< int, prop >::type, 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...
 
void ghost_get_ (openfpm::vector< Point< dim, St >, Memory, layout_base > &v_pos, openfpm::vector< AggregateAppend< int, prop >::type, 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...
 
void ghost_wait_ (openfpm::vector< Point< dim, St >, Memory, layout_base > &v_pos, openfpm::vector< AggregateAppend< int, prop >::type, 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...
 
void map_list_ (openfpm::vector< Point< dim, St >> &v_pos, openfpm::vector< AggregateAppend< int, prop >::type > &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...
 
void map_ (openfpm::vector< Point< dim, St >, Memory, layout_base > &v_pos, openfpm::vector< AggregateAppend< int, prop >::type, 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...
 
DecompositiongetDecomposition ()
 Get the decomposition. More...
 
const DecompositiongetDecomposition () const
 Get the decomposition. More...
 
vector_dist_comm< dim, St, AggregateAppend< int, prop >::type, Decomposition, Memory, layout_base > & operator= (const vector_dist_comm< dim, St, AggregateAppend< int, prop >::type, Decomposition, Memory, layout_base > &vc)
 Copy a vector. More...
 
vector_dist_comm< dim, St, AggregateAppend< int, prop >::type, Decomposition, Memory, layout_base > & operator= (vector_dist_comm< dim, St, AggregateAppend< int, prop >::type, Decomposition, Memory, layout_base > &&vc)
 Copy a vector. More...
 
void ghost_put_ (openfpm::vector< Point< dim, St >, Memory, layout_base > &v_pos, openfpm::vector< AggregateAppend< int, prop >::type, Memory, layout_base > &v_prp, size_t &g_m, size_t opt)
 Ghost put. More...
 

Additional Inherited Members

- Data Fields inherited from vector_dist< dim, St, AggregateAppend< int, prop >::type, Decomposition, Memory, layout_base >
decltype(v_pos) typedef internal_position_vector_type
 
- Static Public Attributes inherited from vector_dist< dim, St, AggregateAppend< int, prop >::type, Decomposition, Memory, layout_base >
static const unsigned int dims
 dimensions of space
 

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