OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
vector_dist_subset< 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_subset< dim, St, prop, Decomposition, Memory, layout_base >

Definition at line 69 of file vector_dist_subset.hpp.

Public Types

typedef ivector_dist::value_type value_type
 property object
 
typedef ivector_dist::Decomposition_type Decomposition_type
 
typedef ivector_dist::CellList_type CellList_type
 
typedef ivector_dist::stype stype
 space type
 
typedef int yes_i_am_vector_dist
 
typedef std::integral_constant< bool, true > is_it_a_subset
 Subset detection.
 

Public Member Functions

 vector_dist_subset (vector_dist_ws< dim, St, prop, Decomposition, Memory, layout_base > &vd, int sub_id)
 
void ghost_get_subset ()
 
openfpm::vector< aggregate< int > > & getIds ()
 Return the ids. More...
 
void update ()
 Update the subset indexes. More...
 
DecompositiongetDecomposition ()
 Get the decomposition. More...
 
const DecompositiongetDecomposition () const
 Get the decomposition. 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 original vector More...
 
auto getPos (vect_dist_key_dx vec_key) -> decltype(vd.getPos(vec_key))
 Get the position of an element. More...
 
auto getPos (vect_dist_key_dx vec_key) const -> decltype(vd.getPos(vec_key))
 Get the position of an element. More...
 
auto getPosOrig (vect_dist_key_dx vec_key) -> decltype(vd.getPos(vec_key))
 Get the position of an element. More...
 
auto getPosOrig (vect_dist_key_dx vec_key) const -> decltype(vd.getPos(vec_key))
 Get the position of an element. More...
 
template<unsigned int id>
auto getProp (vect_dist_key_dx vec_key) -> decltype(vd.template getProp< id >(vec_key))
 Get the property of an element. More...
 
template<unsigned int id>
auto getProp (vect_dist_key_dx vec_key) const -> decltype(vd.template getProp< id >(vec_key))
 Get the property of an element. More...
 
vect_dist_key_dx getOriginKey (vect_dist_key_dx vec_key)
 
vector_dist_iterator_subset getDomainIterator () const
 Get an iterator that traverse the particles in the domain. More...
 
template<typename CellL = CellList_gen<dim, St, Process_keys_lin, Mem_fast<>, shift<dim, St>, typename std::remove_reference<decltype(vd.getPosVector())>::type >>
CellL getCellList (St r_cut, bool no_se3=false)
 Construct a cell list starting from the stored particles. More...
 
bool isSubset () const
 Indicate that this class is not a subset. More...
 
template<typename CellL = CellList_gen<dim, St, Process_keys_lin, Mem_fast<>, shift<dim, St> >>
CellL getCellList (St r_cut, const Ghost< dim, St > &enlarge, bool no_se3=false)
 Construct a cell list starting from the stored particles. More...
 
vector_dist_subset< dim, St, prop, Decomposition, Memory, layout_base > & operator= (const vector_dist_subset< dim, St, prop, Decomposition, Memory, layout_base > &v)
 Operator= for distributed vector. More...
 

Static Public Attributes

static const unsigned int dims = ivector_dist::dims
 dimensions of space
 

Private Types

typedef vector_dist_ws< dim, St, prop, Decomposition, Memory, layout_base > ivector_dist
 
typedef boost::mpl::int_< AggregateAppend< int, prop >::type::max_prop-1 > flag_prop
 

Private Member Functions

void check_gm ()
 

Private Attributes

ivector_distvd
 
openfpm::vector< aggregate< int > > pid
 
size_t sub_id
 

Member Function Documentation

◆ getCellList() [1/2]

template<unsigned int dim, typename St, typename prop, typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, template< typename > class layout_base = memory_traits_lin>
template<typename CellL = CellList_gen<dim, St, Process_keys_lin, Mem_fast<>, shift<dim, St>, typename std::remove_reference<decltype(vd.getPosVector())>::type >>
CellL vector_dist_subset< dim, St, prop, Decomposition, Memory, layout_base >::getCellList ( St  r_cut,
bool  no_se3 = false 
)
inline

Construct a cell list starting from the stored particles.

Template Parameters
CellLCellList type to construct
Parameters
r_cutinteration radius, or size of each cell
no_se3avoid SE_CLASS3 checking
Returns
the Cell list

Definition at line 363 of file vector_dist_subset.hpp.

◆ getCellList() [2/2]

template<unsigned int dim, typename St, typename prop, typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, template< typename > class layout_base = memory_traits_lin>
template<typename CellL = CellList_gen<dim, St, Process_keys_lin, Mem_fast<>, shift<dim, St> >>
CellL vector_dist_subset< dim, St, prop, Decomposition, Memory, layout_base >::getCellList ( St  r_cut,
const Ghost< dim, St > &  enlarge,
bool  no_se3 = false 
)
inline

Construct a cell list starting from the stored particles.

It differ from the get getCellList 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)

Template Parameters
CellLCellList type to construct
Parameters
r_cutinteration radius, or size of each cell
enlargeIn case of padding particles the cell list must be enlarged, like a ghost this parameter say how much must be enlarged
no_se3avoid se_class3 cheking default false
Returns
the CellList

Definition at line 404 of file vector_dist_subset.hpp.

◆ getDecomposition() [1/2]

template<unsigned int dim, typename St, typename prop, typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, template< typename > class layout_base = memory_traits_lin>
Decomposition& vector_dist_subset< dim, St, prop, Decomposition, Memory, layout_base >::getDecomposition ( )
inline

Get the decomposition.

Returns

Definition at line 207 of file vector_dist_subset.hpp.

◆ getDecomposition() [2/2]

template<unsigned int dim, typename St, typename prop, typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, template< typename > class layout_base = memory_traits_lin>
const Decomposition& vector_dist_subset< dim, St, prop, Decomposition, Memory, layout_base >::getDecomposition ( ) const
inline

Get the decomposition.

Returns

Definition at line 217 of file vector_dist_subset.hpp.

◆ getDomainIterator()

template<unsigned int dim, typename St, typename prop, typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, template< typename > class layout_base = memory_traits_lin>
vector_dist_iterator_subset vector_dist_subset< dim, St, prop, Decomposition, Memory, layout_base >::getDomainIterator ( ) const
inline

Get an iterator that traverse the particles in the domain.

Returns
an iterator

Definition at line 343 of file vector_dist_subset.hpp.

◆ getIds()

template<unsigned int dim, typename St, typename prop, typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, template< typename > class layout_base = memory_traits_lin>
openfpm::vector<aggregate<int> >& vector_dist_subset< dim, St, prop, Decomposition, Memory, layout_base >::getIds ( )
inline

Return the ids.

Returns
the ids of the subset

Definition at line 156 of file vector_dist_subset.hpp.

◆ getPos() [1/2]

template<unsigned int dim, typename St, typename prop, typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, template< typename > class layout_base = memory_traits_lin>
auto vector_dist_subset< dim, St, prop, Decomposition, Memory, layout_base >::getPos ( vect_dist_key_dx  vec_key) -> decltype(vd.getPos(vec_key))
inline

Get the position of an element.

see the vector_dist iterator usage to get an element key

Parameters
vec_keyelement
Returns
the position of the element in space

Definition at line 253 of file vector_dist_subset.hpp.

◆ getPos() [2/2]

template<unsigned int dim, typename St, typename prop, typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, template< typename > class layout_base = memory_traits_lin>
auto vector_dist_subset< dim, St, prop, Decomposition, Memory, layout_base >::getPos ( vect_dist_key_dx  vec_key) const -> decltype(vd.getPos(vec_key))
inline

Get the position of an element.

see the vector_dist iterator usage to get an element key

Parameters
vec_keyelement
Returns
the position of the element in space

Definition at line 267 of file vector_dist_subset.hpp.

◆ getPosOrig() [1/2]

template<unsigned int dim, typename St, typename prop, typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, template< typename > class layout_base = memory_traits_lin>
auto vector_dist_subset< dim, St, prop, Decomposition, Memory, layout_base >::getPosOrig ( vect_dist_key_dx  vec_key) -> decltype(vd.getPos(vec_key))
inline

Get the position of an element.

see the vector_dist iterator usage to get an element key

Parameters
vec_keyelement
Returns
the position of the element in space

Definition at line 281 of file vector_dist_subset.hpp.

◆ getPosOrig() [2/2]

template<unsigned int dim, typename St, typename prop, typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, template< typename > class layout_base = memory_traits_lin>
auto vector_dist_subset< dim, St, prop, Decomposition, Memory, layout_base >::getPosOrig ( vect_dist_key_dx  vec_key) const -> decltype(vd.getPos(vec_key))
inline

Get the position of an element.

see the vector_dist iterator usage to get an element key

Parameters
vec_keyelement
Returns
the position of the element in space

Definition at line 295 of file vector_dist_subset.hpp.

◆ getProp() [1/2]

template<unsigned int dim, typename St, typename prop, typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, template< typename > class layout_base = memory_traits_lin>
template<unsigned int id>
auto vector_dist_subset< dim, St, prop, Decomposition, Memory, layout_base >::getProp ( vect_dist_key_dx  vec_key) -> decltype(vd.template getProp<id>(vec_key))
inline

Get the property of an element.

see the vector_dist iterator usage to get an element key

Template Parameters
idproperty id
Parameters
vec_keyvector element
Returns
return the selected property of the vector element

Definition at line 310 of file vector_dist_subset.hpp.

◆ getProp() [2/2]

template<unsigned int dim, typename St, typename prop, typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, template< typename > class layout_base = memory_traits_lin>
template<unsigned int id>
auto vector_dist_subset< dim, St, prop, Decomposition, Memory, layout_base >::getProp ( vect_dist_key_dx  vec_key) const -> decltype(vd.template getProp<id>(vec_key))
inline

Get the property of an element.

see the vector_dist iterator usage to get an element key

Template Parameters
idproperty id
Parameters
vec_keyvector element
Returns
return the selected property of the vector element

Definition at line 325 of file vector_dist_subset.hpp.

◆ isSubset()

template<unsigned int dim, typename St, typename prop, typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, template< typename > class layout_base = memory_traits_lin>
bool vector_dist_subset< dim, St, prop, Decomposition, Memory, layout_base >::isSubset ( ) const
inline

Indicate that this class is not a subset.

Returns
false

Definition at line 382 of file vector_dist_subset.hpp.

◆ operator=()

template<unsigned int dim, typename St, typename prop, typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, template< typename > class layout_base = memory_traits_lin>
vector_dist_subset<dim,St,prop,Decomposition,Memory,layout_base>& vector_dist_subset< dim, St, prop, Decomposition, Memory, layout_base >::operator= ( const vector_dist_subset< dim, St, prop, Decomposition, Memory, layout_base > &  v)
inline

Operator= for distributed vector.

Parameters
vvector to copy
Returns
itself

Definition at line 470 of file vector_dist_subset.hpp.

◆ size_local()

template<unsigned int dim, typename St, typename prop, typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, template< typename > class layout_base = memory_traits_lin>
size_t vector_dist_subset< dim, St, prop, Decomposition, Memory, layout_base >::size_local ( ) const
inline

return the local size of the vector

Returns
local size

Definition at line 227 of file vector_dist_subset.hpp.

◆ size_local_orig()

template<unsigned int dim, typename St, typename prop, typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, template< typename > class layout_base = memory_traits_lin>
size_t vector_dist_subset< dim, St, prop, Decomposition, Memory, layout_base >::size_local_orig ( ) const
inline

return the local size of the original vector

Returns
local size

Definition at line 237 of file vector_dist_subset.hpp.

◆ update()

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_subset< dim, St, prop, Decomposition, Memory, layout_base >::update ( )
inline

Update the subset indexes.

Definition at line 174 of file vector_dist_subset.hpp.


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