8 #ifndef OPENFPM_NUMERICS_SRC_DRAW_POINTITERATORSKIN_HPP_ 9 #define OPENFPM_NUMERICS_SRC_DRAW_POINTITERATORSKIN_HPP_ 11 #include "Grid/Iterators/grid_dist_id_iterator_dec_skin.hpp" 53 template<
unsigned int dim,
typename T,
typename Decomposition>
70 for (
size_t i = 0 ; i < dim ; i++)
75 for (
size_t i = 0 ; i < dim ; i++)
77 size_t Ast = std::ceil( (sub_domA.
getLow(i) - dom.
getLow(i)) /
sp[i] ) - 1;
78 size_t Asp = std::floor( (sub_domA.
getHigh(i) - dom.
getLow(i)) /
sp[i] ) + 1;
80 size_t Bst = std::ceil( (sub_domB.
getLow(i) - dom.
getLow(i)) /
sp[i] );
81 size_t Bsp = std::floor( (sub_domB.
getHigh(i) - dom.
getLow(i)) /
sp[i] );
84 Ast = (Ast < Bst)?Bst:Ast;
85 Asp = (Asp > Bsp)?Bsp:Asp;
109 for (
size_t i = 0 ; i < dim ; i++)
146 getAB(sz,
domain,sub_A,sub_B,
sp,RETURN_B), bc),
197 for (
size_t i = 0 ; i < dim; i++)
Point< dim, T > ap
Actual point.
PointIteratorSkin & operator++()
Next point.
__device__ __host__ T getLow(int i) const
get the i-coordinate of the low bound interval of the box
this class draw particles on subset of grid-like position
__device__ __host__ index_type get(index_type i) const
Get the i index.
This class implement the point shape in an N-dimensional space.
grid_dist_id_iterator_dec_skin< Decomposition > & operator=(const grid_dist_id_iterator_dec_skin< Decomposition > &tmp)
Copy operator=.
PointIteratorSkin(Decomposition &dec, size_t(&sz)[dim], const Box< dim, T > &domain, const Box< dim, T > &sub_A, const Box< dim, T > &sub_B, size_t(&bc)[dim])
Draw Particles.
__device__ __host__ void setHigh(int i, T val)
set the high interval of the box
This class define the domain decomposition interface.
__device__ __host__ void setLow(int i, T val)
set the low interval of the box
openfpm::vector< Box< dim, T > > sub_domainA
sub_domain (required to filter out points)
grid_key_dx< Decomposition::dims > get()
Get the actual global key of the grid.
Box< dim, T > domain
domain
This class represent an N-dimensional box.
Implementation of 1-D std::vector like structure.
bool isNext()
Check if there is the next element.
__device__ __host__ T getHigh(int i) const
get the high interval of the box
Given the decomposition it create an iterator.
grid_dist_id_iterator_dec_skin< Decomposition > & operator++()
Get the next element.