OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
grid_skin_iterator_bc< dim > Class Template Reference

Detailed Description

template<unsigned int dim>
class grid_skin_iterator_bc< dim >

Grid key class iterator, iterate through the grid elements on the skin on the grid

In particular given 2 boxes A and B

+----------------------------+
|       skin    B            |
|   +----------------------+ |
|   |                      | |
| s |                      | |
| k |                      | |
| i |                      | |
| n |          A           | |
|   |                      | |
|   |                      | |
|   |                      | |
|   |                      | |
|   |                      | |
|   +----------------------+ |
|            skin            |
+----------------------------+
Warning
A MUST BE fully contained into B

The skin is the part in between the two boxes A and B

More in general is the Box B removed of A without border. This iterator respect the boundary conditions

Parameters
dimdimensionality of the grid

Definition at line 54 of file grid_skin_iterator.hpp.

#include <grid_skin_iterator.hpp>

Public Member Functions

template<typename T >
 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

grid_key_dx_iterator_sub_bc< dim > sub_it [2 *dim]
 Internal iterator for each faces.
 

Private Attributes

size_t act
 Actual iterator.
 

Constructor & Destructor Documentation

◆ grid_skin_iterator_bc()

template<unsigned int dim>
template<typename T >
grid_skin_iterator_bc< dim >::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] 
)
inline

Constructor require a grid_sm<dim,T>

Parameters
g_smgrid information
Abox A
Bbox B
bcboundary conditions

Definition at line 75 of file grid_skin_iterator.hpp.

Member Function Documentation

◆ get()

template<unsigned int dim>
grid_key_dx< dim > grid_skin_iterator_bc< dim >::get ( ) const
inline

Get the actual key.

Get the actual key

Returns
the actual key

Definition at line 186 of file grid_skin_iterator.hpp.

◆ isNext()

template<unsigned int dim>
bool grid_skin_iterator_bc< dim >::isNext ( )
inline

Check if there is the next element.

Check if there is the next element

Returns
true if there is the next, false otherwise

we did not reach the end of the iterator

we reach the end of the iterator

Definition at line 166 of file grid_skin_iterator.hpp.

◆ operator++()

template<unsigned int dim>
grid_skin_iterator_bc< dim > & grid_skin_iterator_bc< dim >::operator++ ( )
inline

Get the next element.

Returns
the next grid_key

Definition at line 149 of file grid_skin_iterator.hpp.

◆ reset()

template<unsigned int dim>
void grid_skin_iterator_bc< dim >::reset ( )
inline

Reset the iterator (it restart from the beginning)

Initialize to 0 the index

Definition at line 194 of file grid_skin_iterator.hpp.

Field Documentation

◆ act

template<unsigned int dim>
size_t grid_skin_iterator_bc< dim >::act
private

Actual iterator.

Definition at line 63 of file grid_skin_iterator.hpp.

◆ sub_it

template<unsigned int dim>
grid_key_dx_iterator_sub_bc<dim> grid_skin_iterator_bc< dim >::sub_it[2 *dim]
protected

Internal iterator for each faces.

Definition at line 58 of file grid_skin_iterator.hpp.


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