template<unsigned int dim, typename T, unsigned int sh_byte, typename CellBase = CellList<dim,T,Mem_fast<>,shift<dim, T>>>
class CellListM< dim, T, sh_byte, CellBase >
Class for Multi-Phase cell-list.
This class implement a Multi-Phase cell list. In practice this Cell list can contain the particles from multiple vector distributed. By default this cell list is based on Cell list fast with shifting
* +-----------------------+
* |p |p |p |p |p |p |p |p |
* +-----------------------+
* |p | | | | | | |p |
* +-----------------------+
* |p | | | | | | |p |
* +-----------------------+
* |p | | | | | | |p |
* +-----------------------+
* |p |9 | | | | | |p |
* +-----------------------+
* |p |p |p |p |p |p |p |p |
* +-----------------------+
*
- Template Parameters
-
dim | dimensionality |
T | type of the space |
sh_byte | bit to dedicate to the phases informations |
CellBase | Base cell list used for the implementation |
Declaration of a Multi-Phase cell list and usage
Definition at line 53 of file CellListM.hpp.
|
| CellListM () |
| Default Constructor.
|
|
| CellListM (const CellListM< dim, T, sh_byte, CellBase > &cell) |
| Copy constructor. More...
|
|
| CellListM (CellListM< dim, T, sh_byte, CellBase > &&cell) |
| Copy constructor. More...
|
|
| CellListM (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...
|
|
| CellListM (Box< dim, T > &box, const size_t(&div)[dim], const size_t pad=1, size_t slot=STARTING_NSLOT) |
| Cell list constructor. More...
|
|
| ~CellListM () |
| Destructor. More...
|
|
void | addCell (size_t cell_id, size_t ele, size_t v_id) |
| Add to the cell. More...
|
|
void | add (const T(&pos)[dim], size_t ele, size_t v_id) |
| Add an element in the cell list. More...
|
|
void | add (const Point< dim, T > &pos, size_t ele, size_t v_id) |
| Add an element in the cell list. More...
|
|
size_t | getP (size_t cell, size_t ele) |
| Get the element-id in the cell. More...
|
|
size_t | getV (size_t cell, size_t ele) |
| Get the element vector in the cell. More...
|
|
void | swap (CellListM< dim, T, sh_byte, CellBase > &cl) |
| Swap the memory. More...
|
|
CellIterator< CellListM< dim,
T, sh_byte, CellBase > > | getIterator (size_t cell) |
| Get the Cell iterator. More...
|
|
template<unsigned int impl = NO_CHECK> |
CellNNIteratorM< dim,
CellListM< dim, T, sh_byte,
CellBase >, sh_byte, FULL,
impl > | getNNIterator (size_t cell) |
| Get the Neighborhood iterator. More...
|
|
template<unsigned int impl> |
CellNNIteratorSymM< dim,
CellListM< dim, T, sh_byte,
CellBase >, sh_byte, SYM, impl > | getNNIteratorSym (size_t cell, size_t pp, size_t p, const openfpm::vector< Point< dim, typename CellBase::stype >> &pos, const openfpm::vector< pos_v< dim, typename CellBase::stype >> &v) |
| Get the Neighborhood iterator. More...
|
|
CellListM< dim, T, sh_byte,
CellBase > & | operator= (CellListM< dim, T, sh_byte, CellBase > &&clm) |
| operator= More...
|
|
CellListM< dim, T, sh_byte,
CellBase > & | operator= (const CellListM< dim, T, sh_byte, CellBase > &clm) |
| operator= More...
|
|
template<unsigned int dim, typename T, unsigned int sh_byte, typename CellBase = CellList<dim,T,Mem_fast<>,shift<dim, T>>>
void CellListM< dim, T, sh_byte, CellBase >::add |
( |
const T(&) |
pos[dim], |
|
|
size_t |
ele, |
|
|
size_t |
v_id |
|
) |
| |
|
inline |
Add an element in the cell list.
- Parameters
-
pos | array that contain the coordinate |
ele | element to store |
v_id | phase id |
Definition at line 145 of file CellListM.hpp.
template<unsigned int dim, typename T, unsigned int sh_byte, typename CellBase = CellList<dim,T,Mem_fast<>,shift<dim, T>>>
void CellListM< dim, T, sh_byte, CellBase >::add |
( |
const Point< dim, T > & |
pos, |
|
|
size_t |
ele, |
|
|
size_t |
v_id |
|
) |
| |
|
inline |
Add an element in the cell list.
- Parameters
-
pos | array that contain the coordinate |
ele | element to store |
v_id | phase id |
Definition at line 164 of file CellListM.hpp.
template<unsigned int dim, typename T, unsigned int sh_byte, typename CellBase = CellList<dim,T,Mem_fast<>,shift<dim, T>>>
template<unsigned int impl = NO_CHECK>
CellNNIteratorM<dim,CellListM<dim,T,sh_byte,CellBase>,sh_byte,FULL,impl> CellListM< dim, T, sh_byte, CellBase >::getNNIterator |
( |
size_t |
cell | ) |
|
|
inline |
Get the Neighborhood iterator.
It iterate across all the element of the selected cell and the near cells
* * *
* x *
* * *
- x is the selected cell
- * are the near cell
- Parameters
-
- Returns
- an iterator over the particle of the selected cell
Definition at line 272 of file CellListM.hpp.
template<unsigned int dim, typename T, unsigned int sh_byte, typename CellBase = CellList<dim,T,Mem_fast<>,shift<dim, T>>>
template<unsigned int impl>
CellNNIteratorSymM<dim,CellListM<dim,T,sh_byte,CellBase>,sh_byte,SYM,impl> CellListM< dim, T, sh_byte, CellBase >::getNNIteratorSym |
( |
size_t |
cell, |
|
|
size_t |
pp, |
|
|
size_t |
p, |
|
|
const openfpm::vector< Point< dim, typename CellBase::stype >> & |
pos, |
|
|
const openfpm::vector< pos_v< dim, typename CellBase::stype >> & |
v |
|
) |
| |
|
inline |
Get the Neighborhood iterator.
It iterate across all the element of the selected cell and the near cells
* * *
x *
- x is the selected cell
- * are the near cell
- Parameters
-
- Returns
- Cell-list structure
Definition at line 300 of file CellListM.hpp.
template<unsigned int dim, typename T, unsigned int sh_byte, typename CellBase = CellList<dim,T,Mem_fast<>,shift<dim, T>>>
static size_t CellListM< dim, T, sh_byte, CellBase >::getP |
( |
size_t |
ele | ) |
|
|
inlinestatic |
Convert an element in particle id.
- Parameters
-
- Returns
- The element value
Definition at line 183 of file CellListM.hpp.
template<unsigned int dim, typename T, unsigned int sh_byte, typename CellBase = CellList<dim,T,Mem_fast<>,shift<dim, T>>>
size_t CellListM< dim, T, sh_byte, CellBase >::getP |
( |
size_t |
cell, |
|
|
size_t |
ele |
|
) |
| |
|
inline |
Get the element-id in the cell.
- Template Parameters
-
- Parameters
-
cell | cell id |
ele | element id |
- Returns
- The element value
Definition at line 210 of file CellListM.hpp.
template<unsigned int dim, typename T, unsigned int sh_byte, typename CellBase = CellList<dim,T,Mem_fast<>,shift<dim, T>>>
static size_t CellListM< dim, T, sh_byte, CellBase >::getV |
( |
size_t |
ele | ) |
|
|
inlinestatic |
Convert an element in phase id.
- Parameters
-
- Returns
- The element value
Definition at line 195 of file CellListM.hpp.
template<unsigned int dim, typename T, unsigned int sh_byte, typename CellBase = CellList<dim,T,Mem_fast<>,shift<dim, T>>>
size_t CellListM< dim, T, sh_byte, CellBase >::getV |
( |
size_t |
cell, |
|
|
size_t |
ele |
|
) |
| |
|
inline |
Get the element vector in the cell.
- Template Parameters
-
- Parameters
-
cell | cell id |
ele | element id |
- Returns
- The element value
Definition at line 225 of file CellListM.hpp.