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. | |
Point< dim, T > & | get () |
PointIterator & | operator++ () |
Next point. | |
bool | isNext () |
Box< dim, T > | getBoxMargins () |
Return the real Margin of the box. | |
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 | |
Protected Member Functions inherited from grid_dist_id_iterator_dec< Decomposition, ghost_or_domain > | |
grid_dist_id_iterator_dec< Decomposition > & | operator= (const grid_dist_id_iterator_dec< Decomposition > &tmp) |
Copy operator=. | |
grid_dist_id_iterator_dec (const grid_dist_id_iterator_dec< Decomposition > &tmp) | |
Copy constructor. | |
grid_dist_id_iterator_dec (Decomposition &dec, const size_t(&sz)[Decomposition::dims]) | |
Constructor of the distributed grid iterator. | |
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. | |
bool | isNextGrid () |
Return true if we point to a valid grid. | |
size_t | getGridId () |
Return the index of the grid in which we are iterating. | |
void | nextGrid () |
next grid | |
Box< Decomposition::dims, size_t > | getGridBox () |
Return the actual pointed grid. | |
grid_dist_id_iterator_dec< Decomposition, ghost_or_domain > & | operator++ () |
Get the next element. | |
bool | isNext () |
Check if there is the next element. | |
Decomposition::stype | getSpacing (size_t i) |
Get the spacing of the grid. | |
grid_key_dx< Decomposition::dims > | get () |
Get the actual global key of the grid. | |
Point< Decomposition::dims, typename Decomposition::stype > | getPoint () |
Return the point coordinates. | |
grid_dist_key_dx< Decomposition::dims > | get_dist () |
Get the actual grid key for a distributed grid. | |
grid_key_dx< Decomposition::dims > | getStart () |
Get the starting point of the sub-grid we are iterating. | |
grid_key_dx< Decomposition::dims > | getStop () |
Get the starting point of the sub-grid we are iterating. | |
|
inline |
|
inlineprivate |
Definition at line 98 of file PointIterator.hpp.
|
inline |
\Return 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.
|
inlinestaticprivate |
Definition at line 72 of file PointIterator.hpp.
|
inlinestaticprivate |
Definition at line 85 of file PointIterator.hpp.
|
inline |
Definition at line 145 of file PointIterator.hpp.
|
inline |
|
private |
Actual point.
Definition at line 61 of file PointIterator.hpp.
|
private |
domain
Definition at line 67 of file PointIterator.hpp.
|
private |
Spacing.
Definition at line 70 of file PointIterator.hpp.
|
private |
sub_domain
Definition at line 64 of file PointIterator.hpp.