OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
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.
 
 grid_dist_id_iterator_dec_skin (grid_dist_id_iterator_dec_skin< Decomposition > &&tmp)
 Copy constructor.
 
 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.
 
 ~grid_dist_id_iterator_dec_skin ()
 Destructor.
 
grid_dist_id_iterator_dec_skin< Decomposition > & operator++ ()
 Get the next element.
 
bool isNext ()
 Check if there is the next element.
 
Decomposition::stype getSpacing (size_t i)
 Get the spacing of the grid.
 
grid_key_dx< Decomposition::dims > get ()
 Get the actual global key of the grid.
 
grid_dist_key_dx< Decomposition::dims > get_int ()
 Get the actual key.
 
grid_dist_id_iterator_dec_skin< Decomposition > & operator= (const grid_dist_id_iterator_dec_skin< Decomposition > &tmp)
 Copy operator=.
 
grid_dist_id_iterator_dec_skin< Decomposition > & operator= (grid_dist_id_iterator_dec_skin< Decomposition > &&tmp)
 Copy operator=.
 

Private Member Functions

void selectValidGrid ()
 from g_c increment g_c until you find a valid grid
 
void construct_sub_it ()
 construct sub-iterators
 

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>
 
grid_skin_iterator_bc< dim > & operator++ ()
 Get the next element.
 
bool isNext ()
 Check if there is the next element.
 
grid_key_dx< dim > get () const
 Get the actual key.
 
void reset ()
 Reset the iterator (it restart from the beginning)
 
- 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

◆ grid_dist_id_iterator_dec_skin() [1/3]

Copy constructor.

Parameters
tmpiterator to copy

Definition at line 124 of file grid_dist_id_iterator_dec_skin.hpp.

◆ grid_dist_id_iterator_dec_skin() [2/3]

Copy constructor.

Parameters
tmpiterator to copy

Definition at line 135 of file grid_dist_id_iterator_dec_skin.hpp.

◆ grid_dist_id_iterator_dec_skin() [3/3]

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 150 of file grid_dist_id_iterator_dec_skin.hpp.

◆ ~grid_dist_id_iterator_dec_skin()

Destructor.

Definition at line 173 of file grid_dist_id_iterator_dec_skin.hpp.

Member Function Documentation

◆ construct_sub_it()

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.

◆ get()

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 234 of file grid_dist_id_iterator_dec_skin.hpp.

◆ get_int()

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

Get the actual key.

Returns
the actual key

Definition at line 254 of file grid_dist_id_iterator_dec_skin.hpp.

◆ getSpacing()

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 223 of file grid_dist_id_iterator_dec_skin.hpp.

◆ isNext()

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 206 of file grid_dist_id_iterator_dec_skin.hpp.

◆ operator++()

Get the next element.

Returns
itself

Definition at line 182 of file grid_dist_id_iterator_dec_skin.hpp.

◆ operator=() [1/2]

Copy operator=.

Parameters
tmpiterator to copy
Returns
itself

Definition at line 266 of file grid_dist_id_iterator_dec_skin.hpp.

◆ operator=() [2/2]

Copy operator=.

Parameters
tmpiterator to copy
Returns
itself

Definition at line 288 of file grid_dist_id_iterator_dec_skin.hpp.

◆ selectValidGrid()

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.

Field Documentation

◆ a_it

template<typename Decomposition >
grid_key_dx_iterator_sub<Decomposition::dims> grid_dist_id_iterator_dec_skin< Decomposition >::a_it
private

Internal grid sub-iterator.

Definition at line 36 of file grid_dist_id_iterator_dec_skin.hpp.

◆ a_its

Actual sub-iterators.

Definition at line 59 of file grid_dist_id_iterator_dec_skin.hpp.

◆ a_its_p

template<typename Decomposition >
size_t grid_dist_id_iterator_dec_skin< Decomposition >::a_its_p
private

a_its element in this moment selected

Definition at line 27 of file grid_dist_id_iterator_dec_skin.hpp.

◆ g_c

template<typename Decomposition >
size_t grid_dist_id_iterator_dec_skin< Decomposition >::g_c
private

grid list counter

Definition at line 30 of file grid_dist_id_iterator_dec_skin.hpp.

◆ gdb_ext

template<typename Decomposition >
openfpm::vector<GBoxes<Decomposition::dims> > grid_dist_id_iterator_dec_skin< Decomposition >::gdb_ext
private

Extension of each grid: domain and ghost + domain.

Definition at line 33 of file grid_dist_id_iterator_dec_skin.hpp.

◆ spacing

template<typename Decomposition >
Decomposition::stype grid_dist_id_iterator_dec_skin< Decomposition >::spacing[Decomposition::dims]
private

Spacing.

Definition at line 62 of file grid_dist_id_iterator_dec_skin.hpp.


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