OpenFPM  5.2.0
Project that contain the implementation of distributed structures
CellList_cpu_ker< dim, T, Mem_type, transform_type > Class Template Reference
+ Inheritance diagram for CellList_cpu_ker< dim, T, Mem_type, transform_type >:

Public Member Functions

 CellList_cpu_ker (const Mem_type &mt, openfpm::array< T, dim > &spacing_c, openfpm::array< ids_type, dim > &div_c, openfpm::array< ids_type, dim > &off, grid_sm< dim, void > &cellListGrid, Point< dim, long int > &cellShift, Box< dim, T > &cellListSpaceBox, const transform_type &pointTransform)
 
__device__ unsigned int getCell (const Point< dim, T > &xp) const
 
const __device__ grid_sm< dim, void > & getGrid () const
 Return the underlying grid information of the cell list. More...
 
__device__ grid_key_dx< dim > getCellGrid (const Point< dim, T > &pos) const
 Get the cell-ids. More...
 
__device__ grid_key_dx< dim > getCellGrid (const T(&pos)[dim]) const
 Get the cell-ids. More...
 
__device__ size_t ConvertToID (const T(&x)[dim], size_t s) const
 Convert the coordinates into id. More...
 
__device__ size_t ConvertToID (const Point< dim, T > &x, size_t s, size_t sc=0) const
 Convert the coordinates into id. More...
 
__device__ int getNelements (unsigned int cell) const
 Return the number of elements in the cell. More...
 
__device__ unsigned int get (unsigned int cell, unsigned int ele)
 Get an element in the cell. More...
 

Private Types

typedef Mem_type::local_index_type ids_type
 

Private Attributes

openfpm::array< T, dim > spacing_c
 Spacing.
 
openfpm::array< ids_type, dim > div_c
 number of sub-divisions in each direction
 
openfpm::array< ids_type, dim > off
 cell padding
 
transform_type pointTransform
 transformation
 
grid_sm< dim, void > cellListGrid
 Grid structure of the Cell list.
 
Point< dim, long int > cellShift
 cellShift
 
Box< dim, T > cellListSpaceBox
 Unit box of the Cell list.
 

Detailed Description

template<unsigned int dim, typename T, typename Mem_type, typename transform_type>
class CellList_cpu_ker< dim, T, Mem_type, transform_type >

Definition at line 14 of file CellList_cpu_ker.cuh.

Member Function Documentation

◆ ConvertToID() [1/2]

template<unsigned int dim, typename T , typename Mem_type , typename transform_type >
__device__ size_t CellList_cpu_ker< dim, T, Mem_type, transform_type >::ConvertToID ( const Point< dim, T > &  x,
size_t  s,
size_t  sc = 0 
) const
inline

Convert the coordinates into id.

Parameters
xpoint
sdimension

Definition at line 137 of file CellList_cpu_ker.cuh.

◆ ConvertToID() [2/2]

template<unsigned int dim, typename T , typename Mem_type , typename transform_type >
__device__ size_t CellList_cpu_ker< dim, T, Mem_type, transform_type >::ConvertToID ( const T(&)  x[dim],
size_t  s 
) const
inline

Convert the coordinates into id.

Parameters
xcoordinate
sdimension

Definition at line 124 of file CellList_cpu_ker.cuh.

◆ get()

template<unsigned int dim, typename T , typename Mem_type , typename transform_type >
__device__ unsigned int CellList_cpu_ker< dim, T, Mem_type, transform_type >::get ( unsigned int  cell,
unsigned int  ele 
)
inline

Get an element in the cell.

Template Parameters
iproperty to get
Parameters
cellcell id
eleelement id
Returns
The element value

Definition at line 166 of file CellList_cpu_ker.cuh.

◆ getCellGrid() [1/2]

template<unsigned int dim, typename T , typename Mem_type , typename transform_type >
__device__ grid_key_dx<dim> CellList_cpu_ker< dim, T, Mem_type, transform_type >::getCellGrid ( const Point< dim, T > &  pos) const
inline

Get the cell-ids.

Convert the point coordinates into the cell ids (Careful it include padding)

Parameters
posPoint position
Returns
the cell-ids ad a grid_key_dx<dim>

Definition at line 83 of file CellList_cpu_ker.cuh.

◆ getCellGrid() [2/2]

template<unsigned int dim, typename T , typename Mem_type , typename transform_type >
__device__ grid_key_dx<dim> CellList_cpu_ker< dim, T, Mem_type, transform_type >::getCellGrid ( const T(&)  pos[dim]) const
inline

Get the cell-ids.

Convert the point coordinates into the cell ids

Parameters
posPoint position
Returns
the cell-ids ad a grid_key_dx<dim>

Definition at line 105 of file CellList_cpu_ker.cuh.

◆ getGrid()

template<unsigned int dim, typename T , typename Mem_type , typename transform_type >
const __device__ grid_sm<dim,void>& CellList_cpu_ker< dim, T, Mem_type, transform_type >::getGrid ( ) const
inline

Return the underlying grid information of the cell list.

Returns
the grid infos

Definition at line 69 of file CellList_cpu_ker.cuh.

◆ getNelements()

template<unsigned int dim, typename T , typename Mem_type , typename transform_type >
__device__ int CellList_cpu_ker< dim, T, Mem_type, transform_type >::getNelements ( unsigned int  cell) const
inline

Return the number of elements in the cell.

Parameters
cell_idid of the cell
Returns
number of elements in the cell

Definition at line 151 of file CellList_cpu_ker.cuh.


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