OpenFPM_pdata  1.1.0
Project that contain the implementation of distributed structures
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Pages
grid_dist_id_iterator_dec_skin< Decomposition > Class Template Reference

Given the decomposition it create an iterator. More...

Detailed Description

template<typename Decomposition>
class grid_dist_id_iterator_dec_skin< Decomposition >

Given the decomposition it create an iterator.

Iterator across the local elements of the distributed grid

Template Parameters
decDecomposition type

Definition at line 24 of file grid_dist_id_iterator_dec_skin.hpp.

#include <grid_dist_id_iterator_dec_skin.hpp>

+ Inheritance diagram for grid_dist_id_iterator_dec_skin< Decomposition >:

Data Structures

struct  gp_sub
 Internal struct. More...
 

Public Member Functions

 grid_dist_id_iterator_dec_skin (const grid_dist_id_iterator_dec_skin< Decomposition > &tmp)
 Copy constructor. More...
 
 grid_dist_id_iterator_dec_skin (grid_dist_id_iterator_dec_skin< Decomposition > &&tmp)
 Copy constructor. More...
 
 grid_dist_id_iterator_dec_skin (Decomposition &dec, const grid_sm< Decomposition::dims, void > &g_sm, const Box< Decomposition::dims, size_t > &A, const Box< Decomposition::dims, size_t > &B, const size_t(&bc)[Decomposition::dims])
 Constructor of the distributed grid iterator. More...
 
 ~grid_dist_id_iterator_dec_skin ()
 Destructor.
 
grid_dist_id_iterator_dec_skin
< Decomposition > & 
operator++ ()
 Get the next element. More...
 
bool isNext ()
 Check if there is the next element. More...
 
Decomposition::stype getSpacing (size_t i)
 Get the spacing of the grid. More...
 
grid_key_dx< Decomposition::dims > get ()
 Get the actual global key of the grid. More...
 
grid_dist_id_iterator_dec_skin
< Decomposition > & 
operator= (const grid_dist_id_iterator_dec_skin< Decomposition > &tmp)
 Copy operator=. More...
 
grid_dist_id_iterator_dec_skin
< Decomposition > & 
operator= (grid_dist_id_iterator_dec_skin< Decomposition > &&tmp)
 Copy operator=. More...
 

Private Member Functions

void selectValidGrid ()
 from g_c increment g_c until you find a valid grid More...
 
void construct_sub_it ()
 construct sub-iterators More...
 
grid_dist_key_dx
< Decomposition::dims > 
get_int ()
 Get the actual key. More...
 

Private Attributes

size_t a_its_p
 a_its element in this moment selected
 
size_t g_c
 grid list counter
 
openfpm::vector< GBoxes
< Decomposition::dims > > 
gdb_ext
 Extension of each grid: domain and ghost + domain.
 
grid_key_dx_iterator_sub
< Decomposition::dims > 
a_it
 Internal grid sub-iterator.
 
openfpm::vector< gp_suba_its
 Actual sub-iterators.
 
Decomposition::stype spacing [Decomposition::dims]
 Spacing.
 

Additional Inherited Members

- Protected Member Functions inherited from grid_skin_iterator_bc< Decomposition::dims >
 grid_skin_iterator_bc (const grid_sm< dim, T > &g_sm, const Box< dim, size_t > &A, const Box< dim, size_t > &B, const size_t(&bc)[dim])
 Constructor require a grid_sm<dim,T> More...
 
grid_skin_iterator_bc< dim > & operator++ ()
 Get the next element. More...
 
bool isNext ()
 Check if there is the next element. More...
 
grid_key_dx< dim > get () const
 Get the actual key. More...
 
void reset ()
 Reset the iterator (it restart from the beginning) More...
 
- Protected Attributes inherited from grid_skin_iterator_bc< Decomposition::dims >
grid_key_dx_iterator_sub_bc< dim > sub_it [2 *dim]
 Internal iterator for each faces.
 

Constructor & Destructor Documentation

Copy constructor.

Parameters
tmpiterator to copy

Definition at line 133 of file grid_dist_id_iterator_dec_skin.hpp.

Copy constructor.

Parameters
tmpiterator to copy

Definition at line 144 of file grid_dist_id_iterator_dec_skin.hpp.

template<typename Decomposition>
grid_dist_id_iterator_dec_skin< Decomposition >::grid_dist_id_iterator_dec_skin ( Decomposition dec,
const grid_sm< Decomposition::dims, void > &  g_sm,
const Box< Decomposition::dims, size_t > &  A,
const Box< Decomposition::dims, size_t > &  B,
const size_t(&)  bc[Decomposition::dims] 
)
inline

Constructor of the distributed grid iterator.

Parameters
decDecomposition
g_smgrid size on each direction
Abox A (must be contained into B)
Bbox B
bcboundary conditions

Definition at line 159 of file grid_dist_id_iterator_dec_skin.hpp.

Member Function Documentation

template<typename Decomposition>
void grid_dist_id_iterator_dec_skin< Decomposition >::construct_sub_it ( )
inlineprivate

construct sub-iterators

Definition at line 85 of file grid_dist_id_iterator_dec_skin.hpp.

template<typename Decomposition>
grid_key_dx<Decomposition::dims> grid_dist_id_iterator_dec_skin< Decomposition >::get ( )
inline

Get the actual global key of the grid.

Returns
the global position in the grid

Definition at line 243 of file grid_dist_id_iterator_dec_skin.hpp.

template<typename Decomposition>
grid_dist_key_dx<Decomposition::dims> grid_dist_id_iterator_dec_skin< Decomposition >::get_int ( )
inlineprivate

Get the actual key.

Returns
the actual key

Definition at line 120 of file grid_dist_id_iterator_dec_skin.hpp.

template<typename Decomposition>
Decomposition::stype grid_dist_id_iterator_dec_skin< Decomposition >::getSpacing ( size_t  i)
inline

Get the spacing of the grid.

Parameters
idimension
Returns
the spacing

Definition at line 232 of file grid_dist_id_iterator_dec_skin.hpp.

template<typename Decomposition>
bool grid_dist_id_iterator_dec_skin< Decomposition >::isNext ( )
inline

Check if there is the next element.

Returns
true if there is the next, false otherwise

Definition at line 215 of file grid_dist_id_iterator_dec_skin.hpp.

template<typename Decomposition>
grid_dist_id_iterator_dec_skin<Decomposition>& grid_dist_id_iterator_dec_skin< Decomposition >::operator++ ( )
inline

Get the next element.

Returns
itself

Definition at line 191 of file grid_dist_id_iterator_dec_skin.hpp.

Copy operator=.

Parameters
tmpiterator to copy
Returns
itself

Definition at line 271 of file grid_dist_id_iterator_dec_skin.hpp.

Copy operator=.

Parameters
tmpiterator to copy
Returns
itself

Definition at line 293 of file grid_dist_id_iterator_dec_skin.hpp.

template<typename Decomposition>
void grid_dist_id_iterator_dec_skin< Decomposition >::selectValidGrid ( )
inlineprivate

from g_c increment g_c until you find a valid grid

Definition at line 68 of file grid_dist_id_iterator_dec_skin.hpp.


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