OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
grid_key_dx_iterator_sub_bc< dim, stencil, linearizer, 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 stencil = no_stencil, typename linearizer = grid_sm<dim,void>, typename warn = print_warning_on_adjustment<dim,linearizer>>
class grid_key_dx_iterator_sub_bc< dim, stencil, linearizer, 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, stencil, linearizer, warn >:

Public Member Functions

 grid_key_dx_iterator_sub_bc (const grid_key_dx_iterator_sub_bc &tmp)
 
 grid_key_dx_iterator_sub_bc (grid_key_dx_iterator_sub_bc &&tmp)
 
grid_key_dx_iterator_sub_bcoperator= (const grid_key_dx_iterator_sub_bc &tmp)
 
grid_key_dx_iterator_sub_bcoperator= (grid_key_dx_iterator_sub_bc &&tmp)
 
 grid_key_dx_iterator_sub_bc ()
 Constructor.
 
 grid_key_dx_iterator_sub_bc (const linearizer &g, const grid_key_dx< dim > &start, const grid_key_dx< dim > &stop, const size_t(&bc)[dim])
 Constructor.
 
void Initialize (const linearizer &g, const grid_key_dx< dim > &start, const grid_key_dx< dim > &stop, const size_t(&bc)[dim])
 Initialize the iterator.
 
grid_key_dx_iterator_sub_bc< dim, stencil, linearizer, warn > & operator++ ()
 Get the next element.
 
bool isNext ()
 Check if there is the next element.
 
const grid_key_dx< dim > get () const
 Return the actual grid key iterator.
 
void reset ()
 Reset the iterator (it restart from the beginning)
 
- Public Member Functions inherited from grid_key_dx_iterator_sub< dim, stencil, linearizer, warn >
 grid_key_dx_iterator_sub ()
 Default constructor.
 
 grid_key_dx_iterator_sub (const grid_key_dx_iterator_sub< dim, stencil, linearizer > &g_s_it)
 Constructor from another grid_key_dx_iterator_sub.
 
 grid_key_dx_iterator_sub (const linearizer &g, const grid_key_dx< dim > &start, const grid_key_dx< dim > &stop)
 Constructor require a grid grid<dim,T>
 
 grid_key_dx_iterator_sub (const linearizer &g, const grid_key_dx< dim > &start, const grid_key_dx< dim > &stop, const grid_key_dx< dim >(&stencil_pnt)[stencil::nsp])
 Constructor require a grid grid<dim,T>
 
 grid_key_dx_iterator_sub (const grid_key_dx< dim >(&stencil_pnt)[stencil::nsp])
 Constructor.
 
 grid_key_dx_iterator_sub (const linearizer &g, const size_t m)
 Constructor require a grid grid<dim,T>
 
 grid_key_dx_iterator_sub (const linearizer &g, const size_t(&start)[dim], const size_t(&stop)[dim])
 Constructor require a grid grid<dim,T>
 
grid_key_dx_iterator_sub< dim, stencil, linearizer, warn > & operator++ ()
 Get the next element.
 
grid_key_dx_iterator_sub< dim, stencil, warn > & operator+= (int nsteps)
 increment the operator by more than one
 
bool isNext ()
 Check if there is the next element.
 
grid_key_dx< dim > get () const
 Return the actual grid key iterator.
 
void reinitialize (const grid_key_dx_iterator_sub< dim > &g_s_it)
 Reinitialize the iterator.
 
size_t getVolume ()
 Get the volume spanned by this sub-grid iterator.
 
void reset ()
 Reset the iterator (it restart from the beginning)
 
const linearizer & getGridInfo () const
 Return the grid information related to this grid.
 
const grid_key_dx< dim > & getStart () const
 Starting point.
 
const grid_key_dx< dim > & getStop () const
 Stop point.
 
template<unsigned int tot_add>
void private_sum ()
 Sum a template constant.
 
void private_adjust (size_t tot_add)
 Sum a template constant.
 
void invalidate ()
 
- Public Member Functions inherited from grid_key_dx_iterator< dim, stencil, linearizer >
 grid_key_dx_iterator ()
 Default constructor.
 
 grid_key_dx_iterator (const grid_key_dx_iterator< dim > &g_it)
 Constructor from a grid_key_dx_iterator<dim>
 
 grid_key_dx_iterator (const grid_lin &g, const grid_key_dx< dim >(&stencil_pnt)[stencil::nsp])
 Constructor require a grid_sm<dim,T>
 
 grid_key_dx_iterator (const grid_key_dx< dim >(&stencil_pnt)[stencil::nsp])
 Constructor.
 
 grid_key_dx_iterator (const linearizer &g)
 Constructor require a grid_sm<dim,T>
 
grid_key_dx_iterator< dim > operator= (const grid_key_dx_iterator< dim > &key_it)
 Constructor from another grid_key_dx_iterator.
 
grid_key_dx_iterator< dim, stencil, linearizer > & operator++ ()
 Get the next element.
 
void set (int d, size_t sz)
 Set the dimension.
 
size_t getStencil () const
 Get the actual position.
 
bool isNext ()
 Check if there is the next element.
 
const grid_key_dx< dim > & get () const
 Get the actual key.
 
void reinitialize (const grid_key_dx_iterator< dim > &key)
 Reinitialize the grid_key_dx_iterator.
 
const linearizer & getGridInfo () const
 Get the information about the grid.
 
void reset ()
 Reset the iterator (it restart from the beginning)
 
void calc_stencil_offset (const grid_key_dx< dim > &start_p)
 Calculate the stencil offset.
 
grid_key_dx< dim > getStart ()
 Return the starting point of the iteration.
 
grid_key_dx< dim > getStop ()
 Return the stop point of the iteration.
 
size_t getVolume ()
 Get the volume spanned by this sub-grid iterator.
 

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.
 

Private Attributes

size_t bc [dim]
 Boundary conditions.
 
size_t act
 actual iterator box
 
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, stencil, linearizer >
grid_key_dx< dim > gk
 Actual key.
 
stencil stl_code
 

Constructor & Destructor Documentation

◆ grid_key_dx_iterator_sub_bc() [1/4]

template<unsigned int dim, typename stencil = no_stencil, typename linearizer = grid_sm<dim,void>, typename warn = print_warning_on_adjustment<dim,linearizer>>
grid_key_dx_iterator_sub_bc< dim, stencil, linearizer, warn >::grid_key_dx_iterator_sub_bc ( const grid_key_dx_iterator_sub_bc< dim, stencil, linearizer, warn > &  tmp)
inline

Definition at line 51 of file grid_key_dx_iterator_sub_bc.hpp.

◆ grid_key_dx_iterator_sub_bc() [2/4]

template<unsigned int dim, typename stencil = no_stencil, typename linearizer = grid_sm<dim,void>, typename warn = print_warning_on_adjustment<dim,linearizer>>
grid_key_dx_iterator_sub_bc< dim, stencil, linearizer, warn >::grid_key_dx_iterator_sub_bc ( grid_key_dx_iterator_sub_bc< dim, stencil, linearizer, warn > &&  tmp)
inline

Definition at line 57 of file grid_key_dx_iterator_sub_bc.hpp.

◆ grid_key_dx_iterator_sub_bc() [3/4]

template<unsigned int dim, typename stencil = no_stencil, typename linearizer = grid_sm<dim,void>, typename warn = print_warning_on_adjustment<dim,linearizer>>
grid_key_dx_iterator_sub_bc< dim, stencil, linearizer, warn >::grid_key_dx_iterator_sub_bc ( )
inline

Constructor.

Definition at line 89 of file grid_key_dx_iterator_sub_bc.hpp.

◆ grid_key_dx_iterator_sub_bc() [4/4]

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

Constructor.

Parameters
gGrid information
startstarting point
stopstop point
bcboundary conditions

Definition at line 104 of file grid_key_dx_iterator_sub_bc.hpp.

Member Function Documentation

◆ check_invalid()

template<unsigned int dim, typename stencil = no_stencil, typename linearizer = grid_sm<dim,void>, typename warn = print_warning_on_adjustment<dim,linearizer>>
bool grid_key_dx_iterator_sub_bc< dim, stencil, linearizer, 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.

◆ get()

template<unsigned int dim, typename stencil = no_stencil, typename linearizer = grid_sm<dim,void>, typename warn = print_warning_on_adjustment<dim,linearizer>>
const grid_key_dx< dim > grid_key_dx_iterator_sub_bc< dim, stencil, linearizer, warn >::get ( ) const
inline

Return the actual grid key iterator.

Returns
the actual key

Definition at line 248 of file grid_key_dx_iterator_sub_bc.hpp.

◆ Initialize()

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

Initialize the iterator.

Parameters
gGrid information
startstarting point
stopstop point
bcboundary conditions

Definition at line 121 of file grid_key_dx_iterator_sub_bc.hpp.

◆ isNext()

template<unsigned int dim, typename stencil = no_stencil, typename linearizer = grid_sm<dim,void>, typename warn = print_warning_on_adjustment<dim,linearizer>>
bool grid_key_dx_iterator_sub_bc< dim, stencil, linearizer, 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 238 of file grid_key_dx_iterator_sub_bc.hpp.

◆ operator++()

template<unsigned int dim, typename stencil = no_stencil, typename linearizer = grid_sm<dim,void>, typename warn = print_warning_on_adjustment<dim,linearizer>>
grid_key_dx_iterator_sub_bc< dim, stencil, linearizer, warn > & grid_key_dx_iterator_sub_bc< dim, stencil, linearizer, warn >::operator++ ( )
inline

Get the next element.

Get the next element

Returns
the next grid_key

Definition at line 213 of file grid_key_dx_iterator_sub_bc.hpp.

◆ operator=() [1/2]

template<unsigned int dim, typename stencil = no_stencil, typename linearizer = grid_sm<dim,void>, typename warn = print_warning_on_adjustment<dim,linearizer>>
grid_key_dx_iterator_sub_bc & grid_key_dx_iterator_sub_bc< dim, stencil, linearizer, warn >::operator= ( const grid_key_dx_iterator_sub_bc< dim, stencil, linearizer, warn > &  tmp)
inline

Definition at line 63 of file grid_key_dx_iterator_sub_bc.hpp.

◆ operator=() [2/2]

template<unsigned int dim, typename stencil = no_stencil, typename linearizer = grid_sm<dim,void>, typename warn = print_warning_on_adjustment<dim,linearizer>>
grid_key_dx_iterator_sub_bc & grid_key_dx_iterator_sub_bc< dim, stencil, linearizer, warn >::operator= ( grid_key_dx_iterator_sub_bc< dim, stencil, linearizer, warn > &&  tmp)
inline

Definition at line 74 of file grid_key_dx_iterator_sub_bc.hpp.

◆ reset()

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

Reset the iterator (it restart from the beginning)

Definition at line 256 of file grid_key_dx_iterator_sub_bc.hpp.

Field Documentation

◆ act

template<unsigned int dim, typename stencil = no_stencil, typename linearizer = grid_sm<dim,void>, typename warn = print_warning_on_adjustment<dim,linearizer>>
size_t grid_key_dx_iterator_sub_bc< dim, stencil, linearizer, warn >::act
private

actual iterator box

Definition at line 25 of file grid_key_dx_iterator_sub_bc.hpp.

◆ bc

template<unsigned int dim, typename stencil = no_stencil, typename linearizer = grid_sm<dim,void>, typename warn = print_warning_on_adjustment<dim,linearizer>>
size_t grid_key_dx_iterator_sub_bc< dim, stencil, linearizer, warn >::bc[dim]
private

Boundary conditions.

Definition at line 22 of file grid_key_dx_iterator_sub_bc.hpp.

◆ boxes

template<unsigned int dim, typename stencil = no_stencil, typename linearizer = grid_sm<dim,void>, typename warn = print_warning_on_adjustment<dim,linearizer>>
std::vector<Box<dim,size_t> > grid_key_dx_iterator_sub_bc< dim, stencil, linearizer, warn >::boxes
private

Here we have all the boxes that this iterator produce.

Definition at line 28 of file grid_key_dx_iterator_sub_bc.hpp.


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