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

Grid key for a distributed grid. More...

Detailed Description

template<unsigned int dim, typename base_key>
class grid_dist_key_dx< dim, base_key >

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 43 of file grid_dist_key.hpp.

#include <grid_dist_key.hpp>

Public Member Functions

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

Private Attributes

size_t g_c
 grid list counter
 
base_key key
 Local grid iterator.
 

Constructor & Destructor Documentation

◆ grid_dist_key_dx() [1/2]

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

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

Parameters
g_csub-domain
keykey

Definition at line 162 of file grid_dist_key.hpp.

◆ grid_dist_key_dx() [2/2]

template<unsigned int dim, typename base_key >
grid_dist_key_dx< dim, base_key >::grid_dist_key_dx ( )
inline

Constructor.

Definition at line 168 of file grid_dist_key.hpp.

Member Function Documentation

◆ getKey()

template<unsigned int dim, typename base_key >
base_key grid_dist_key_dx< dim, base_key >::getKey ( ) const
inline

Get the key.

Returns
the local key

Definition at line 80 of file grid_dist_key.hpp.

◆ getKeyRef() [1/2]

template<unsigned int dim, typename base_key >
base_key & grid_dist_key_dx< dim, base_key >::getKeyRef ( )
inline

Get the reference key.

Returns
the local key

Definition at line 91 of file grid_dist_key.hpp.

◆ getKeyRef() [2/2]

template<unsigned int dim, typename base_key >
const base_key & grid_dist_key_dx< dim, base_key >::getKeyRef ( ) const
inline

Get the reference key.

Returns
the local key

Definition at line 101 of file grid_dist_key.hpp.

◆ getSub()

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

Get the local grid.

Returns
the id of the local grid

Definition at line 70 of file grid_dist_key.hpp.

◆ move() [1/2]

template<unsigned int dim, typename base_key >
grid_dist_key_dx< dim > grid_dist_key_dx< dim, base_key >::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 148 of file grid_dist_key.hpp.

◆ move() [2/2]

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

Create a new key moving the old one.

Parameters
idimension id
snumber of steps
Returns
new key

Definition at line 132 of file grid_dist_key.hpp.

◆ operator==()

template<unsigned int dim, typename base_key >
bool grid_dist_key_dx< dim, base_key >::operator== ( const grid_dist_key_dx< dim > &  key_t)
inline

Definition at line 114 of file grid_dist_key.hpp.

◆ setSub()

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

Set the local grid.

Parameters
sublocal grid

Definition at line 60 of file grid_dist_key.hpp.

◆ to_string()

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

convert the key to string

Definition at line 174 of file grid_dist_key.hpp.

Field Documentation

◆ g_c

template<unsigned int dim, typename base_key >
size_t grid_dist_key_dx< dim, base_key >::g_c
private

grid list counter

Definition at line 47 of file grid_dist_key.hpp.

◆ key

template<unsigned int dim, typename base_key >
base_key grid_dist_key_dx< dim, base_key >::key
private

Local grid iterator.

Definition at line 51 of file grid_dist_key.hpp.


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