OpenFPM_pdata  1.1.0
Project that contain the implementation of distributed structures
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Pages
grid_dist_key_dx< dim > Class Template Reference

Grid key for a distributed grid. More...

Detailed Description

template<unsigned int dim>
class grid_dist_key_dx< dim >

Grid key for a distributed grid.

It contain from which local sub-domain grid come from, and the local grid_key_dx

Definition at line 11 of file grid_dist_key.hpp.

#include <grid_dist_key.hpp>

Public Member Functions

void setSub (size_t sub)
 Set the local grid. More...
 
size_t getSub () const
 Get the local grid. More...
 
grid_key_dx< dim > getKey () const
 Get the key. More...
 
grid_key_dx< dim > & getKeyRef ()
 Get the reference key. More...
 
bool operator== (const grid_dist_key_dx< dim > &key_t)
 
grid_dist_key_dx< dim > move (size_t i, size_t s) const
 Create a new key moving the old one. More...
 
grid_dist_key_dx< dim > move (const comb< dim > &c) const
 Create a new key moving the old one. More...
 
 grid_dist_key_dx (int g_c, const grid_key_dx< dim > &key)
 Constructor set the sub-domain grid and the position in local coordinates. More...
 
 grid_dist_key_dx ()
 Constructor.
 
std::string to_string ()
 convert the key to string More...
 

Private Attributes

size_t g_c
 grid list counter
 
grid_key_dx< dim > key
 Local grid iterator.
 

Constructor & Destructor Documentation

template<unsigned int dim>
grid_dist_key_dx< dim >::grid_dist_key_dx ( int  g_c,
const grid_key_dx< dim > &  key 
)
inline

Constructor set the sub-domain grid and the position in local coordinates.

Parameters
g_csub-domain
keykey

Definition at line 118 of file grid_dist_key.hpp.

Member Function Documentation

template<unsigned int dim>
grid_key_dx<dim> grid_dist_key_dx< dim >::getKey ( ) const
inline

Get the key.

Returns
the local key

Definition at line 48 of file grid_dist_key.hpp.

template<unsigned int dim>
grid_key_dx<dim>& grid_dist_key_dx< dim >::getKeyRef ( )
inline

Get the reference key.

Returns
the local key

Definition at line 59 of file grid_dist_key.hpp.

template<unsigned int dim>
size_t grid_dist_key_dx< dim >::getSub ( ) const
inline

Get the local grid.

Returns
the id of the local grid

Definition at line 38 of file grid_dist_key.hpp.

template<unsigned int dim>
grid_dist_key_dx<dim> grid_dist_key_dx< dim >::move ( size_t  i,
size_t  s 
) const
inline

Create a new key moving the old one.

Parameters
idimension id
snumber of steps
Returns
new key

Definition at line 90 of file grid_dist_key.hpp.

template<unsigned int dim>
grid_dist_key_dx<dim> grid_dist_key_dx< dim >::move ( const comb< dim > &  c) const
inline

Create a new key moving the old one.

Parameters
cwhere to move for each component
Returns
new key

Definition at line 104 of file grid_dist_key.hpp.

template<unsigned int dim>
void grid_dist_key_dx< dim >::setSub ( size_t  sub)
inline

Set the local grid.

Parameters
sublocal grid

Definition at line 28 of file grid_dist_key.hpp.

template<unsigned int dim>
std::string grid_dist_key_dx< dim >::to_string ( )
inline

convert the key to string

Definition at line 130 of file grid_dist_key.hpp.


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