Distributed vector. More...
#include <vector_dist.hpp>
Inheritance diagram for vector_dist< dim, St, prop, Decomposition, Memory, layout_base, vector_dist_pos, vector_dist_prop >:Public Types | |
| typedef vector_dist< dim, St, prop, Decomposition, Memory, layout_base > | self |
| Self type. | |
| typedef St | stype |
| typedef prop | value_type |
| typedef Decomposition | Decomposition_type |
| typedef Memory | Memory_type |
| typedef CellList< dim, St, Mem_fast<>, shift< dim, St >, internal_position_vector_type > | CellList_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 | |
| vector_dist< dim, St, prop, Decomposition, Memory, layout_base > & | operator= (const vector_dist< dim, St, prop, Decomposition, Memory, layout_base > &v) |
| Operator= for distributed vector. More... | |
| vector_dist< dim, St, prop, Decomposition, Memory, layout_base > & | operator= (vector_dist< dim, St, prop, Decomposition, Memory, layout_base > &&v) |
| Operator= for distributed vector. More... | |
| vector_dist (const vector_dist< dim, St, prop, Decomposition, Memory, layout_base > &v) | |
| Copy Constructor. More... | |
| vector_dist (vector_dist< dim, St, prop, 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 | |
| size_t | size_local () 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(vPos.template get< 0 >(vec_key.getKey())) |
| Get the position of an element. More... | |
| auto | getPos (vect_dist_key_dx vec_key) const -> decltype(vPos.template get< 0 >(vec_key.getKey())) |
| Get the position of an element. More... | |
| auto | getPos (size_t vec_key) -> decltype(vPos.template get< 0 >(vec_key)) |
| Get the position of an element. More... | |
| auto | getPos (size_t vec_key) const -> decltype(vPos.template get< 0 >(vec_key)) |
| Get the position of an element. More... | |
| template<unsigned int id> | |
| auto | getProp (vect_dist_key_dx vec_key) -> decltype(vPrp.template get< id >(vec_key.getKey())) |
| Get the property of an element. More... | |
| template<unsigned int id> | |
| auto | getProp (vect_dist_key_dx vec_key) const -> decltype(vPrp.template get< id >(vec_key.getKey())) |
| Get the property of an element. More... | |
| template<unsigned int id> | |
| auto | getProp (size_t vec_key) -> decltype(vPrp.template get< id >(vec_key)) |
| Get the property of an element. More... | |
| template<unsigned int id> | |
| auto | getProp (size_t vec_key) const -> decltype(vPrp.template get< id >(vec_key)) |
| Get the property of an element. More... | |
| auto | getPosNC (vect_dist_key_dx vec_key) -> decltype(vPos.template get< 0 >(vec_key.getKey())) |
| Get the position of an element. More... | |
| auto | getPosNC (vect_dist_key_dx vec_key) const -> decltype(vPos.template get< 0 >(vec_key.getKey())) |
| Get the position of an element. More... | |
| auto | getPosNC (size_t vec_key) -> decltype(vPos.template get< 0 >(vec_key)) |
| Get the position of an element. More... | |
| auto | getPosNC (size_t vec_key) const -> decltype(vPos.template get< 0 >(vec_key)) |
| Get the position of an element. More... | |
| template<unsigned int id> | |
| auto | getPropNC (vect_dist_key_dx vec_key) -> decltype(vPrp.template get< id >(vec_key.getKey())) |
| Get the property of an element. More... | |
| template<unsigned int id> | |
| auto | getPropNC (vect_dist_key_dx vec_key) const -> decltype(vPrp.template get< id >(vec_key.getKey())) |
| Get the property of an element. More... | |
| template<unsigned int id> | |
| auto | getPropNC (size_t vec_key) -> decltype(vPrp.template get< id >(vec_key)) |
| Get the property of an element. More... | |
| template<unsigned int id> | |
| auto | getPropNC (size_t vec_key) const -> decltype(vPrp.template get< id >(vec_key)) |
| Get the property of an element. More... | |
| auto | getPosWrite (vect_dist_key_dx vec_key) -> decltype(vPos.template get< 0 >(vec_key.getKey())) |
| Get the position of an element. More... | |
| auto | getPosRead (vect_dist_key_dx vec_key) const -> decltype(vPos.template get< 0 >(vec_key.getKey())) |
| Get the position of an element. More... | |
| template<unsigned int id> | |
| auto | getPropWrite (vect_dist_key_dx vec_key) -> decltype(vPrp.template get< id >(vec_key.getKey())) |
| Get the property of an element. More... | |
| template<unsigned int id> | |
| auto | getPropRead (vect_dist_key_dx vec_key) const -> decltype(vPrp.template get< id >(vec_key.getKey())) |
| Get the property of an element. More... | |
| void | add () |
| Add local particle. More... | |
| void | appendLocal () |
| Add at the END of local and ghost particle. More... | |
| auto | getLastPos () -> decltype(vPos.template get< 0 >(0)) |
| Get the position of the last element. More... | |
| auto | getLastPosEnd () -> decltype(vPos.template get< 0 >(0)) |
| Get the position of the last element after ghost. More... | |
| template<unsigned int id> | |
| auto | getLastProp () -> decltype(vPrp.template get< id >(0)) |
| Get the property of the last element. More... | |
| auto | getLastPosRead () -> decltype(vPos.template get< 0 >(0)) |
| Get the position of the last element. More... | |
| template<unsigned int id> | |
| auto | getLastPropRead () -> decltype(vPrp.template get< id >(0)) |
| Get the property of the last element. More... | |
| auto | getLastPosWrite () -> decltype(vPos.template get< 0 >(0)) |
| Get the position of the last element. More... | |
| template<unsigned int id> | |
| auto | getLastPropWrite () -> decltype(vPrp.template get< id >(0)) |
| Get the property of the last element. More... | |
| template<typename CellList_type = CellList<dim, St, Mem_fast<>, shift<dim, St>,internal_position_vector_type >> | |
| CellList_type | getCellListSym (St r_cut, size_t opt=CL_LINEAR_CELL_KEYS) |
| Construct a cell list symmetric based on a cut-off radius. More... | |
| template<typename CellList_type = CellList<dim, St, Mem_fast<>, shift<dim, St>,internal_position_vector_type >> | |
| CellList_type | getCellListSymLocal (St r_cut, size_t opt=CL_LINEAR_CELL_KEYS) |
| Construct a local symmetric cell list based on a cut-off radius. More... | |
| template<typename CellList_type = CellList<dim, St, Mem_fast<>, shift<dim, St>, decltype(vPos) >> | |
| CellList_type | getCellList (St r_cut, size_t opt=CL_NON_SYMMETRIC|CL_LINEAR_CELL_KEYS, bool no_se3=false, float ghostEnlargeFactor=1.013) |
| Construct a cell list starting from the stored particles. More... | |
| template<typename CellL = CellList<dim, St, Mem_fast<>, shift<dim, St> >> | |
| CellL | getCellListSym (const size_t(&div)[dim], const size_t(&pad)[dim], size_t opt=CL_LINEAR_CELL_KEYS) |
| Construct a symmetric cell list based on a number of divisions and padding. More... | |
| template<typename CellL = CellList<dim, St, Mem_fast<>, shift<dim, St> >> | |
| CellL | getCellList_hilb (St r_cut, size_t opt=CL_NON_SYMMETRIC) |
| Construct an hilbert cell list starting from the stored particles. More... | |
| template<unsigned int ... prp, typename CellL > | |
| void | updateCellList (CellL &cellList, bool no_se3=false) |
| Update a cell list using the stored particles. More... | |
| template<typename VerletList_type = VerletList<dim,St,VL_SYMMETRIC,Mem_fast<>,shift<dim,St>,decltype(vPos)>> | |
| VerletList_type | getVerletSym (St r_cut) |
| for each particle get the symmetric verlet list More... | |
| template<typename VerletList_type = VerletList<dim,St,VL_CRS_SYMMETRIC,Mem_fast<>,shift<dim,St>,decltype(vPos)>> | |
| VerletList_type | getVerletCrs (St r_cut) |
| for each particle get the symmetric verlet list More... | |
| template<typename VerletList_type = VerletList<dim,St,VL_NON_SYMMETRIC|VL_ADAPTIVE_RCUT,Mem_fast<>,shift<dim,St>,decltype(vPos)>> | |
| VerletList_type | getVerletAdaptRCut () |
| Get Verlet list with unique cut-off radius for every particle. More... | |
| template<unsigned int optVerlet = VL_NON_SYMMETRIC, typename VerletList_type = VerletList<dim,St,optVerlet,Mem_fast<>,shift<dim,St>,decltype(vPos)>> | |
| VerletList_type | getVerlet (St r_cut, size_t neighborMaxNum=0) |
| for each particle get the verlet list More... | |
| template<unsigned int opt, typename Mem_type > | |
| void | updateVerlet (VerletList< dim, St, opt, Mem_type, shift< dim, St > > &verletList, St r_cut) |
| for each particle get the verlet list More... | |
| template<unsigned int opt, typename Mem_type > | |
| void | updateVerletAdaptRCut (VerletList< dim, St, opt, Mem_type, shift< dim, St > > &verletList) |
| Update non-symmetric adaptive r-cut Verlet list. More... | |
| template<typename CellL = CellList<dim,St,Mem_bal<>,shift<dim,St> >> | |
| 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... | |
| template<typename CellL = CellList<dim,St,Mem_bal<>,shift<dim,St> >> | |
| 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... | |
| template<typename CellL = CellList<dim,St,Mem_bal<>,shift<dim,St> >> | |
| 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< Decomposition > | getGridIterator (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... | |
| template<typename CellList > | |
| ParticleIt_Cells< dim, CellList > | getDomainIteratorCells (CellList &cellList) |
| 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... | |
| Decomposition & | getDecomposition () |
| Get the decomposition. More... | |
| const Decomposition & | getDecomposition () const |
| Get the decomposition. More... | |
| template<unsigned int ... prp> | |
| 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... | |
| template<typename obp = KillParticle> | |
| 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. | |
| template<int ... prp> | |
| void | ghost_get (size_t opt=WITH_POSITION) |
| It synchronize the properties and position of the ghost particles. More... | |
| template<int ... prp> | |
| void | Ighost_get (size_t opt=WITH_POSITION) |
| It synchronize the properties and position of the ghost particles. More... | |
| template<int ... prp> | |
| void | ghost_wait (size_t opt=WITH_POSITION) |
| It synchronize the properties and position of the ghost particles. More... | |
| template<template< typename, typename > class op, int ... prp> | |
| void | ghost_put (size_t opt_=NONE) |
| It synchronize the properties and position of the ghost particles. More... | |
| void | remove (std::set< size_t > &keys) |
| Remove a set of elements from the distributed vector. 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... | |
| template<typename Model = ModelLin> | |
| void | addComputationCosts (const self &vd, Model md=Model()) |
| Add the computation cost on the decomposition coming from the particles. More... | |
| template<typename Model = ModelLin> | |
| 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. | |
| template<typename Model = ModelLin> | |
| void | addComputationCosts (Model md=Model(), size_t ts=1) |
| Add the computation cost on the decomposition coming from the particles. 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. | |
| void | resize (size_t rs) |
| Resize the vector (locally) More... | |
| void | discardLocalAppend (size_t rs) |
| Resize the vector at the end of the ghost (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... | |
| bool | write_frame (std::string out, size_t iteration, double time, int opt=VTK_WRITER) |
| Output particle position and properties and add a time stamp to pvtp. 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... | |
| Vcluster< Memory > & | getVC () |
| Get the Virtual Cluster machine. More... | |
| const vector_dist_pos & | getPosVector () const |
| return the position vector of all the particles More... | |
| vector_dist_pos & | getPosVector () |
| return the position vector of all the particles More... | |
| const vector_dist_prop & | getPropVector () const |
| return the property vector of all the particles More... | |
| vector_dist_prop & | getPropVector () |
| return the property vector of all the particles More... | |
| size_t | accum () |
| It return the sum of the particles in the previous processors. More... | |
| template<typename cli > | |
| ParticleItCRS_Cells< dim, cli, decltype(vPos)> | getParticleIteratorCRS_Cell (cli &cellList) |
| 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... | |
| template<typename VerletList_type > | |
| openfpm::vector_key_iterator_seq< typename VerletList_type::Mem_type_type::local_index_type > | getParticleIteratorCRS (VerletList_type &cellList) |
| Get a special particle iterator able to iterate across particles using symmetric crossing scheme. More... | |
| template<typename Celllist > | |
| grid_key_dx< dim > | getCRSStart (Celllist &cellList) |
| Return from which cell we have to start in case of CRS interation scheme. More... | |
| template<typename Celllist > | |
| grid_key_dx< dim > | getCRSStop (Celllist &cellList) |
| 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... | |
| template<unsigned int ... prp> | |
| void | deviceToHostProp () |
| Move the memory from the device to host memory. More... | |
| void | deviceToHostPos () |
| Move the memory from the device to host memory. More... | |
| template<unsigned int ... prp> | |
| 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, prop, CartDecomposition< dim, St >, HeapMemory, memory_traits_lin > | |
| vector_dist_comm (const vector_dist_comm< dim, St, prop, CartDecomposition< dim, St >, HeapMemory, memory_traits_lin > &v) | |
| Copy Constructor. More... | |
| vector_dist_comm (const CartDecomposition< dim, St > &dec) | |
| Constructor. More... | |
| vector_dist_comm (CartDecomposition< dim, St > &&dec) | |
| Constructor. More... | |
| vector_dist_comm () | |
| Constructor. | |
| ~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 >, HeapMemory, memory_traits_lin > &v_pos, openfpm::vector< prop, HeapMemory, memory_traits_lin > &v_prp, size_t &ghostMarker, size_t opt=WITH_POSITION) |
| It synchronize the properties and position of the ghost particles. More... | |
| void | ghost_wait_ (openfpm::vector< Point< dim, St >, HeapMemory, memory_traits_lin > &v_pos, openfpm::vector< prop, HeapMemory, memory_traits_lin > &v_prp, size_t &ghostMarker, 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< prop > &v_prp, size_t &ghostMarker, 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 >, HeapMemory, memory_traits_lin > &v_pos, openfpm::vector< prop, HeapMemory, memory_traits_lin > &v_prp, size_t &ghostMarker, size_t opt) |
| It move all the particles that does not belong to the local processor to the respective processor. More... | |
| void | setDecomposition (CartDecomposition< dim, St > &dec2) |
| Set the decomposition. More... | |
| CartDecomposition< dim, St > & | getDecomposition () |
| Get the decomposition. More... | |
| const CartDecomposition< dim, St > & | getDecomposition () const |
| Get the decomposition. More... | |
| vector_dist_comm< dim, St, prop, CartDecomposition< dim, St >, HeapMemory, memory_traits_lin > & | operator= (const vector_dist_comm< dim, St, prop, CartDecomposition< dim, St >, HeapMemory, memory_traits_lin > &vc) |
| Copy a vector. More... | |
| vector_dist_comm< dim, St, prop, CartDecomposition< dim, St >, HeapMemory, memory_traits_lin > & | operator= (vector_dist_comm< dim, St, prop, CartDecomposition< dim, St >, HeapMemory, memory_traits_lin > &&vc) |
| Copy a vector. More... | |
| void | ghost_put_ (openfpm::vector< Point< dim, St >, HeapMemory, memory_traits_lin > &v_pos, openfpm::vector< prop, HeapMemory, memory_traits_lin > &v_prp, size_t &ghostMarker, size_t opt) |
| Ghost put. More... | |
Data Fields | |
| decltype(vPos) typedef | internal_position_vector_type |
Static Public Attributes | |
| static const unsigned int | dims = dim |
| template parameters typedefs | |
Private Member Functions | |
| void | init_structures (size_t np) |
| Initialize the structures. More... | |
| void | check_parameters (Box< dim, St > &box) |
| Check if the parameters describe a valid vector. In case it does not report an error. More... | |
| void | check_ghost_compatible_rcut (St r_cut) |
| It check that the r_cut is not bugger than the ghost. More... | |
| template<typename CellL , typename sfc_it > | |
| void | reorder_sfc (openfpm::vector< Point< dim, St >> &v_pos_dest, openfpm::vector< prop > &v_prp_dest, sfc_it &h_it, CellL &cellList) |
| Reorder based on hilbert space filling curve. More... | |
Private Member Functions inherited from vector_dist_ker_list< int > | |
| void | add (int &v) |
| Add a new vector_dist_kernel to track. More... | |
| void | update (const int &v) |
| Update the addresses of all vector_dist_kernels around. More... | |
| void | remove (int &v) |
| Remove one vector_dist_kernels entry. More... | |
| size_t | n_entry () |
| Return the number of entries. More... | |
| bool | check (const int &v) |
| Check that all the entries are aligned to the latest vector_dist_ker_type. More... | |
Private Attributes | |
| size_t | ghostMarker = 0 |
| Ghost marker, all the particle with id > ghostMarker are ghost all with ghostMarker < are real particle. | |
| vector_dist_pos | vPos |
| vector_dist_pos | vPosReordered |
| vector_dist_prop | vPrp |
| vector_dist_prop | vPrpReordered |
| size_t | opt = 0 |
| option used to create this vector | |
| openfpm::vector< std::string > | prp_names |
| Name of the properties. | |
Distributed vector.
This class represent a distributed vector, the distribution of the structure is based on the positional information of the elements the vector store
| 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 ... |
| Memory | layout |
Definition at line 170 of file vector_dist.hpp.
|
inline |
|
inlinenoexcept |
|
inline |
Constructor with predefined decomposition.
| dec | is the decomposition |
| np | number of particles |
Definition at line 442 of file vector_dist.hpp.
|
inline |
Constructor of a distributed vector.
| np | number of elements |
| box | domain where the vector of elements live |
| bc | boundary conditions |
| g | Ghost margins |
| opt | [Optional] additional options. BIND_DEC_TO_GHOST Bind the decomposition to be multiple of the ghost size. This is required if we want to use symmetric to eliminate ghost communications. |
| gdist | [Optional] override the default distribution grid |
Definition at line 468 of file vector_dist.hpp.
|
inline |
Constructor of a distributed vector.
| np | number of elements |
| box | domain where the vector of elements live |
| bc | boundary conditions |
| g | Ghost margins |
| opt | [Optional] additional options. BIND_DEC_TO_GHOST Bind the decomposition to be multiple of the ghost size. This is required if we want to use symmetric to eliminate ghost communications. |
| gdist | [Optional] override the default distribution grid |
Definition at line 498 of file vector_dist.hpp.
|
inline |
It return the sum of the particles in the previous processors.
Definition at line 2806 of file vector_dist.hpp.
|
inline |
Add local particle.
It add a local particle, with "local" we mean in this processor the particle can be also created out of the processor domain, in this case a call to map is required. Added particles are always created at the end and can be accessed with getLastPos and getLastProp
Definition at line 923 of file vector_dist.hpp.
|
inline |
Add the computation cost on the decomposition coming from the particles.
| md | Model to use |
| vd | external vector to add for the computational cost |
Definition at line 2381 of file vector_dist.hpp.
|
inline |
Add the computation cost on the decomposition coming from the particles.
| md | Model to use |
| ts | It is an optional parameter approximately should be the number of ghost get between two rebalancing at first decomposition this number can be ignored (default = 1) because not used |
Definition at line 2445 of file vector_dist.hpp.
|
inline |
Add at the END of local and ghost particle.
It add a local particle at the end of local and ghost, with "local" we mean in this processor the particle can be also created out of the processor domain, in this case a call to map is required. Added particles are always created at the end and can be accessed with getLastPos and getLastProp
Definition at line 946 of file vector_dist.hpp.
|
inlineprivate |
It check that the r_cut is not bugger than the ghost.
| r_cut | cut-off radius |
Definition at line 278 of file vector_dist.hpp.
|
inlineprivate |
Check if the parameters describe a valid vector. In case it does not report an error.
| box | Box to check |
Definition at line 262 of file vector_dist.hpp.
|
inline |
Move the memory from the device to host memory.
| property | to move use POS_PROP for position property |
Definition at line 3093 of file vector_dist.hpp.
|
inline |
Move the memory from the device to host memory.
| property | to move use POS_PROP for position property |
Definition at line 3085 of file vector_dist.hpp.
|
inline |
Resize the vector at the end of the ghost (locally)
| rs |
Definition at line 2593 of file vector_dist.hpp.
|
inline |
Add the computation cost on the decomposition coming from the particles.
| md | Model to use |
| ts | It is an optional parameter approximately should be the number of ghost get between two rebalancing at first decomposition this number can be ignored (default = 1) because not used |
Definition at line 2410 of file vector_dist.hpp.
|
inline |
Construct a cell list starting from the stored particles.
| CellL | CellList type to construct |
| r_cut | interation radius, or size of each cell |
| no_se3 | avoid SE_CLASS3 checking |
Definition at line 1094 of file vector_dist.hpp.
|
inline |
Construct an hilbert cell list starting from the stored particles.
| CellL | CellList type to construct |
| r_cut | interation radius, or size of each cell |
Definition at line 1274 of file vector_dist.hpp.
|
inline |
Get the Celllist parameters.
| r_cut | spacing of the cell-list |
| div | division required for the cell-list |
| box | where the Cell list must be defined (In general Processor domain + Ghost) |
| enlarge | Optionally a request to make the space a littler bit larger than Processor domain + Ghost keeping the cell list consistent with the requests |
Definition at line 2732 of file vector_dist.hpp.
|
inline |
Construct a symmetric cell list based on a number of divisions and padding.
| CellL | CellList type to construct |
| div | number of cells per dimension |
| number | of padding layers per dimension |
Definition at line 1173 of file vector_dist.hpp.
|
inline |
Construct a cell list symmetric based on a cut-off radius.
| CellList_type | CellList type to construct |
| r_cut | interation radius, or size of each cell |
Definition at line 1063 of file vector_dist.hpp.
|
inline |
Construct a local symmetric cell list based on a cut-off radius.
| CellList_type | CellList type to construct |
| r_cut | interation radius, or size of each cell |
Definition at line 1078 of file vector_dist.hpp.
|
inline |
Return from which cell we have to start in case of CRS interation scheme.
| cellList | cell-list |
Definition at line 2920 of file vector_dist.hpp.
|
inline |
Return from which cell we have to stop in case of CRS interation scheme.
| cellList | cell-list |
Definition at line 2933 of file vector_dist.hpp.
|
inline |
|
inline |
|
inline |
Get an iterator that traverse the particles in the domain.
Definition at line 2077 of file vector_dist.hpp.
|
inline |
Get an iterator that traverse the particles in the domain.
Definition at line 2091 of file vector_dist.hpp.
|
inline |
Get an iterator that traverse the particles in the domain.
Definition at line 1942 of file vector_dist.hpp.
|
inline |
Get an iterator that traverse the particles in the domain.
Definition at line 2067 of file vector_dist.hpp.
|
inline |
Get an iterator that traverse the particles in the domain using a cell list.
| cellList | Cell-list |
Definition at line 1917 of file vector_dist.hpp.
|
inline |
Get an iterator that traverse the particles in the domain.
Definition at line 2054 of file vector_dist.hpp.
|
inline |
Get the iterator across the position of the ghost particles.
Definition at line 1889 of file vector_dist.hpp.
|
inline |
Get the iterator across the position of the ghost particles.
Definition at line 1903 of file vector_dist.hpp.
|
inline |
/brief Get a grid Iterator
Usefull function to place particles on a grid or grid-like (grid + noise)
| sz | size of the grid |
Definition at line 1870 of file vector_dist.hpp.
|
inline |
Get an iterator that traverse domain and ghost particles.
Definition at line 1837 of file vector_dist.hpp.
|
inline |
Get an iterator that traverse domain and ghost particles.
| start | particle |
| stop | particle |
Definition at line 1853 of file vector_dist.hpp.
|
inline |
Get the position of the last element.
Definition at line 958 of file vector_dist.hpp.
|
inline |
Get the position of the last element after ghost.
Definition at line 969 of file vector_dist.hpp.
|
inline |
Get the position of the last element.
Definition at line 995 of file vector_dist.hpp.
|
inline |
Get the position of the last element.
Definition at line 1026 of file vector_dist.hpp.
|
inline |
Get the property of the last element.
| id | property id |
Definition at line 981 of file vector_dist.hpp.
|
inline |
Get the property of the last element.
| id | property id |
Definition at line 1011 of file vector_dist.hpp.
|
inline |
Get the property of the last element.
| id | property id |
Definition at line 1042 of file vector_dist.hpp.
|
inline |
Get a special particle iterator able to iterate across particles using symmetric crossing scheme.
| cellList | Verlet list neighborhood |
Definition at line 2898 of file vector_dist.hpp.
|
inline |
Get a special particle iterator able to iterate across particles using symmetric crossing scheme.
| cellList | Cell-List neighborhood |
Definition at line 2833 of file vector_dist.hpp.
|
inline |
Get the position of an element.
see the vector_dist iterator usage to get an element key
| vec_key | element |
Definition at line 620 of file vector_dist.hpp.
|
inline |
Get the position of an element.
see the vector_dist iterator usage to get an element key
| vec_key | element |
Definition at line 637 of file vector_dist.hpp.
|
inline |
Get the position of an element.
see the vector_dist iterator usage to get an element key
| vec_key | element |
Definition at line 585 of file vector_dist.hpp.
|
inline |
Get the position of an element.
see the vector_dist iterator usage to get an element key
| vec_key | element |
Definition at line 603 of file vector_dist.hpp.
|
inline |
Get the position of an element.
see the vector_dist iterator usage to get an element key
| vec_key | element |
Definition at line 758 of file vector_dist.hpp.
|
inline |
Get the position of an element.
see the vector_dist iterator usage to get an element key
| vec_key | element |
Definition at line 772 of file vector_dist.hpp.
|
inline |
Get the position of an element.
see the vector_dist iterator usage to get an element key
| vec_key | element |
Definition at line 730 of file vector_dist.hpp.
|
inline |
Get the position of an element.
see the vector_dist iterator usage to get an element key
| vec_key | element |
Definition at line 744 of file vector_dist.hpp.
|
inline |
Get the position of an element.
see the vector_dist iterator usage to get an element key
| vec_key | element |
Definition at line 866 of file vector_dist.hpp.
|
inline |
return the position vector of all the particles
Definition at line 2776 of file vector_dist.hpp.
|
inline |
return the position vector of all the particles
Definition at line 2766 of file vector_dist.hpp.
|
inline |
Get the position of an element.
see the vector_dist iterator usage to get an element key
| vec_key | element |
Definition at line 848 of file vector_dist.hpp.
|
inline |
Get the property of an element.
see the vector_dist iterator usage to get an element key
| id | property id |
| vec_key | vector element |
Definition at line 691 of file vector_dist.hpp.
|
inline |
Get the property of an element.
see the vector_dist iterator usage to get an element key
| id | property id |
| vec_key | vector element |
Definition at line 709 of file vector_dist.hpp.
|
inline |
Get the property of an element.
see the vector_dist iterator usage to get an element key
| id | property id |
| vec_key | vector element |
Definition at line 655 of file vector_dist.hpp.
|
inline |
Get the property of an element.
see the vector_dist iterator usage to get an element key
| id | property id |
| vec_key | vector element |
Definition at line 673 of file vector_dist.hpp.
|
inline |
Get the properties names.
It is useful to get name for the properties in vtk writers
Definition at line 2883 of file vector_dist.hpp.
|
inline |
Get the property of an element.
see the vector_dist iterator usage to get an element key
| id | property id |
| vec_key | vector element |
Definition at line 817 of file vector_dist.hpp.
|
inline |
Get the property of an element.
see the vector_dist iterator usage to get an element key
| id | property id |
| vec_key | vector element |
Definition at line 832 of file vector_dist.hpp.
|
inline |
Get the property of an element.
see the vector_dist iterator usage to get an element key
| id | property id |
| vec_key | vector element |
Definition at line 787 of file vector_dist.hpp.
|
inline |
Get the property of an element.
see the vector_dist iterator usage to get an element key
| id | property id |
| vec_key | vector element |
Definition at line 802 of file vector_dist.hpp.
|
inline |
Get the property of an element.
see the vector_dist iterator usage to get an element key
| id | property id |
| vec_key | vector element |
Definition at line 904 of file vector_dist.hpp.
|
inline |
return the property vector of all the particles
Definition at line 2796 of file vector_dist.hpp.
|
inline |
return the property vector of all the particles
Definition at line 2786 of file vector_dist.hpp.
|
inline |
Get the property of an element.
see the vector_dist iterator usage to get an element key
| id | property id |
| vec_key | vector element |
Definition at line 885 of file vector_dist.hpp.
|
inline |
Get the Virtual Cluster machine.
Definition at line 2753 of file vector_dist.hpp.
|
inline |
for each particle get the verlet list
| r_cut | cut-off radius |
| nMax | Max number of neighboring particles added per p (sorted by distance). By default all are included Should be supplied additionally with option flag VL_NMAX_NEIGHBOR to VerletList_type template type |
Definition at line 1515 of file vector_dist.hpp.
|
inline |
Get Verlet list with unique cut-off radius for every particle.
| rCuts | list of cut-off radii for every particle in vPos |
Definition at line 1480 of file vector_dist.hpp.
|
inline |
for each particle get the symmetric verlet list
| r_cut | cut-off radius |
Definition at line 1426 of file vector_dist.hpp.
|
inline |
for each particle get the symmetric verlet list
| r_cut | cut-off radius |
Definition at line 1413 of file vector_dist.hpp.
|
inline |
It synchronize the properties and position of the ghost particles.
| prp | list of properties to get synchronize |
| opt | options WITH_POSITION, it send also the positional information of the particles |
Definition at line 2203 of file vector_dist.hpp.
|
inline |
It synchronize the properties and position of the ghost particles.
| op | which kind of operation to apply |
| prp | list of properties to get synchronize |
| opt_ | options. It is an optional parameter. If set to NO_CHANGE_ELEMENTS the communication has lower latencies. This option has some usage limitations, so please refere to the examples for further explanations |
Definition at line 2304 of file vector_dist.hpp.
|
inline |
It synchronize the properties and position of the ghost particles.
| prp | list of properties to get synchronize |
| opt | options WITH_POSITION, it send also the positional information of the particles |
Definition at line 2267 of file vector_dist.hpp.
|
inline |
Move the memory from the device to host memory.
| property | to move use POS_PROP for position property |
Definition at line 3109 of file vector_dist.hpp.
|
inline |
Move the memory from the device to host memory.
| property | to move use POS_PROP for position property |
Definition at line 3101 of file vector_dist.hpp.
|
inline |
It synchronize the properties and position of the ghost particles.
| prp | list of properties to get synchronize |
| opt | options WITH_POSITION, it send also the positional information of the particles |
Definition at line 2241 of file vector_dist.hpp.
|
inline |
It return the number of particles contained by the previous processors.
Given 1000 particles and 3 processors, you will get
| np | initial number of particles |
Definition at line 1809 of file vector_dist.hpp.
|
inlineprivate |
Initialize the structures.
| np | number of particles |
Definition at line 234 of file vector_dist.hpp.
|
inline |
Indicate that this class is not a subset.
Definition at line 2947 of file vector_dist.hpp.
|
inline |
Load the distributed vector from an HDF5 file.
| filename | file from where to load |
Definition at line 2471 of file vector_dist.hpp.
|
inline |
It move all the particles that does not belong to the local processor to the respective processor.
| out | of bound policy it specify what to do when the particles are detected out of bound |
In general this function is called after moving the particles to move the elements out the local processor. Or just after initialization if each processor contain non local particles
| opt | options |
Definition at line 2158 of file vector_dist.hpp.
|
inline |
It move all the particles that does not belong to the local processor to the respective processor.
| out | of bound policy it specify what to do when the particles are detected out of bound |
In general this function is called after moving the particles to move the elements out the local processor. Or just after initialization if each processor contain non local particles
| prp | properties to communicate |
| opt | options |
Definition at line 2129 of file vector_dist.hpp.
|
inline |
Operator= for distributed vector.
| v | vector to copy |
Definition at line 356 of file vector_dist.hpp.
|
inline |
Operator= for distributed vector.
| v | vector to copy |
Definition at line 381 of file vector_dist.hpp.
|
inline |
Remove a set of elements from the distributed vector.
| keys | vector of elements to eliminate |
| start | from where to eliminate |
Definition at line 2353 of file vector_dist.hpp.
|
inline |
Remove a set of elements from the distributed vector.
| keys | vector of elements to eliminate |
| start | from where to eliminate |
Definition at line 2337 of file vector_dist.hpp.
|
inline |
Remove one element from the distributed vector.
| key | remove one element from the vector |
Definition at line 2366 of file vector_dist.hpp.
|
inline |
Remove a set of elements from the distributed vector.
| keys | std::set of elements to eliminate. Values inside std::set are sorted by definition of the container |
Definition at line 2318 of file vector_dist.hpp.
|
inline |
Construct a cell list starting from the stored particles and reorder a vector according to the Hilberts curve.
It differs from the reorder(m) for an additional parameter, in case the domain + ghost is not big enough to contain additional padding particles, a Cell list with bigger space can be created (padding particles in general are particles added by the user out of the domains)
| m | order of a curve |
| enlarge | In case of padding particles the cell list must be enlarged, like a ghost this parameter say how much must be enlarged |
Definition at line 1681 of file vector_dist.hpp.
|
inline |
Construct a cell list starting from the stored particles and reorder a vector according to the Hilberts curve.
| CellL | CellList type to construct |
| m | an order of a hilbert curve |
Definition at line 1661 of file vector_dist.hpp.
|
inline |
Construct a cell list starting from the stored particles and reorder a vector according to the Hilberts curve.
It differs from the reorder(m) for an additional parameter, in case the domain + ghost is not big enough to contain additional padding particles, a Cell list with bigger space can be created (padding particles in general are particles added by the user out of the domains)
| m | order of a curve |
| enlarge | In case of padding particles the cell list must be enlarged, like a ghost this parameter say how much must be enlarged |
Definition at line 1767 of file vector_dist.hpp.
|
inlineprivate |
Reorder based on hilbert space filling curve.
| v_pos_dest | reordered vector of position |
| v_prp_dest | reordered vector of properties |
| m | order of the space filling curve |
| cellList | cell-list |
Definition at line 299 of file vector_dist.hpp.
|
inline |
Resize the vector (locally)
| rs |
Definition at line 2572 of file vector_dist.hpp.
|
inline |
Save the distributed vector on HDF5 file.
| filename | file where to save |
Definition at line 2459 of file vector_dist.hpp.
|
inline |
|
inline |
Set the properties names.
It is useful to specify name for the properties in vtk writers
| names | set of properties names |
Definition at line 2873 of file vector_dist.hpp.
|
inline |
Set reference counter to one
Definition at line 530 of file vector_dist.hpp.
|
inline |
return the local size of the vector
Definition at line 559 of file vector_dist.hpp.
|
inline |
return the local size of the vector
Definition at line 569 of file vector_dist.hpp.
|
inline |
Update a cell list using the stored particles.
| CellL | CellList type to construct |
| cellList | Cell list to update |
| no_se3 | avoid se class 3 checking |
Definition at line 1288 of file vector_dist.hpp.
|
inline |
for each particle get the verlet list
| r_cut | cut-off radius |
| verletList | Verlet to update |
Definition at line 1556 of file vector_dist.hpp.
|
inline |
Update non-symmetric adaptive r-cut Verlet list.
| verletList | Verlet to update |
| rCuts | list of cut-off radii for every particle in pos |
Definition at line 1629 of file vector_dist.hpp.
|
inline |
Output particle position and properties.
| out | output filename |
| opt | VTK_WRITER, CSV_WRITER, it is also possible to choose the format for VTK FORMAT_BINARY. (the default is ASCII format) |
Definition at line 2498 of file vector_dist.hpp.
|
inline |
Output particle position and properties.
| out | output filename |
| meta_info | meta information example ("time = 1.234" add the information time to the VTK file) |
| opt | VTK_WRITER, CSV_WRITER, it is also possible to choose the format for VTK FORMAT_BINARY. (the default is ASCII format) |
Definition at line 2513 of file vector_dist.hpp.
|
inline |
Output particle position and properties and add a time stamp to pvtp.
| out | output |
| iteration | (we can append the number at the end of the file_name) |
| time | = 1.234 to add to the information time to the PVTP file) |
| opt | VTK_WRITER, CSV_WRITER, it is also possible to choose the format for VTK FORMAT_BINARY. (the default is ASCII format) |
Definition at line 2683 of file vector_dist.hpp.
|
inline |
Output particle position and properties.
| out | output |
| iteration | (we can append the number at the end of the file_name) |
| meta_info | meta information example ("time = 1.234" add the information time to the VTK file) |
| opt | VTK_WRITER, CSV_WRITER, it is also possible to choose the format for VTK FORMAT_BINARY. (the default is ASCII format) |
Definition at line 2612 of file vector_dist.hpp.
|
inline |
Output particle position and properties.
| out | output |
| iteration | (we can append the number at the end of the file_name) |
| meta_info | meta information example ("time = 1.234" add the information time to the VTK file) |
| opt | VTK_WRITER, CSV_WRITER, it is also possible to choose the format for VTK FORMAT_BINARY. (the default is ASCII format) |
Definition at line 2628 of file vector_dist.hpp.
|
private |
Particle position vector, (It has 2 elements) the first has real particles assigned to a processor the second element contain unassigned particles
Definition at line 197 of file vector_dist.hpp.
|
private |
Used when cell list is constructed with CL_GPU_REORDER_POSITION. Stores a copy of vPos Stores a sorted copy of vPos in between updateCellListGPU and restoreOrder
Definition at line 201 of file vector_dist.hpp.
|
private |
Particle properties vector, (It has 2 elements) the first has real particles assigned to a processor the second element contain unassigned particles
Definition at line 205 of file vector_dist.hpp.
|
private |
Used when cell list is constructed with CL_GPU_REORDER_PROPERTY. Stores a copy of vPrp Stores a sorted copy of vPos in between updateCellListGPU and restoreOrder
Definition at line 209 of file vector_dist.hpp.