8#ifndef OPENFPM_DATA_SRC_GRID_GRID_SKIN_ITERATOR_HPP_
9#define OPENFPM_DATA_SRC_GRID_GRID_SKIN_ITERATOR_HPP_
11#include "grid_key_dx_iterator_sub_bc.hpp"
53template<
unsigned int dim>
78 for (
size_t i = 0 ; i < dim ; i++)
83 for (
size_t j = 0 ; j < dim ; j++)
87 k1.
set_d(j,A.getHigh(j));
88 k2.
set_d(j,B.getHigh(j));
94 k1.
set_d(j,A.getLow(j)+1);
95 k2.
set_d(j,A.getHigh(j)-1);
99 k1.
set_d(j,B.getLow(j));
100 k2.
set_d(j,B.getHigh(j));
108 sub_it[2*i].Initialize(g_sm,k1,k2,bc);
110 for (
size_t j = 0 ; j < dim ; j++)
114 k1.
set_d(j,B.getLow(j));
115 k2.
set_d(j,A.getLow(j));
122 k1.
set_d(j,A.getLow(j)+1);
123 k2.
set_d(j,A.getHigh(j)-1);
127 k1.
set_d(j,B.getLow(j));
128 k2.
set_d(j,B.getHigh(j));
135 if (bl.
isValid() ==
true && bl != br)
136 sub_it[2*i+1].Initialize(g_sm,k1,k2,bc);
199 for (
size_t i = 0 ; i < 2*dim ; i++)
This class represent an N-dimensional box.
bool isValid() const
Check if the Box is a valid box P2 >= P1.
The same as grid_key_dx_iterator_sub_p but with periodic boundary.
grid_key_dx is the key to access any element in the grid
__device__ __host__ void set_d(index_type i, index_type id)
Set the i index.
__device__ __host__ index_type get(index_type i) const
Get the i index.
grid_key_dx_iterator_sub_bc< dim > sub_it[2 *dim]
Internal iterator for each faces.
size_t act
Actual iterator.
void reset()
Reset the iterator (it restart from the beginning)
bool isNext()
Check if there is the next element.
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_key_dx< dim > get() const
Get the actual key.
grid_skin_iterator_bc< dim > & operator++()
Get the next element.