OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
PointIteratorSkin< dim, T, Decomposition > Class Template Reference

this class draw particles on subset of grid-like position More...

Detailed Description

template<unsigned int dim, typename T, typename Decomposition>
class PointIteratorSkin< dim, T, Decomposition >

this class draw particles on subset of grid-like position

             (Box B)
                |                    (0.6,0.6)
  +   +   +   + | +   +   +   +   +
    +---+-------+---+
  + | * | +   + | * | +   +   +   +
    |   |       |
  + | * | +   + | * | +   +   +   +
    |   |       |   |
  + | * | +   + | * | +   +   +   +
    |   |       |   |
  + | * | +   + | * | +   +   +   +
    |   |       |   |
  + | * | +   + | * | +   +   +   +
    |   |       |   |
  + | * | +   + | * | +   +   +   +
    |   +-------+   |
  + | *   *   *   * | +   +   +   +
    +---------------+
  +   +   +   +   + | +   +   +   +
(-1.0,-1.0)         |
                    |
                 (Box A)

Suppose we have a grid 9x9 from (-1.0,-1.0 to 0.6,0.6)

Defined a Box A (-0.9,-0.9 to -0.1,0.5) and a box B (-0.7, -0.7 to -0.3,0.5)

This class will return the points indicated with *

Definition at line 54 of file PointIteratorSkin.hpp.

#include <PointIteratorSkin.hpp>

+ Inheritance diagram for PointIteratorSkin< dim, T, Decomposition >:

Public Member Functions

 PointIteratorSkin (Decomposition &dec, size_t(&sz)[dim], const Box< dim, T > &domain, const Box< dim, T > &sub_A, const Box< dim, T > &sub_B, size_t(&bc)[dim])
 Draw Particles.
 
Point< dim, T > & get ()
 
PointIteratorSkinoperator++ ()
 Next point.
 
bool isNext ()
 
PointIteratorSkin< dim, T, Decomposition > & operator= (PointIteratorSkin< dim, T, Decomposition > &p)
 
void addBoxA (const Box< dim, double > &BoxA)
 

Private Member Functions

void calculateAp ()
 
bool isValidPoint ()
 

Static Private Member Functions

static Box< dim, long int > getAB (size_t(&gs)[dim], const Box< dim, T > &dom, const Box< dim, T > &sub_domA, const Box< dim, T > &sub_domB, T(&sp)[dim], size_t AB)
 

Private Attributes

Point< dim, T > ap
 Actual point.
 
openfpm::vector< Box< dim, T > > sub_domainA
 sub_domain (required to filter out points)
 
Box< dim, T > domain
 domain
 
sp [dim]
 Spacing.
 

Additional Inherited Members

- Protected Member Functions inherited from grid_dist_id_iterator_dec_skin< Decomposition >
 grid_dist_id_iterator_dec_skin (const grid_dist_id_iterator_dec_skin< Decomposition > &tmp)
 Copy constructor.
 
 grid_dist_id_iterator_dec_skin (grid_dist_id_iterator_dec_skin< Decomposition > &&tmp)
 Copy constructor.
 
 grid_dist_id_iterator_dec_skin (Decomposition &dec, const grid_sm< Decomposition::dims, void > &g_sm, const Box< Decomposition::dims, size_t > &A, const Box< Decomposition::dims, size_t > &B, const size_t(&bc)[Decomposition::dims])
 Constructor of the distributed grid iterator.
 
 ~grid_dist_id_iterator_dec_skin ()
 Destructor.
 
grid_dist_id_iterator_dec_skin< Decomposition > & 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.
 
grid_dist_key_dx< Decomposition::dims > get_int ()
 Get the actual key.
 
grid_dist_id_iterator_dec_skin< Decomposition > & operator= (const grid_dist_id_iterator_dec_skin< Decomposition > &tmp)
 Copy operator=.
 
grid_dist_id_iterator_dec_skin< Decomposition > & operator= (grid_dist_id_iterator_dec_skin< Decomposition > &&tmp)
 Copy operator=.
 
- Protected Member Functions inherited from grid_skin_iterator_bc< Decomposition::dims >
 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_skin_iterator_bc< dim > & operator++ ()
 Get the next element.
 
bool isNext ()
 Check if there is the next element.
 
grid_key_dx< dim > get () const
 Get the actual key.
 
void reset ()
 Reset the iterator (it restart from the beginning)
 
- Protected Attributes inherited from grid_skin_iterator_bc< Decomposition::dims >
grid_key_dx_iterator_sub_bc< dim > sub_it [2 *dim]
 Internal iterator for each faces.
 

Constructor & Destructor Documentation

◆ PointIteratorSkin()

template<unsigned int dim, typename T , typename Decomposition >
PointIteratorSkin< dim, T, Decomposition >::PointIteratorSkin ( Decomposition dec,
size_t(&)  sz[dim],
const Box< dim, T > &  domain,
const Box< dim, T > &  sub_A,
const Box< dim, T > &  sub_B,
size_t(&)  bc[dim] 
)
inline

Draw Particles.

Parameters
spgrid spacing

Definition at line 139 of file PointIteratorSkin.hpp.

Member Function Documentation

◆ addBoxA()

template<unsigned int dim, typename T , typename Decomposition >
void PointIteratorSkin< dim, T, Decomposition >::addBoxA ( const Box< dim, double > &  BoxA)
inline

Definition at line 203 of file PointIteratorSkin.hpp.

◆ calculateAp()

template<unsigned int dim, typename T , typename Decomposition >
void PointIteratorSkin< dim, T, Decomposition >::calculateAp ( )
inlineprivate

Definition at line 102 of file PointIteratorSkin.hpp.

◆ get()

template<unsigned int dim, typename T , typename Decomposition >
Point< dim, T > & PointIteratorSkin< dim, T, Decomposition >::get ( )
inline

\Return the actual point

Returns
the actual point

Definition at line 158 of file PointIteratorSkin.hpp.

◆ getAB()

template<unsigned int dim, typename T , typename Decomposition >
static Box< dim, long int > PointIteratorSkin< dim, T, Decomposition >::getAB ( size_t(&)  gs[dim],
const Box< dim, T > &  dom,
const Box< dim, T > &  sub_domA,
const Box< dim, T > &  sub_domB,
T(&)  sp[dim],
size_t  AB 
)
inlinestaticprivate

Definition at line 68 of file PointIteratorSkin.hpp.

◆ isNext()

template<unsigned int dim, typename T , typename Decomposition >
bool PointIteratorSkin< dim, T, Decomposition >::isNext ( )
inline

Definition at line 184 of file PointIteratorSkin.hpp.

◆ isValidPoint()

template<unsigned int dim, typename T , typename Decomposition >
bool PointIteratorSkin< dim, T, Decomposition >::isValidPoint ( )
inlineprivate

it check that the actual point is not inside B

Returns
true if the point is not inside B

Definition at line 119 of file PointIteratorSkin.hpp.

◆ operator++()

template<unsigned int dim, typename T , typename Decomposition >
PointIteratorSkin & PointIteratorSkin< dim, T, Decomposition >::operator++ ( )
inline

Next point.

Returns
itself

Definition at line 168 of file PointIteratorSkin.hpp.

◆ operator=()

template<unsigned int dim, typename T , typename Decomposition >
PointIteratorSkin< dim, T, Decomposition > & PointIteratorSkin< dim, T, Decomposition >::operator= ( PointIteratorSkin< dim, T, Decomposition > &  p)
inline

Definition at line 189 of file PointIteratorSkin.hpp.

Field Documentation

◆ ap

template<unsigned int dim, typename T , typename Decomposition >
Point<dim,T> PointIteratorSkin< dim, T, Decomposition >::ap
private

Actual point.

Definition at line 57 of file PointIteratorSkin.hpp.

◆ domain

template<unsigned int dim, typename T , typename Decomposition >
Box<dim,T> PointIteratorSkin< dim, T, Decomposition >::domain
private

domain

Definition at line 63 of file PointIteratorSkin.hpp.

◆ sp

template<unsigned int dim, typename T , typename Decomposition >
T PointIteratorSkin< dim, T, Decomposition >::sp[dim]
private

Spacing.

Definition at line 66 of file PointIteratorSkin.hpp.

◆ sub_domainA

template<unsigned int dim, typename T , typename Decomposition >
openfpm::vector<Box<dim,T> > PointIteratorSkin< dim, T, Decomposition >::sub_domainA
private

sub_domain (required to filter out points)

Definition at line 60 of file PointIteratorSkin.hpp.


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