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< 0, warn > Class Template Reference

Detailed Description

template<typename warn>
class grid_key_dx_iterator_sub< 0, warn >

Grid key class iterator, iterate through a sub-grid defined by an hyper-cube

Parameters
dimdimensionality of the grid
Note
if you have a grid you can get this object from getIteratorSub()

Sub grid iterator declaration and usage

// Subdivisions
size_t div[3] = {16,16,16};
// grid info
grid_sm<3,void> g_info(div);
grid_key_dx<3> start(1,1,1);
grid_key_dx<3> stop(14,14,14);
// Create a grid iterator (start and stop included)
grid_key_dx_iterator_sub<3> g_it(g_info,start,stop);
// Iterate on all the elements
while (g_it.isNext())
{
grid_key_dx<3> key = g_it.get();
// set the grid key to zero without any reason ( to avoid warning compilations )
key.zero();
count++;
++g_it;
}
BOOST_REQUIRE_EQUAL(count, (size_t)14*14*14);

Definition at line 420 of file grid_key_dx_iterator_sub.hpp.

#include <grid_key_dx_iterator_sub.hpp>

Public Member Functions

grid_key_dx_iterator< 0 > & operator++ ()
 
bool isNext ()
 
size_t getVolume ()
 
void reset ()
 

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