OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
CellList_gen< dim, T, Prock, Mem_type, transform, vector_pos_type > Class Template Reference

Detailed Description

template<unsigned int dim, typename T, template< unsigned int, typename > class Prock, typename Mem_type = Mem_fast<>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>>
class CellList_gen< dim, T, Prock, Mem_type, transform, vector_pos_type >

Definition at line 33 of file CellListFast_gen.hpp.

+ Inheritance diagram for CellList_gen< dim, T, Prock, Mem_type, transform, vector_pos_type >:

Public Member Functions

const Prock< dim, CellList_gen< dim, T, Prock, Mem_type, transform, vector_pos_type > > & getCellSFC () const
 Get the space filling curve object. More...
 
void init_SFC ()
 Initialize Space-filling-curve (SFC) More...
 
Prock< dim, CellList_gen< dim, T, Prock, Mem_type, transform, vector_pos_type > >::Pit getIterator ()
 return the celllist iterator (across cells) More...
 
void Initialize (const Box< dim, T > &box, const size_t(&div)[dim], const size_t pad=1, size_t slot=STARTING_NSLOT)
 
const openfpm::vector< size_t > & getKeys ()
 Return cellkeys vector. More...
 
size_t get_gm ()
 return the ghost marker More...
 
void set_gm (size_t g_m)
 Set the ghost marker. More...
 
- Public Member Functions inherited from CellList< dim, T, Mem_type, transform, vector_pos_type >
const grid_sm< dim, void > & getGrid ()
 Return the underlying grid information of the cell list. More...
 
void Initialize (CellDecomposer_sm< dim, T, transform > &cd_sm, const Box< dim, T > &dom_box, const size_t pad=1, size_t slot=STARTING_NSLOT)
 
void Initialize (const Box< dim, T > &box, const size_t(&div)[dim], const size_t pad=1, size_t slot=STARTING_NSLOT)
 
void Initialize (const SpaceBox< dim, T > &box, const size_t(&div)[dim], const size_t pad=1, size_t slot=STARTING_NSLOT)
 
 CellList ()
 Default Constructor.
 
 CellList (const CellList< dim, T, Mem_type, transform, vector_pos_type > &cell)
 Copy constructor.
 
 CellList (CellList< dim, T, Mem_type, transform, vector_pos_type > &&cell)
 Copy constructor.
 
 CellList (Box< dim, T > &box, const size_t(&div)[dim], Matrix< dim, T > mat, const size_t pad=1, size_t slot=STARTING_NSLOT)
 Cell list constructor. More...
 
 CellList (Box< dim, T > &box, const size_t(&div)[dim], const size_t pad=1, size_t slot=STARTING_NSLOT)
 Cell list constructor. More...
 
 CellList (SpaceBox< dim, T > &box, const size_t(&div)[dim], const size_t pad=1, size_t slot=STARTING_NSLOT)
 Cell list constructor. More...
 
 CellList (CellDecomposer_sm< dim, T, transform > &cd_sm, const Box< dim, T > &box, const size_t pad=1, size_t slot=STARTING_NSLOT)
 Cell list constructor from a cell decomposer. More...
 
 ~CellList ()
 Destructor. More...
 
CellList< dim, T, Mem_type, transform > & operator= (CellList< dim, T, Mem_type, transform > &&cell)
 Constructor from a temporal object. More...
 
CellList< dim, T, Mem_type, transform, vector_pos_type > & operator= (const CellList< dim, T, Mem_type, transform, vector_pos_type > &cell)
 Constructor from a temporal object. More...
 
template<typename Mem_type2 >
CellList< dim, T, Mem_type, transform, vector_pos_type > & operator= (const CellList< dim, T, Mem_type2, transform, vector_pos_type > &cell)
 Constructor from a temporal object. More...
 
void setRadius (T radius)
 Set the radius for the getNNIteratorRadius. More...
 
ParticleIt_Cells< dim, CellList< dim, T, Mem_fast<>, transform > > getDomainIterator (openfpm::vector< size_t > &dom_cells)
 Get an iterator over particles following the cell structure. More...
 
void addCell (size_t cell_id, typename Mem_type::local_index_type ele)
 Add to the cell. More...
 
void add (const T(&pos)[dim], typename Mem_type::local_index_type ele)
 Add an element in the cell list. More...
 
void add (const Point< dim, T > &pos, typename Mem_type::local_index_type ele)
 Add an element in the cell list. More...
 
void addDom (const T(&pos)[dim], typename Mem_type::local_index_type ele)
 Add an element in the cell list forcing to be in the domain cells. More...
 
void addDom (const Point< dim, T > &pos, typename Mem_type::local_index_type ele)
 Add an element in the cell list forcing to be in the domain cells. More...
 
void addPad (const T(&pos)[dim], typename Mem_type::local_index_type ele)
 Add an element in the cell list forcing to be in the padding cells. More...
 
void addPad (const Point< dim, T > &pos, typename Mem_type::local_index_type ele)
 Add an element in the cell list forcing to be in the padding cells. More...
 
void remove (size_t cell, size_t ele)
 remove an element from the cell More...
 
size_t getNCells () const
 Get the number of cells this cell-list contain. More...
 
size_t getNelements (const size_t cell_id) const
 Return the number of elements in the cell. More...
 
auto get (size_t cell, size_t ele) -> decltype(this->Mem_type::get(cell, ele))
 Get an element in the cell. More...
 
auto get (size_t cell, size_t ele) const -> decltype(this->Mem_type::get(cell, ele))
 Get an element in the cell. More...
 
void swap (CellList< dim, T, Mem_type, transform, vector_pos_type > &cl)
 Swap the memory. More...
 
CellIterator< CellList< dim, T, Mem_type, transform > > getCellIterator (size_t cell)
 Get the Cell iterator. More...
 
template<unsigned int impl = NO_CHECK>
CellNNIteratorRadius< dim, CellList< dim, T, Mem_type, transform >, impl > getNNIteratorRadius (size_t cell)
 Get the Neighborhood iterator. More...
 
template<unsigned int impl = NO_CHECK>
 __attribute__ ((always_inline)) inline CellNNIterator< dim
 Get the Neighborhood iterator. More...
 
int impl getNNIterator (size_t cell)
 
template<unsigned int impl = NO_CHECK>
 __attribute__ ((always_inline)) inline CellNNIteratorRadius< dim
 Get the symmetric Neighborhood iterator. More...
 
impl getNNIteratorRadius (size_t cell, T r_cut)
 
template<unsigned int impl>
 __attribute__ ((always_inline)) inline CellNNIteratorSym< dim
 Get the symmetric Neighborhood iterator. More...
 
unsigned int impl getNNIteratorSym (size_t cell, size_t p, const vector_pos_type &v)
 
template<unsigned int impl, typename vector_pos_type2 >
 __attribute__ ((always_inline)) inline CellNNIteratorSymMP< dim
 Get the symmetric Neighborhood iterator. More...
 
unsigned int impl getNNIteratorSymMP (size_t cell, size_t p, const vector_pos_type2 &v_p1, const vector_pos_type2 &v_p2)
 
const NNc_array< dim,(unsigned int) openfpm::math::pow(3, dim)/2+1 > & getNNc_sym () const
 Get the symmetric neighborhood. More...
 
size_t getPadding (size_t i) const
 Return the number of padding cells of the Cell decomposer. More...
 
size_t(& getPadding ())[dim]
 Return the number of padding cells of the Cell decomposer as an array. More...
 
void clear ()
 Clear the cell list. More...
 
void destroy ()
 Litterary destroy the memory of the cell list, including the retained one. More...
 
__attribute__((always_inline)) inline const typename Mem_type size_t get_gm ()
 Return the starting point of the cell p. More...
 
void set_gm (size_t g_m)
 Set the ghost marker. More...
 
const NNc_array< dim,(unsigned int) openfpm::math::pow(3, dim)> & private_get_NNc_full () const
 
const NNc_array< dim,(unsigned int) openfpm::math::pow(3, dim)/2+1 > & private_get_NNc_sym () const
 
bool private_get_from_cd () const
 
void re_setBoxNN ()
 
void set_ndec (size_t n_dec)
 Set the n_dec number. More...
 
size_t get_ndec () const
 Set the n_dec number. More...
 

Private Member Functions

void initialize_sfc (size_t pad)
 Initialize the space-filling-curve. More...
 

Private Attributes

size_t g_m = 0
 Ghost marker.
 
Prock< dim, CellList_gen< dim, T, Prock, Mem_type, transform, vector_pos_type > > SFC
 
bool init_sfc
 Init SFC.
 

Additional Inherited Members

- Public Types inherited from CellList< dim, T, Mem_type, transform, vector_pos_type >
typedef Mem_type Mem_type_type
 Type of internal memory structure.
 
typedef CellNNIteratorSym< dim, CellList< dim, T, Mem_type, transform, vector_pos_type >, vector_pos_type, RUNTIME, NO_CHECK > SymNNIterator
 
typedef Mem_type::local_index_type value_type
 Object type that the structure store.
 
typedef T stype
 Type of the coordinate space (double float)
 
typedef vector_pos_type internal_vector_pos_type
 
- Data Fields inherited from CellList< dim, T, Mem_type, transform, vector_pos_type >
 CellList< dim, T, Mem_type, transform, vector_pos_type >
 
int FULL
 
 vector_pos_type
 
unsigned int SYM
 
 vector_pos_type2
 
- Protected Attributes inherited from CellList< dim, T, Mem_type, transform, vector_pos_type >
NNc_array< dim,(unsigned int) openfpm::math::pow(3, dim)> NNc_full
 The array contain the neighborhood of the cell-id in case of asymmetric interaction.
 
NNc_array< dim,(unsigned int) openfpm::math::pow(3, dim)/2+1 > NNc_sym
 The array contain the neighborhood of the cell-id in case of symmetric interaction.
 

Member Function Documentation

◆ get_gm()

template<unsigned int dim, typename T, template< unsigned int, typename > class Prock, typename Mem_type = Mem_fast<>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>>
size_t CellList_gen< dim, T, Prock, Mem_type, transform, vector_pos_type >::get_gm ( )
inline

return the ghost marker

Returns
ghost marker

Definition at line 167 of file CellListFast_gen.hpp.

◆ getCellSFC()

template<unsigned int dim, typename T, template< unsigned int, typename > class Prock, typename Mem_type = Mem_fast<>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>>
const Prock<dim,CellList_gen<dim,T,Prock,Mem_type,transform,vector_pos_type> >& CellList_gen< dim, T, Prock, Mem_type, transform, vector_pos_type >::getCellSFC ( ) const
inline

Get the space filling curve object.

Returns
the SFC object

Definition at line 107 of file CellListFast_gen.hpp.

◆ getIterator()

template<unsigned int dim, typename T, template< unsigned int, typename > class Prock, typename Mem_type = Mem_fast<>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>>
Prock<dim,CellList_gen<dim,T,Prock,Mem_type,transform,vector_pos_type> >::Pit CellList_gen< dim, T, Prock, Mem_type, transform, vector_pos_type >::getIterator ( )
inline

return the celllist iterator (across cells)

Returns
an iterator

Definition at line 130 of file CellListFast_gen.hpp.

◆ getKeys()

template<unsigned int dim, typename T, template< unsigned int, typename > class Prock, typename Mem_type = Mem_fast<>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>>
const openfpm::vector<size_t>& CellList_gen< dim, T, Prock, Mem_type, transform, vector_pos_type >::getKeys ( )
inline

Return cellkeys vector.

Returns
vector of cell keys

Definition at line 157 of file CellListFast_gen.hpp.

◆ init_SFC()

template<unsigned int dim, typename T, template< unsigned int, typename > class Prock, typename Mem_type = Mem_fast<>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>>
void CellList_gen< dim, T, Prock, Mem_type, transform, vector_pos_type >::init_SFC ( )
inline

Initialize Space-filling-curve (SFC)

Definition at line 115 of file CellListFast_gen.hpp.

◆ Initialize()

template<unsigned int dim, typename T, template< unsigned int, typename > class Prock, typename Mem_type = Mem_fast<>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>>
void CellList_gen< dim, T, Prock, Mem_type, transform, vector_pos_type >::Initialize ( const Box< dim, T > &  box,
const size_t(&)  div[dim],
const size_t  pad = 1,
size_t  slot = STARTING_NSLOT 
)
inline

Initialize the cell list

Parameters
boxDomain where this cell list is living
divgrid size on each dimension
g_m_newA ghost marker
padpadding cell
slotmaximum number of slot

Definition at line 146 of file CellListFast_gen.hpp.

◆ initialize_sfc()

template<unsigned int dim, typename T, template< unsigned int, typename > class Prock, typename Mem_type = Mem_fast<>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>>
void CellList_gen< dim, T, Prock, Mem_type, transform, vector_pos_type >::initialize_sfc ( size_t  pad)
inlineprivate

Initialize the space-filling-curve.

Parameters
padpadding of the cell-list

Definition at line 52 of file CellListFast_gen.hpp.

◆ set_gm()

template<unsigned int dim, typename T, template< unsigned int, typename > class Prock, typename Mem_type = Mem_fast<>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>>
void CellList_gen< dim, T, Prock, Mem_type, transform, vector_pos_type >::set_gm ( size_t  g_m)
inline

Set the ghost marker.

Definition at line 176 of file CellListFast_gen.hpp.

Field Documentation

◆ SFC

template<unsigned int dim, typename T, template< unsigned int, typename > class Prock, typename Mem_type = Mem_fast<>, typename transform = no_transform<dim,T>, typename vector_pos_type = openfpm::vector<Point<dim,T>>>
Prock<dim,CellList_gen<dim,T,Prock,Mem_type,transform,vector_pos_type> > CellList_gen< dim, T, Prock, Mem_type, transform, vector_pos_type >::SFC
private

It is an object that indicate which space filling curve to use for the iteration across cells

Definition at line 42 of file CellListFast_gen.hpp.


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