OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
CellList_cpu_ker< dim, T, Mem_type, transform > Class Template Reference

Detailed Description

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

Definition at line 14 of file CellList_cpu_ker.cuh.

+ Inheritance diagram for CellList_cpu_ker< dim, T, Mem_type, transform >:

Public Member Functions

 CellList_cpu_ker (const Mem_type &mt, openfpm::array< T, dim, cnt_type > &spacing_c, openfpm::array< ids_type, dim, cnt_type > &div_c, openfpm::array< ids_type, dim, cnt_type > &off, grid_sm< dim, void > &gr_cell, Point< dim, long int > &cell_shift, Box< dim, T > &box_unit, const transform &t)
 
__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.
 
__device__ grid_key_dx< dim > getCellGrid (const Point< dim, T > &pos) const
 Get the cell-ids.
 
__device__ grid_key_dx< dim > getCellGrid (const T(&pos)[dim]) const
 Get the cell-ids.
 
__device__ size_t ConvertToID (const T(&x)[dim], size_t s) const
 Convert the coordinates into id.
 
__device__ size_t ConvertToID (const Point< dim, T > &x, size_t s, size_t sc=0) const
 Convert the coordinates into id.
 
__device__ int getNelements (unsigned int cell) const
 Return the number of elements in the cell.
 
__device__ unsigned int get (unsigned int cell, unsigned int ele)
 Get an element in the cell.
 

Private Types

typedef Mem_type::local_index_type cnt_type
 
typedef Mem_type::local_index_type ids_type
 

Private Attributes

openfpm::array< T, dim, cnt_type > spacing_c
 Spacing.
 
openfpm::array< ids_type, dim, cnt_type > div_c
 number of sub-divisions in each direction
 
openfpm::array< ids_type, dim, cnt_type > off
 cell padding
 
transform t
 transformation
 
grid_sm< dim, void > gr_cell
 Grid structure of the Cell list.
 
Point< dim, long int > cell_shift
 cell_shift
 
Box< dim, T > box_unit
 Unit box of the Cell list.
 

Member Typedef Documentation

◆ cnt_type

template<unsigned int dim, typename T , typename Mem_type , typename transform >
typedef Mem_type::local_index_type CellList_cpu_ker< dim, T, Mem_type, transform >::cnt_type
private

Definition at line 16 of file CellList_cpu_ker.cuh.

◆ ids_type

template<unsigned int dim, typename T , typename Mem_type , typename transform >
typedef Mem_type::local_index_type CellList_cpu_ker< dim, T, Mem_type, transform >::ids_type
private

Definition at line 18 of file CellList_cpu_ker.cuh.

Constructor & Destructor Documentation

◆ CellList_cpu_ker()

template<unsigned int dim, typename T , typename Mem_type , typename transform >
CellList_cpu_ker< dim, T, Mem_type, transform >::CellList_cpu_ker ( const Mem_type &  mt,
openfpm::array< T, dim, cnt_type > &  spacing_c,
openfpm::array< ids_type, dim, cnt_type > &  div_c,
openfpm::array< ids_type, dim, cnt_type > &  off,
grid_sm< dim, void > &  gr_cell,
Point< dim, long int > &  cell_shift,
Box< dim, T > &  box_unit,
const transform &  t 
)
inline

Definition at line 43 of file CellList_cpu_ker.cuh.

Member Function Documentation

◆ ConvertToID() [1/2]

template<unsigned int dim, typename T , typename Mem_type , typename transform >
__device__ size_t CellList_cpu_ker< dim, T, Mem_type, transform >::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 132 of file CellList_cpu_ker.cuh.

◆ ConvertToID() [2/2]

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

Convert the coordinates into id.

Parameters
xcoordinate
sdimension

Definition at line 119 of file CellList_cpu_ker.cuh.

◆ get()

template<unsigned int dim, typename T , typename Mem_type , typename transform >
__device__ unsigned int CellList_cpu_ker< dim, T, Mem_type, transform >::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 161 of file CellList_cpu_ker.cuh.

◆ getCell()

template<unsigned int dim, typename T , typename Mem_type , typename transform >
__device__ unsigned int CellList_cpu_ker< dim, T, Mem_type, transform >::getCell ( const Point< dim, T > &  xp) const
inline

Definition at line 54 of file CellList_cpu_ker.cuh.

◆ getCellGrid() [1/2]

template<unsigned int dim, typename T , typename Mem_type , typename transform >
__device__ grid_key_dx< dim > CellList_cpu_ker< dim, T, Mem_type, transform >::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 78 of file CellList_cpu_ker.cuh.

◆ getCellGrid() [2/2]

template<unsigned int dim, typename T , typename Mem_type , typename transform >
__device__ grid_key_dx< dim > CellList_cpu_ker< dim, T, Mem_type, transform >::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 100 of file CellList_cpu_ker.cuh.

◆ getGrid()

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

Return the underlying grid information of the cell list.

Returns
the grid infos

Definition at line 64 of file CellList_cpu_ker.cuh.

◆ getNelements()

template<unsigned int dim, typename T , typename Mem_type , typename transform >
__device__ int CellList_cpu_ker< dim, T, Mem_type, transform >::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 146 of file CellList_cpu_ker.cuh.

Field Documentation

◆ box_unit

template<unsigned int dim, typename T , typename Mem_type , typename transform >
Box<dim,T> CellList_cpu_ker< dim, T, Mem_type, transform >::box_unit
private

Unit box of the Cell list.

Definition at line 39 of file CellList_cpu_ker.cuh.

◆ cell_shift

template<unsigned int dim, typename T , typename Mem_type , typename transform >
Point<dim,long int> CellList_cpu_ker< dim, T, Mem_type, transform >::cell_shift
private

cell_shift

Definition at line 36 of file CellList_cpu_ker.cuh.

◆ div_c

template<unsigned int dim, typename T , typename Mem_type , typename transform >
openfpm::array<ids_type,dim,cnt_type> CellList_cpu_ker< dim, T, Mem_type, transform >::div_c
private

number of sub-divisions in each direction

Definition at line 24 of file CellList_cpu_ker.cuh.

◆ gr_cell

template<unsigned int dim, typename T , typename Mem_type , typename transform >
grid_sm<dim,void> CellList_cpu_ker< dim, T, Mem_type, transform >::gr_cell
private

Grid structure of the Cell list.

Definition at line 33 of file CellList_cpu_ker.cuh.

◆ off

template<unsigned int dim, typename T , typename Mem_type , typename transform >
openfpm::array<ids_type,dim,cnt_type> CellList_cpu_ker< dim, T, Mem_type, transform >::off
private

cell padding

Definition at line 27 of file CellList_cpu_ker.cuh.

◆ spacing_c

template<unsigned int dim, typename T , typename Mem_type , typename transform >
openfpm::array<T,dim,cnt_type> CellList_cpu_ker< dim, T, Mem_type, transform >::spacing_c
private

Spacing.

Definition at line 21 of file CellList_cpu_ker.cuh.

◆ t

template<unsigned int dim, typename T , typename Mem_type , typename transform >
transform CellList_cpu_ker< dim, T, Mem_type, transform >::t
private

transformation

Definition at line 30 of file CellList_cpu_ker.cuh.


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