this class draw particles on subset of grid-like position More...
this class draw particles on subset of grid-like position
Point B | (0.6,0.6) + + + + + | + + + + +---------------+ + | + + + + | + + + + | | + | + + + + | + + + + | | + | + + + + | + + + + | | + | + + + + | + + + + | | + | + + + + | + + + + | | + | + + + + | + + + + | | + | + + + + | + + + + +---------------+ + + + + + ^ + + + + (-1.0,-1.0) | | (Point A)
Suppose we have a grid 9x9 from (-1.0,-1.0 to 0.6,0.6) Defined a Box (-0.9,-0.9 to -0.1,0.5) This class will return the points (-0.8 -0.8) (-0.6 -0.8) (-0.4 -0.8) ... (-0.1,-0.8) Point A ... (-0.1,0.5) Point B
Definition at line 58 of file PointIterator.hpp.
#include <PointIterator.hpp>
Public Member Functions | |
PointIterator (Decomposition &dec, size_t(&sz)[dim], const Box< dim, T > &domain, Box< dim, T > &sub_domain) | |
Draw Particles. More... | |
Point< dim, T > & | get () |
PointIterator & | operator++ () |
Next point. More... | |
bool | isNext () |
Box< dim, T > | getBoxMargins () |
Return the real Margin of the box. More... | |
Private Member Functions | |
void | calculateAp () |
Static Private Member Functions | |
static grid_key_dx< dim > | getStart (size_t(&gs)[dim], const Box< dim, T > &dom, Box< dim, T > &sub_dom, T(&sp)[dim]) |
static grid_key_dx< dim > | getStop (size_t(&gs)[dim], const Box< dim, T > &dom, Box< dim, T > &sub_dom, T(&sp)[dim]) |
Private Attributes | |
Point< dim, T > | ap |
Actual point. | |
Box< dim, T > | sub_domain |
sub_domain | |
Box< dim, T > | domain |
domain | |
T | sp [dim] |
Spacing. | |
Additional Inherited Members | |
![]() | |
grid_dist_id_iterator_dec < Decomposition > & | operator= (const grid_dist_id_iterator_dec< Decomposition > &tmp) |
Copy operator=. More... | |
grid_dist_id_iterator_dec (const grid_dist_id_iterator_dec< Decomposition > &tmp) | |
Copy constructor. More... | |
grid_dist_id_iterator_dec (Decomposition &dec, const size_t(&sz)[Decomposition::dims]) | |
Constructor of the distributed grid iterator. More... | |
grid_dist_id_iterator_dec (Decomposition &dec, const size_t(&sz)[Decomposition::dims], grid_key_dx< Decomposition::dims > start, grid_key_dx< Decomposition::dims > stop) | |
Constructor of the distributed grid iterator. More... | |
grid_dist_id_iterator_dec < Decomposition > & | operator++ () |
Get the next element. More... | |
bool | isNext () |
Check if there is the next element. More... | |
Decomposition::stype | getSpacing (size_t i) |
Get the spacing of the grid. More... | |
grid_key_dx< Decomposition::dims > | get () |
Get the actual global key of the grid. More... | |
grid_dist_key_dx < Decomposition::dims > | get_dist () |
Get the actual grid key for a distributed grid. More... | |
grid_key_dx< Decomposition::dims > | getStart () |
Get the starting point of the sub-grid we are iterating. More... | |
grid_key_dx< Decomposition::dims > | getStop () |
Get the starting point of the sub-grid we are iterating. More... | |
|
inline |
|
inline |
the actual point
Definition at line 126 of file PointIterator.hpp.
|
inline |
Return the real Margin of the box.
For example consider to have a domain (0.0,0.0) to (1.0,1.0) 11 points in each direction (spacing 0.1). if we have a sub-domain (0.15,0.15) to (0.55,0.55) getBoxMargins return the box (0.2,0.2) to (0.5,0.5). the smallest box that enclose the points that the point iterator is going to give
Definition at line 159 of file PointIterator.hpp.
|
inline |