OpenFPM_data  0.1.0
Project that contain the implementation and interfaces for basic structure like vectors, grids, graph ... .
 All Data Structures Namespaces Functions Variables Typedefs Friends
grid_key_dx_iterator_sub_bc< dim, warn > Class Template Reference

The same as grid_key_dx_iterator_sub_p but with periodic boundary. More...

Detailed Description

template<unsigned int dim, typename warn = print_warning_on_adjustment<dim>>
class grid_key_dx_iterator_sub_bc< dim, warn >

The same as grid_key_dx_iterator_sub_p but with periodic boundary.

In this case the boundaries are periodic

Definition at line 19 of file grid_key_dx_iterator_sub_bc.hpp.

#include <grid_key_dx_iterator_sub_bc.hpp>

+ Inheritance diagram for grid_key_dx_iterator_sub_bc< dim, warn >:

Public Member Functions

template<typename T >
 grid_key_dx_iterator_sub_bc (const grid_sm< dim, T > &g, const grid_key_dx< dim > &start, const grid_key_dx< dim > &stop, const size_t(&bc)[dim])
 Constructor. More...
 
grid_key_dx_iterator_sub_bc
< dim, warn > & 
operator++ ()
 Get the next element. More...
 
bool isNext ()
 Check if there is the next element. More...
 
grid_key_dx< dim > get ()
 Return the actual grid key iterator. More...
 
void reset ()
 Reset the iterator (it restart from the beginning) More...
 
- Public Member Functions inherited from grid_key_dx_iterator_sub< dim, warn >
 grid_key_dx_iterator_sub ()
 Default constructor. More...
 
 grid_key_dx_iterator_sub (const grid_key_dx_iterator_sub< dim > &g_s_it)
 Constructor from another grid_key_dx_iterator_sub. More...
 
template<typename T >
 grid_key_dx_iterator_sub (const grid_sm< dim, T > &g, const grid_key_dx< dim > &start, const grid_key_dx< dim > &stop)
 Constructor require a grid grid<dim,T> More...
 
template<typename T >
 grid_key_dx_iterator_sub (const grid_sm< dim, T > &g, const size_t m)
 Constructor require a grid grid<dim,T> More...
 
template<typename T >
 grid_key_dx_iterator_sub (const grid_sm< dim, T > &g, const size_t(&start)[dim], const size_t(&stop)[dim])
 Constructor require a grid grid<dim,T> More...
 
grid_key_dx_iterator< dim > & operator++ ()
 Get the next element. More...
 
bool isNext ()
 Check if there is the next element. More...
 
grid_key_dx< dim > get ()
 Return the actual grid key iterator. More...
 
void reinitialize (const grid_key_dx_iterator_sub< dim, warn > &g_s_it)
 Reinitialize the iterator. More...
 
size_t getVolume ()
 Get the volume spanned by this sub-grid iterator. More...
 
void reset ()
 Reset the iterator (it restart from the beginning) More...
 
const grid_sm< dim, void > & getGridInfo ()
 Return the grid information related to this grid. More...
 
- Public Member Functions inherited from grid_key_dx_iterator< dim >
 grid_key_dx_iterator ()
 Default constructor. More...
 
 grid_key_dx_iterator (const grid_key_dx_iterator< dim > &g_it)
 Constructor from a grid_key_dx_iterator<dim> More...
 
template<typename T >
 grid_key_dx_iterator (const grid_sm< dim, T > &g)
 Constructor require a grid_sm<dim,T> More...
 
grid_key_dx_iterator< dim > operator= (const grid_key_dx_iterator< dim > &key_it)
 Constructor from another grid_key_dx_iterator. More...
 
grid_key_dx_iterator< dim > & operator++ ()
 Get the next element. More...
 
void set (int d, size_t sz)
 Set the dimension. More...
 
bool isNext ()
 Check if there is the next element. More...
 
const grid_key_dx< dim > & get ()
 Get the actual key. More...
 
void reinitialize (const grid_key_dx_iterator< dim > &key)
 Reinitialize the grid_key_dx_iterator. More...
 
void reset ()
 Reset the iterator (it restart from the beginning) More...
 

Private Member Functions

bool check_invalid (const grid_key_dx< dim > &key, const size_t(&bc)[dim])
 Check if the position is valid with the actual boundary conditions. More...
 

Private Attributes

size_t bc [dim]
 
size_t act
 
std::vector< Box< dim, size_t > > boxes
 Here we have all the boxes that this iterator produce.
 

Additional Inherited Members

- Protected Attributes inherited from grid_key_dx_iterator< dim >
grid_key_dx< dim > gk
 

Constructor & Destructor Documentation

template<unsigned int dim, typename warn = print_warning_on_adjustment<dim>>
template<typename T >
grid_key_dx_iterator_sub_bc< dim, warn >::grid_key_dx_iterator_sub_bc ( const grid_sm< dim, T > &  g,
const grid_key_dx< dim > &  start,
const grid_key_dx< dim > &  stop,
const size_t(&)  bc[dim] 
)
inline

Constructor.

Parameters
gGrid information

Definition at line 56 of file grid_key_dx_iterator_sub_bc.hpp.

Member Function Documentation

template<unsigned int dim, typename warn = print_warning_on_adjustment<dim>>
bool grid_key_dx_iterator_sub_bc< dim, warn >::check_invalid ( const grid_key_dx< dim > &  key,
const size_t(&)  bc[dim] 
)
inlineprivate

Check if the position is valid with the actual boundary conditions.

Parameters
keykey to check

Definition at line 35 of file grid_key_dx_iterator_sub_bc.hpp.

template<unsigned int dim, typename warn = print_warning_on_adjustment<dim>>
grid_key_dx<dim> grid_key_dx_iterator_sub_bc< dim, warn >::get ( )
inline

Return the actual grid key iterator.

Definition at line 167 of file grid_key_dx_iterator_sub_bc.hpp.

template<unsigned int dim, typename warn = print_warning_on_adjustment<dim>>
bool grid_key_dx_iterator_sub_bc< dim, warn >::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

Definition at line 159 of file grid_key_dx_iterator_sub_bc.hpp.

template<unsigned int dim, typename warn = print_warning_on_adjustment<dim>>
grid_key_dx_iterator_sub_bc<dim,warn>& grid_key_dx_iterator_sub_bc< dim, warn >::operator++ ( )
inline

Get the next element.

Get the next element

Returns
the next grid_key

Definition at line 134 of file grid_key_dx_iterator_sub_bc.hpp.

template<unsigned int dim, typename warn = print_warning_on_adjustment<dim>>
void grid_key_dx_iterator_sub_bc< dim, warn >::reset ( )
inline

Reset the iterator (it restart from the beginning)

Definition at line 175 of file grid_key_dx_iterator_sub_bc.hpp.


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