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

This is a distributed grid. More...

Detailed Description

template<unsigned int dim, typename St, typename T, typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
class grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >

This is a distributed grid.

Implementation of a distributed grid the decomposition is geometrical, grid is splitted across several processor

Parameters
dimDimensionality of the grid
StType of space where the grid is living
Tobject the grid is storing
DecompositionClass that decompose the grid for example CartDecomposition
MemIs the allocator
devicetype of base structure is going to store the data

Create a distributed grid and access it

Synchronize the ghosts and check the information

g_dist.template ghost_get<0>();
// check that the communication is correctly completed
auto domg = g_dist.getDomainGhostIterator();
// check that the grid with the ghost part store the correct information
while (domg.isNext())
{
auto key = domg.get();
auto key_g = g_dist.getGKey(key);
// In this case the boundary condition are non periodic
if (g_dist.isInside(key_g))
{
match &= (g_dist.template get<0>(key) == info.LinId(key_g))?true:false;
if (match == false)
{std::cout << "ERROR IN: " << key_g.to_string() << " " << info.LinId(key_g) << " != " << g_dist.template get<0>(key) << std::endl; break;}
}
++domg;
}
// if (match == false)
// {
g_dist.write("Error_grid");
g_dist.getDecomposition().write("Error_dec");
// }
BOOST_REQUIRE_EQUAL(match,true);

Create and access a distributed grid for complex structures

// grid size
size_t sz[2];
sz[0] = k;
sz[1] = k;
float factor = pow(create_vcluster().getProcessingUnits()/2.0f,1.0f/2.0f);
// Ghost
Ghost<2,float> g(0.01 / factor);
// Distributed grid with id decomposition
// check the consistency of the decomposition
bool val = g_dist.getDecomposition().check_consistency();
BOOST_REQUIRE_EQUAL(val,true);
// Grid sm
grid_sm<2,void> info(sz);
// get the domain iterator
size_t count = 0;
auto dom = g_dist.getDomainIterator();
while (dom.isNext())
{
auto key = dom.get();
auto key_g = g_dist.getGKey(key);
size_t k = info.LinId(key_g);
g_dist.template get<p::x>(key) = 1 + k;
g_dist.template get<p::y>(key) = 567 + k;
g_dist.template get<p::z>(key) = 341 + k;
g_dist.template get<p::s>(key) = 5670 + k;
g_dist.template get<p::v>(key)[0] = 921 + k;
g_dist.template get<p::v>(key)[1] = 5675 + k;
g_dist.template get<p::v>(key)[2] = 117 + k;
g_dist.template get<p::t>(key)[0][0] = 1921 + k;
g_dist.template get<p::t>(key)[0][1] = 25675 + k;
g_dist.template get<p::t>(key)[0][2] = 3117 + k;
g_dist.template get<p::t>(key)[1][0] = 4921 + k;
g_dist.template get<p::t>(key)[1][1] = 55675 + k;
g_dist.template get<p::t>(key)[1][2] = 6117 + k;
g_dist.template get<p::t>(key)[2][0] = 7921 + k;
g_dist.template get<p::t>(key)[2][1] = 85675 + k;
g_dist.template get<p::t>(key)[2][2] = 9117 + k;
// Count the point
count++;
++dom;
}
This is a distributed grid.
Box< dim, St > domain
Domain.
Declaration grid_sm.
Definition grid_sm.hpp:167

Synchronize a distributed grid for complex structures

g_dist.template ghost_get<p::x,p::y,p::z,p::s,p::v,p::t>();
// check that the communication is correctly completed
auto domg = g_dist.getDomainGhostIterator();
// check that the grid with the ghost past store the correct information
while (domg.isNext())
{
auto key = domg.get();
auto key_g = g_dist.getGKey(key);
// In this case the boundary condition are non periodic
if (g_dist.isInside(key_g))
{
size_t k = info.LinId(key_g);
match &= (g_dist.template get<p::x>(key) == 1 + k)?true:false;
match &= (g_dist.template get<p::y>(key) == 567 + k)?true:false;
match &= (g_dist.template get<p::z>(key) == 341 + k)?true:false;
match &= (g_dist.template get<p::s>(key) == 5670 + k)?true:false;
match &= (g_dist.template get<p::v>(key)[0] == 921 + k)?true:false;
match &= (g_dist.template get<p::v>(key)[1] == 5675 + k)?true:false;
match &= (g_dist.template get<p::v>(key)[2] == 117 + k)?true:false;
match &= (g_dist.template get<p::t>(key)[0][0] == 1921 + k)?true:false;
match &= (g_dist.template get<p::t>(key)[0][1] == 25675 + k)?true:false;
match &= (g_dist.template get<p::t>(key)[0][2] == 3117 + k)?true:false;
match &= (g_dist.template get<p::t>(key)[1][0] == 4921 + k)?true:false;
match &= (g_dist.template get<p::t>(key)[1][1] == 55675 + k)?true:false;
match &= (g_dist.template get<p::t>(key)[1][2] == 6117 + k)?true:false;
match &= (g_dist.template get<p::t>(key)[2][0] == 7921 + k)?true:false;
match &= (g_dist.template get<p::t>(key)[2][1] == 85675 + k)?true:false;
match &= (g_dist.template get<p::t>(key)[2][2] == 9117 + k)?true:false;
}
++domg;
}

Usage of a grid dist iterator sub

grid_key_dx<2> one(1,1);
grid_key_dx<2> one_end(k-2,k-2);
bool check = true;
count = 0;
// get the sub-domain iterator
auto dom = g_dist.getSubDomainIterator(one,one_end);
while (dom.isNext())
{
auto key = dom.get();
auto key_g = g_dist.getGKey(key);
// key_g should never be 1 or k-1
check &= (key_g.get(0) == 0 || key_g.get(0) == k-1)?false:true;
check &= (key_g.get(1) == 0 || key_g.get(1) == k-1)?false:true;
g_dist.template get<0>(key) = info.LinId(key_g);
// Count the point
count++;
++dom;
}
BOOST_REQUIRE_EQUAL(check,true);
grid_key_dx is the key to access any element in the grid
Definition grid_key.hpp:19

Construct two grid with the same decomposition

// Distributed grid with id decomposition (It work also without the third template parameter)
// Here is given to show that the 2 grid MUST have the same decomposition strategy
// another grid with the same decomposition
grid_dist_id<3, float, Point_test<float>, CartDecomposition<3,float>> g_dist2(g_dist1.getDecomposition(),sz,g);
This class decompose a space into sub-sub-domains and distribute them across processors.

Definition at line 277 of file grid_dist_id.hpp.

#include <grid_dist_id.hpp>

+ Inheritance diagram for grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >:

Public Types

typedef device_grid d_grid
 Which kind of grid the structure store.
 
typedef Decomposition decomposition
 Decomposition used.
 
typedef T value_type
 value_type
 
typedef St stype
 Type of space.
 
typedef Memory memory_type
 Type of Memory.
 
typedef device_grid device_grid_type
 Type of device grid.
 

Public Member Functions

const Box< dim, St > getDomain () const
 Get the domain where the grid is defined.
 
Point< dim, St > getOffset (size_t i)
 Get the point where it start the origin of the grid of the sub-domain i.
 
St spacing (size_t i) const
 Get the spacing of the grid in direction i.
 
size_t size () const
 Return the total number of points in the grid.
 
void setBackgroundValue (T &bv)
 set the background value
 
template<unsigned int p>
void setBackgroundValue (const typename boost::mpl::at< typename T::type, boost::mpl::int_< p > >::type &bv)
 set the background value
 
size_t size_local_inserted () const
 Return the local total number of points inserted in the grid.
 
size_t size (size_t i) const
 Return the total number of points in the grid.
 
 grid_dist_id (const grid_dist_id< dim, St, T, Decomposition, Memory, device_grid > &g)
 Copy constructor.
 
template<typename H >
 grid_dist_id (const grid_dist_id< dim, St, H, typename Decomposition::base_type, Memory, grid_cpu< dim, H > > &g, const Ghost< dim, long int > &gh, Box< dim, size_t > ext)
 This constructor is special, it construct an expanded grid that perfectly overlap with the previous.
 
template<typename Decomposition2 >
 grid_dist_id (const Decomposition2 &dec, const size_t(&g_sz)[dim], const Ghost< dim, St > &ghost)
 
 grid_dist_id (Decomposition &&dec, const size_t(&g_sz)[dim], const Ghost< dim, St > &ghost)
 
 grid_dist_id (const Decomposition &dec, const size_t(&g_sz)[dim], const Ghost< dim, long int > &g)
 
template<typename Decomposition2 >
 grid_dist_id (const Decomposition2 &dec, const size_t(&g_sz)[dim], const Ghost< dim, long int > &g)
 
 grid_dist_id (Decomposition &&dec, const size_t(&g_sz)[dim], const Ghost< dim, long int > &g)
 
 grid_dist_id (const size_t(&g_sz)[dim], const Box< dim, St > &domain, const Ghost< dim, St > &g, size_t opt=0)
 
 grid_dist_id (const size_t(&g_sz)[dim], const Box< dim, St > &domain, const Ghost< dim, long int > &g, size_t opt=0)
 
 grid_dist_id (const size_t(&g_sz)[dim], const Box< dim, St > &domain, const Ghost< dim, St > &g, const periodicity< dim > &p, size_t opt=0)
 
 grid_dist_id (const size_t(&g_sz)[dim], const Box< dim, St > &domain, const Ghost< dim, long int > &g, const periodicity< dim > &p, size_t opt=0, const grid_sm< dim, void > &g_dec=grid_sm< dim, void >())
 
 grid_dist_id (const size_t(&g_sz)[dim], const Box< dim, St > &domain, const Ghost< dim, long int > &g, const periodicity< dim > &p, openfpm::vector< Box< dim, long int > > &bx_def)
 It construct a grid on the full domain restricted to the set of boxes specified.
 
const grid_sm< dim, T > & getGridInfo () const
 Get an object containing the grid informations.
 
const grid_sm< dim, void > & getGridInfoVoid () const
 Get an object containing the grid informations without type.
 
DecompositiongetDecomposition ()
 Get the object that store the information about the decomposition.
 
const DecompositiongetDecomposition () const
 Get the object that store the information about the decomposition.
 
const CellDecomposer_sm< dim, St, shift< dim, St > > & getCellDecomposer () const
 Return the cell decomposer.
 
bool isInside (const grid_key_dx< dim > &gk) const
 Check that the global grid key is inside the grid domain.
 
size_t getLocalDomainSize () const
 Get the total number of grid points for the calling processor.
 
size_t getLocalDomainWithGhostSize () const
 Get the total number of grid points with ghost for the calling processor.
 
const openfpm::vector< GBoxes< device_grid::dims > > & getLocalGridsInfo () const
 It return the informations about the local grids.
 
void getGlobalGridsInfo (openfpm::vector< GBoxes< device_grid::dims > > &gdb_ext_global) const
 It gathers the information about local grids for all of the processors.
 
grid_dist_iterator< dim, device_grid, decltype(device_grid::type_of_subiterator()), FREE > getOldDomainIterator () const
 It return an iterator that span the full grid domain (each processor span its local domain)
 
grid_dist_id_iterator_dec< DecompositiongetGridIterator (const grid_key_dx< dim > &start, const grid_key_dx< dim > &stop)
 
grid_dist_id_iterator_dec< Decomposition, true > getGridGhostIterator (const grid_key_dx< dim > &start, const grid_key_dx< dim > &stop)
 
grid_dist_id_iterator_dec< DecompositiongetGridIterator ()
 
grid_dist_iterator< dim, device_grid, decltype(device_grid::type_of_subiterator()), FREE > getDomainIterator () const
 It return an iterator that span the full grid domain (each processor span its local domain)
 
template<unsigned int Np>
grid_dist_iterator< dim, device_grid, decltype(device_grid::template type_of_subiterator< stencil_offset_compute< dim, Np > >()), FREE, stencil_offset_compute< dim, Np > > getDomainIteratorStencil (const grid_key_dx< dim >(&stencil_pnt)[Np]) const
 It return an iterator that span the full grid domain (each processor span its local domain)
 
grid_dist_iterator< dim, device_grid, decltype(device_grid::type_of_iterator()), FIXED > getDomainGhostIterator () const
 It return an iterator that span the grid domain + ghost part.
 
grid_dist_iterator_sub< dim, device_gridgetSubDomainIterator (const grid_key_dx< dim > &start, const grid_key_dx< dim > &stop) const
 It return an iterator that span the grid domain only in the specified part.
 
grid_dist_iterator_sub< dim, device_gridgetSubDomainIterator (const long int(&start)[dim], const long int(&stop)[dim]) const
 It return an iterator that span the grid domain only in the specified part.
 
 ~grid_dist_id ()
 Destructor.
 
VclustergetVC ()
 Get the Virtual Cluster machine.
 
void removeUnusedBuffers ()
 Eliminate many internal temporary buffer you can use this between flushes if you get some out of memory.
 
bool is_staggered () const
 Indicate that this grid is not staggered.
 
template<typename bg_key >
void remove (const grid_dist_key_dx< dim, bg_key > &v1)
 remove an element in the grid
 
template<typename bg_key >
void remove_no_flush (const grid_dist_key_dx< dim, bg_key > &v1)
 remove an element in the grid
 
template<typename ... v_reduce>
void flush (flush_type opt=flush_type::FLUSH_ON_HOST)
 
void flush_remove ()
 remove an element in the grid
 
template<unsigned int p, typename bg_key >
auto insert (const grid_dist_key_dx< dim, bg_key > &v1) -> decltype(loc_grid.get(v1.getSub()).template insert< p >(v1.getKey()))
 insert an element in the grid
 
template<unsigned int p, typename bg_key >
auto insertFlush (const grid_dist_key_dx< dim, bg_key > &v1) -> decltype(loc_grid.get(v1.getSub()).template insertFlush< p >(v1.getKey()))
 insert an element in the grid
 
template<typename bg_key >
auto insertFlush (const grid_dist_key_dx< dim, bg_key > &v1) -> decltype(loc_grid.get(v1.getSub()).template insertFlush(v1.getKey()))
 insert an element in the grid
 
template<unsigned int p, typename bg_key >
auto get (const grid_dist_key_dx< dim, bg_key > &v1) const -> typename std::add_lvalue_reference< decltype(loc_grid.get(v1.getSub()).template get< p >(v1.getKey()))>::type
 Get the reference of the selected element.
 
template<unsigned int p, typename bg_key >
auto get (const grid_dist_key_dx< dim, bg_key > &v1) -> decltype(loc_grid.get(v1.getSub()).template get< p >(v1.getKey()))
 Get the reference of the selected element.
 
template<unsigned int p = 0>
auto get (const grid_dist_g_dx< device_grid > &v1) const -> decltype(v1.getSub() ->template get< p >(v1.getKey()))
 Get the reference of the selected element.
 
template<unsigned int p = 0>
auto get (const grid_dist_g_dx< device_grid > &v1) -> decltype(v1.getSub() ->template get< p >(v1.getKey()))
 Get the reference of the selected element.
 
template<unsigned int p = 0>
auto get (const grid_dist_lin_dx &v1) const -> decltype(loc_grid.get(v1.getSub()).template get< p >(v1.getKey()))
 Get the reference of the selected element.
 
template<unsigned int p = 0>
auto get (const grid_dist_lin_dx &v1) -> decltype(loc_grid.get(v1.getSub()).template get< p >(v1.getKey()))
 Get the reference of the selected element.
 
template<typename bg_key >
Point< dim, St > getPos (const grid_dist_key_dx< dim, bg_key > &v1)
 Get the reference of the selected element.
 
template<typename bg_key >
bool existPoint (const grid_dist_key_dx< dim, bg_key > &v1) const
 Check if the point exist.
 
template<unsigned int p = 0, typename bgkey >
auto getProp (const grid_dist_key_dx< dim, bgkey > &v1) const -> decltype(this->template get< p >(v1))
 Get the reference of the selected element.
 
template<unsigned int p = 0, typename bgkey >
auto getProp (const grid_dist_key_dx< dim, bgkey > &v1) -> decltype(this->template get< p >(v1))
 Get the reference of the selected element.
 
template<int... prp>
void ghost_get (size_t opt=0)
 It synchronize the ghost parts.
 
template<template< typename, typename > class op, int... prp>
void ghost_put ()
 It synchronize the ghost parts.
 
grid_dist_id< dim, St, T, Decomposition, Memory, device_grid > & copy (grid_dist_id< dim, St, T, Decomposition, Memory, device_grid > &g, bool use_memcpy=true)
 Copy the give grid into this grid.
 
grid_dist_id< dim, St, T, Decomposition, Memory, device_grid > & copy_sparse (grid_dist_id< dim, St, T, Decomposition, Memory, device_grid > &g, bool use_memcpy=true)
 Copy the give grid into this grid.
 
Point< dim, St > getSpacing ()
 Get the spacing on each dimension.
 
grid_key_dx< dim > getGKey (const grid_dist_key_dx< dim > &k) const
 Convert a g_dist_key_dx into a global key.
 
template<typename Model >
void addComputationCosts (Model md=Model(), size_t ts=1)
 Add the computation cost on the decomposition using a resolution function.
 
template<unsigned int prop_src, unsigned int prop_dst, unsigned int stencil_size, unsigned int N, typename lambda_f , typename ... ArgsT>
void conv (int(&stencil)[N][dim], grid_key_dx< 3 > start, grid_key_dx< 3 > stop, lambda_f func, ArgsT ... args)
 apply a convolution using the stencil N
 
template<unsigned int prop_src, unsigned int prop_dst, unsigned int stencil_size, typename lambda_f , typename ... ArgsT>
void conv_cross (grid_key_dx< 3 > start, grid_key_dx< 3 > stop, lambda_f func, ArgsT ... args)
 apply a convolution using the stencil N
 
template<unsigned int prop_src, unsigned int prop_dst, unsigned int stencil_size, typename lambda_f , typename ... ArgsT>
void conv_cross_b (grid_key_dx< 3 > start, grid_key_dx< 3 > stop, lambda_f func, ArgsT ... args)
 apply a convolution using the stencil N
 
template<unsigned int stencil_size, typename v_type , typename lambda_f , typename ... ArgsT>
void conv_cross_ids (grid_key_dx< 3 > start, grid_key_dx< 3 > stop, lambda_f func, ArgsT ... args)
 apply a convolution using the stencil N
 
template<unsigned int prop_src1, unsigned int prop_src2, unsigned int prop_dst1, unsigned int prop_dst2, unsigned int stencil_size, unsigned int N, typename lambda_f , typename ... ArgsT>
void conv2 (int(&stencil)[N][dim], grid_key_dx< dim > start, grid_key_dx< dim > stop, lambda_f func, ArgsT ... args)
 apply a convolution using the stencil N
 
template<unsigned int prop_src1, unsigned int prop_src2, unsigned int prop_dst1, unsigned int prop_dst2, unsigned int stencil_size, typename lambda_f , typename ... ArgsT>
void conv2 (grid_key_dx< dim > start, grid_key_dx< dim > stop, lambda_f func, ArgsT ... args)
 apply a convolution on 2 property on GPU
 
template<unsigned int prop_src1, unsigned int prop_dst1, unsigned int stencil_size, typename lambda_f , typename ... ArgsT>
void conv (grid_key_dx< dim > start, grid_key_dx< dim > stop, lambda_f func, ArgsT ... args)
 apply a convolution on GPU
 
template<unsigned int prop_src1, unsigned int prop_src2, unsigned int prop_dst1, unsigned int prop_dst2, unsigned int stencil_size, typename lambda_f , typename ... ArgsT>
void conv2_b (grid_key_dx< dim > start, grid_key_dx< dim > stop, lambda_f func, ArgsT ... args)
 apply a convolution on 2 property on GPU
 
template<unsigned int prop_src1, unsigned int prop_src2, unsigned int prop_src3, unsigned int prop_dst1, unsigned int prop_dst2, unsigned int prop_dst3, unsigned int stencil_size, typename lambda_f , typename ... ArgsT>
void conv3_b (grid_key_dx< dim > start, grid_key_dx< dim > stop, lambda_f func, ArgsT ... args)
 apply a convolution on 2 property on GPU
 
template<typename NNtype >
void findNeighbours ()
 
template<unsigned int prop_src1, unsigned int prop_src2, unsigned int prop_dst1, unsigned int prop_dst2, unsigned int stencil_size, typename lambda_f , typename ... ArgsT>
void conv_cross2 (grid_key_dx< 3 > start, grid_key_dx< 3 > stop, lambda_f func, ArgsT ... args)
 apply a convolution using the stencil N
 
bool write (std::string output, size_t opt=VTK_WRITER|FORMAT_BINARY)
 Write the distributed grid information.
 
bool write_debug (std::string output)
 Write all grids indigually.
 
bool write_frame (std::string output, size_t i, size_t opt=VTK_WRITER|FORMAT_ASCII)
 Write the distributed grid information.
 
device_gridget_loc_grid (size_t i)
 Get the i sub-domain grid.
 
const device_gridget_loc_grid (size_t i) const
 Get the i sub-domain grid.
 
grid_key_dx_iterator_sub< dim, no_stencilget_loc_grid_iterator (size_t i)
 Get the i sub-domain grid.
 
template<unsigned int Np>
grid_key_dx_iterator_sub< dim, stencil_offset_compute< dim, Np >, typename device_grid::linearizer_type > get_loc_grid_iterator_stencil (size_t i, const grid_key_dx< dim >(&stencil_pnt)[Np])
 Get the i sub-domain grid.
 
size_t getN_loc_grid () const
 Return the number of local grid.
 
long int who ()
 It return the id of structure in the allocation list.
 
void debugPrint ()
 It print the internal ghost boxes and external ghost boxes in global unit.
 
void setPropNames (const openfpm::vector< std::string > &names)
 Set the properties names.
 
const openfpm::vector< std::string > & getPropNames ()
 Set the properties names.
 
void clear ()
 It delete all the points.
 
void construct_link (self &grid_up, self &grid_dw)
 construct link between levels
 
void construct_link_dw (self &grid_dw, openfpm::vector< offset_mv< dim > > &mvof)
 construct link between current and the level down
 
void construct_link_up (self &grid_up, openfpm::vector< offset_mv< dim > > &mvof)
 construct link between current and the level up
 
template<typename stencil_type >
void tagBoundaries ()
 construct link between current and the level up
 
void map (size_t opt=0)
 It move all the grid parts that do not belong to the local processor to the respective processor.
 
void save (const std::string &filename) const
 Save the grid state on HDF5.
 
void load (const std::string &filename)
 Reload the grid from HDF5 file.
 
const openfpm::vector< i_lbox_grid< dim > > & get_loc_ig_box ()
 Get the internal local ghost box.
 
const openfpm::vector< i_lbox_grid< dim > > & get_ig_box ()
 Get the internal ghost box.
 
void print_stats ()
 
void clear_stats ()
 
- Public Member Functions inherited from grid_dist_id_comm< dim, St, T, Decomposition, Memory, device_grid >
void grids_reconstruct (openfpm::vector< openfpm::vector< aggregate< device_grid, SpaceBox< dim, long int > > > > &m_oGrid_recv, openfpm::vector< device_grid > &loc_grid, openfpm::vector< GBoxes< device_grid::dims > > &gdb_ext, CellDecomposer_sm< dim, St, shift< dim, St > > &cd_sm)
 Reconstruct the local grids.
 
template<typename lambda_t >
void labelIntersectionGridsProcessor_and_pack (Decomposition &dec, CellDecomposer_sm< dim, St, shift< dim, St > > &cd_sm, openfpm::vector< device_grid > &loc_grid_old, openfpm::vector< GBoxes< device_grid::dims > > &gdb_ext, openfpm::vector< GBoxes< device_grid::dims > > &gdb_ext_old, openfpm::vector< GBoxes< device_grid::dims > > &gdb_ext_global, size_t p_id_cur, lambda_t f)
 Label intersection grids for mappings.
 
template<int ... prp>
void unpack_buffer_to_local_grid (openfpm::vector< device_grid > &loc_grid, openfpm::vector< GBoxes< device_grid::dims > > &gdb_ext, ExtPreAlloc< Memory > &send_buffer, size_t sz)
 Unpack.
 
template<int ... prp>
void map_ (Decomposition &dec, CellDecomposer_sm< dim, St, shift< dim, St > > &cd_sm, openfpm::vector< device_grid > &loc_grid, openfpm::vector< device_grid > &loc_grid_old, openfpm::vector< GBoxes< device_grid::dims > > &gdb_ext, openfpm::vector< GBoxes< device_grid::dims > > &gdb_ext_old, openfpm::vector< GBoxes< device_grid::dims > > &gdb_ext_global, size_t opt)
 Moves all the grids that does not belong to the local processor to the respective processor.
 
template<int... prp>
void ghost_get_ (const openfpm::vector< ip_box_grid< dim > > &ig_box, const openfpm::vector< ep_box_grid< dim > > &eg_box, const openfpm::vector< i_lbox_grid< dim > > &loc_ig_box, const openfpm::vector< e_lbox_grid< dim > > &loc_eg_box, const openfpm::vector< GBoxes< device_grid::dims > > &gdb_ext, const openfpm::vector< e_box_multi< dim > > &eb_gid_list, bool use_bx_def, openfpm::vector< device_grid > &loc_grid, const grid_sm< dim, void > &ginfo, std::unordered_map< size_t, size_t > &g_id_to_external_ghost_box, size_t opt)
 It fill the ghost part of the grids.
 
template<template< typename, typename > class op, int... prp>
void ghost_put_ (Decomposition &dec, const openfpm::vector< ip_box_grid< dim > > &ig_box, const openfpm::vector< ep_box_grid< dim > > &eg_box, const openfpm::vector< i_lbox_grid< dim > > &loc_ig_box, const openfpm::vector< e_lbox_grid< dim > > &loc_eg_box, const openfpm::vector< GBoxes< device_grid::dims > > &gdb_ext, openfpm::vector< device_grid > &loc_grid, openfpm::vector< std::unordered_map< size_t, size_t > > &g_id_to_internal_ghost_box)
 It merge the information in the ghost with the real information.
 
 grid_dist_id_comm ()
 Constructor.
 
 grid_dist_id_comm (const grid_dist_id_comm< dim, St, T, Decomposition, Memory, device_grid > &gc)
 Copy constructor.
 

Static Public Member Functions

template<typename stencil = no_stencil>
static grid_dist_iterator_sub< dim, device_gridtype_of_subiterator ()
 This is a meta-function return which type of sub iterator a grid produce.
 

Static Public Attributes

static const unsigned int dims = dim
 Number of dimensions.
 

Protected Member Functions

Box< dim, size_t > getDomain (size_t i)
 Given a local sub-domain i with a local grid Domain + ghost return the part of the local grid that is domain.
 
void setDecompositionGranularity (size_t n_sub)
 Set the minimum number of sub-domain per processor.
 
void reset_ghost_structures ()
 

Static Protected Member Functions

static Ghost< dim, St > convert_ghost (const Ghost< dim, long int > &gd, const CellDecomposer_sm< dim, St, shift< dim, St > > &cd_sm)
 Convert a ghost from grid point units into continus space.
 

Private Types

typedef grid_dist_id< dim, St, T, Decomposition, Memory, device_gridself
 

Private Member Functions

void set_for_adjustment (size_t sub_id, const Box< dim, St > &sub_domain_other, const comb< dim > &cmb, Box< dim, long int > &ib, Ghost< dim, long int > &g)
 this function is for optimization of the ghost size
 
void create_ig_box ()
 Create per-processor internal ghost boxes list in grid units and g_id_to_external_ghost_box.
 
void create_eg_box ()
 Create per-processor internal ghost box list in grid units.
 
void create_local_ig_box ()
 Create local internal ghost box in grid units.
 
void create_local_eg_box ()
 Create per-processor external ghost boxes list in grid units.
 
void check_size (const size_t(&g_sz)[dim])
 Check the grid has a valid size.
 
void check_domain (const Box< dim, St > &dom)
 Check the domain is valid.
 
void Create (openfpm::vector< Box< dim, long int > > &bx_def, const Ghost< dim, long int > &g, bool use_bx_def)
 Create the grids on memory.
 
void InitializeCellDecomposer (const CellDecomposer_sm< dim, St, shift< dim, St > > &cd_old, const Box< dim, size_t > &ext)
 Initialize the Cell decomposer of the grid enforcing perfect overlap of the cells.
 
void InitializeCellDecomposer (const size_t(&g_sz)[dim], const size_t(&bc)[dim])
 Initialize the Cell decomposer of the grid.
 
void InitializeDecomposition (const size_t(&g_sz)[dim], const size_t(&bc)[dim], const grid_sm< dim, void > &g_dist=grid_sm< dim, void >())
 Initialize the grid.
 
void InitializeStructures (const size_t(&g_sz)[dim])
 Initialize the grid.
 
void InitializeStructures (const size_t(&g_sz)[dim], openfpm::vector< Box< dim, long int > > &bx, const Ghost< dim, long int > &g, bool use_bx_def)
 Initialize the grid.
 

Static Private Member Functions

static void * msg_alloc_external_box (size_t msg_i, size_t total_msg, size_t total_p, size_t i, size_t ri, void *ptr)
 Call-back to allocate buffer to receive incoming objects (external ghost boxes)
 

Private Attributes

Box< dim, St > domain
 Domain.
 
Ghost< dim, St > ghost
 Ghost expansion.
 
Ghost< dim, long int > ghost_int
 Ghost expansion.
 
openfpm::vector< device_gridloc_grid
 Local grids.
 
openfpm::vector< device_gridloc_grid_old
 Old local grids.
 
Decomposition dec
 Space Decomposition.
 
openfpm::vector< size_t > gdb_ext_markers
 
openfpm::vector< GBoxes< device_grid::dims > > gdb_ext
 Extension of each grid: Domain and ghost + domain.
 
openfpm::vector< GBoxes< device_grid::dims > > gdb_ext_global
 Global gdb_ext.
 
openfpm::vector< GBoxes< device_grid::dims > > gdb_ext_old
 Extension of each old grid (old): Domain and ghost + domain.
 
size_t g_sz [dim]
 Size of the grid on each dimension.
 
CellDecomposer_sm< dim, St, shift< dim, St > > cd_sm
 Structure that divide the space into cells.
 
size_t gpu_n_insert_thread
 number of insert each GPU thread does
 
Vclusterv_cl
 Communicator class.
 
openfpm::vector< std::string > prp_names
 properties names
 
std::unordered_map< size_t, size_t > g_id_to_external_ghost_box
 
openfpm::vector< e_box_multi< dim > > eb_gid_list
 
openfpm::vector< std::unordered_map< size_t, size_t > > g_id_to_internal_ghost_box
 
openfpm::vector< size_t > recv_sz
 Receiving size.
 
openfpm::vector< HeapMemoryrecv_mem_gg
 Receiving buffer for particles ghost get.
 
grid_sm< dim, T > ginfo
 Grid informations object.
 
grid_sm< dim, void > ginfo_v
 Grid informations object without type.
 
openfpm::vector< Box< dim, long int > > bx_def
 Set of boxes that define where the grid is defined.
 
bool use_bx_def = false
 Indicate if we have to use bx_def to define the grid.
 
bool init_local_i_g_box = false
 Indicate if the local internal ghost box has been initialized.
 
bool init_local_e_g_box = false
 Indicate if the local external ghost box has been initialized.
 
bool init_e_g_box = false
 Flag that indicate if the external ghost box has been initialized.
 
bool init_i_g_box = false
 Flag that indicate if the internal ghost box has been initialized.
 
bool init_fix_ie_g_box = false
 Flag that indicate if the internal and external ghost box has been fixed.
 
openfpm::vector< ip_box_grid< dim > > ig_box
 Internal ghost boxes in grid units.
 
openfpm::vector< ep_box_grid< dim > > eg_box
 External ghost boxes in grid units.
 
openfpm::vector< i_lbox_grid< dim > > loc_ig_box
 Local internal ghost boxes in grid units.
 
openfpm::vector< e_lbox_grid< dim > > loc_eg_box
 Local external ghost boxes in grid units.
 
size_t v_sub_unit_factor = 64
 Number of sub-sub-domain for each processor.
 
Ghost< dim, long int > gint = Ghost<dim,long int>(0)
 

Member Typedef Documentation

◆ d_grid

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
typedef device_grid grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::d_grid

Which kind of grid the structure store.

Definition at line 1280 of file grid_dist_id.hpp.

◆ decomposition

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
typedef Decomposition grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::decomposition

Decomposition used.

Definition at line 1283 of file grid_dist_id.hpp.

◆ device_grid_type

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
typedef device_grid grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::device_grid_type

Type of device grid.

Definition at line 1295 of file grid_dist_id.hpp.

◆ memory_type

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
typedef Memory grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::memory_type

Type of Memory.

Definition at line 1292 of file grid_dist_id.hpp.

◆ self

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
typedef grid_dist_id<dim,St,T,Decomposition,Memory,device_grid> grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::self
private

Definition at line 279 of file grid_dist_id.hpp.

◆ stype

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
typedef St grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::stype

Type of space.

Definition at line 1289 of file grid_dist_id.hpp.

◆ value_type

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
typedef T grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::value_type

value_type

Definition at line 1286 of file grid_dist_id.hpp.

Constructor & Destructor Documentation

◆ grid_dist_id() [1/12]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::grid_dist_id ( const grid_dist_id< dim, St, T, Decomposition, Memory, device_grid > &  g)
inline

Copy constructor.

Parameters
ggrid to copy

Definition at line 1404 of file grid_dist_id.hpp.

◆ grid_dist_id() [2/12]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<typename H >
grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::grid_dist_id ( const grid_dist_id< dim, St, H, typename Decomposition::base_type, Memory, grid_cpu< dim, H > > &  g,
const Ghost< dim, long int > &  gh,
Box< dim, size_t >  ext 
)
inline

This constructor is special, it construct an expanded grid that perfectly overlap with the previous.

The key-word here is "perfectly overlap". Using the default constructor you could create something similar, but because of rounding-off error it can happen that it is not perfectly overlapping

Parameters
gprevious grid
ghGhost part in grid units
extextension of the grid (must be positive on every direction)

Definition at line 1445 of file grid_dist_id.hpp.

◆ grid_dist_id() [3/12]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<typename Decomposition2 >
grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::grid_dist_id ( const Decomposition2 &  dec,
const size_t(&)  g_sz[dim],
const Ghost< dim, St > &  ghost 
)
inline

It constructs a grid of a specified size, defined on a specified Box space, forcing to follow a specified decomposition and with a specified ghost size

Parameters
decDecomposition
g_szgrid size on each dimension
ghostGhost part

Definition at line 1499 of file grid_dist_id.hpp.

◆ grid_dist_id() [4/12]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::grid_dist_id ( Decomposition &&  dec,
const size_t(&)  g_sz[dim],
const Ghost< dim, St > &  ghost 
)
inline

It constructs a grid of a specified size, defined on a specified Box space, forcing to follow a specified decomposition and with a specified ghost size

Parameters
decDecomposition
g_szgrid size on each dimension
ghostGhost part

Definition at line 1523 of file grid_dist_id.hpp.

◆ grid_dist_id() [5/12]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::grid_dist_id ( const Decomposition dec,
const size_t(&)  g_sz[dim],
const Ghost< dim, long int > &  g 
)
inline

It constructs a grid of a specified size, defined on a specified Box space, forcing to follow a specified decomposition, and having a specified ghost size

Parameters
decDecomposition
g_szgrid size on each dimension
gGhost part (given in grid units)
Warning
In very rare case the ghost part can be one point bigger than the one specified

Definition at line 1548 of file grid_dist_id.hpp.

◆ grid_dist_id() [6/12]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<typename Decomposition2 >
grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::grid_dist_id ( const Decomposition2 &  dec,
const size_t(&)  g_sz[dim],
const Ghost< dim, long int > &  g 
)
inline

It constructs a grid of a specified size, defined on a specified Box space, forcing to follow a specified decomposition, and having a specified ghost size

Parameters
decDecomposition
g_szgrid size on each dimension
gGhost part (given in grid units)
Warning
In very rare case the ghost part can be one point bigger than the one specified

Definition at line 1575 of file grid_dist_id.hpp.

◆ grid_dist_id() [7/12]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::grid_dist_id ( Decomposition &&  dec,
const size_t(&)  g_sz[dim],
const Ghost< dim, long int > &  g 
)
inline

It construct a grid of a specified size, defined on a specified Box space, forcing to follow a specified decomposition, and having a specified ghost size

Parameters
decDecomposition
g_szgrid size on each dimension
gGhost part (given in grid units)
Warning
In very rare case the ghost part can be one point bigger than the one specified

Definition at line 1601 of file grid_dist_id.hpp.

◆ grid_dist_id() [8/12]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::grid_dist_id ( const size_t(&)  g_sz[dim],
const Box< dim, St > &  domain,
const Ghost< dim, St > &  g,
size_t  opt = 0 
)
inline

It construct a grid of a specified size, defined on a specified Box space, and having a specified ghost size

Parameters
g_szgrid size on each dimension
domainBox that contain the grid
gGhost part (given in grid units)
Warning
In very rare case the ghost part can be one point bigger than the one specified

Definition at line 1630 of file grid_dist_id.hpp.

◆ grid_dist_id() [9/12]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::grid_dist_id ( const size_t(&)  g_sz[dim],
const Box< dim, St > &  domain,
const Ghost< dim, long int > &  g,
size_t  opt = 0 
)
inline

It construct a grid of a specified size, defined on a specified Box space, having a specified ghost size and periodicity

Parameters
g_szgrid size on each dimension
domainBox that contain the grid
gGhost part of the domain (given in grid units)
Warning
In very rare case the ghost part can be one point bigger than the one specified

Definition at line 1644 of file grid_dist_id.hpp.

◆ grid_dist_id() [10/12]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::grid_dist_id ( const size_t(&)  g_sz[dim],
const Box< dim, St > &  domain,
const Ghost< dim, St > &  g,
const periodicity< dim > &  p,
size_t  opt = 0 
)
inline

It construct a grid of a specified size, defined on a specified Box space, having a specified ghost size, and specified periodicity

Parameters
g_szgrid size on each dimension
domainBox that contain the grid
gGhost part (given in grid units)
pBoundary conditions
Warning
In very rare case the ghost part can be one point bigger than the one specified

Definition at line 1659 of file grid_dist_id.hpp.

◆ grid_dist_id() [11/12]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::grid_dist_id ( const size_t(&)  g_sz[dim],
const Box< dim, St > &  domain,
const Ghost< dim, long int > &  g,
const periodicity< dim > &  p,
size_t  opt = 0,
const grid_sm< dim, void > &  g_dec = grid_sm<dim,void>() 
)
inline

It construct a grid of a specified size, defined on a specified Box space, having a specified ghost size and periodicity

Parameters
g_szgrid size on each dimension
domainBox that contain the grid
gGhost part of the domain (given in grid units)
pperiodicity
Warning
In very rare case the ghost part can be one point bigger than the one specified

Definition at line 1686 of file grid_dist_id.hpp.

◆ grid_dist_id() [12/12]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::grid_dist_id ( const size_t(&)  g_sz[dim],
const Box< dim, St > &  domain,
const Ghost< dim, long int > &  g,
const periodicity< dim > &  p,
openfpm::vector< Box< dim, long int > > &  bx_def 
)
inline

It construct a grid on the full domain restricted to the set of boxes specified.

In particular the grid is defined in the space equal to the domain intersected the boxes defined by bx

Parameters
g_szgrid size on each dimension
domainwhere the grid is constructed
gghost size
pperiodicity of the grid
bxset of boxes where the grid is defined

Definition at line 1725 of file grid_dist_id.hpp.

◆ ~grid_dist_id()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::~grid_dist_id ( )
inline

Destructor.

Definition at line 2235 of file grid_dist_id.hpp.

Member Function Documentation

◆ addComputationCosts()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<typename Model >
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::addComputationCosts ( Model  md = Model(),
size_t  ts = 1 
)
inline

Add the computation cost on the decomposition using a resolution function.

Parameters
mdModel to use
tsIt is an optional parameter approximately should be the number of ghost get between two rebalancing at first decomposition this number can be ignored (default = 1) because not used

Definition at line 2789 of file grid_dist_id.hpp.

◆ check_domain()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::check_domain ( const Box< dim, St > &  dom)
inlineprivate

Check the domain is valid.

Parameters
domdomain is valid

Definition at line 1057 of file grid_dist_id.hpp.

◆ check_size()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::check_size ( const size_t(&)  g_sz[dim])
inlineprivate

Check the grid has a valid size.

Parameters
g_szsize of the grid

Definition at line 1043 of file grid_dist_id.hpp.

◆ clear()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::clear ( )
inline

It delete all the points.

This function on dense does nothing in case of dense grid but in case of sparse_grid it kills all the points

Definition at line 3362 of file grid_dist_id.hpp.

◆ clear_stats()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::clear_stats ( )
inline

Definition at line 3591 of file grid_dist_id.hpp.

◆ construct_link()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::construct_link ( self grid_up,
self grid_dw 
)
inline

construct link between levels

\praram grid_up grid level up

Parameters
grid_dwgrid level down

Definition at line 3374 of file grid_dist_id.hpp.

◆ construct_link_dw()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::construct_link_dw ( self grid_dw,
openfpm::vector< offset_mv< dim > > &  mvof 
)
inline

construct link between current and the level down

Parameters
grid_dwgrid level down

Definition at line 3388 of file grid_dist_id.hpp.

◆ construct_link_up()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::construct_link_up ( self grid_up,
openfpm::vector< offset_mv< dim > > &  mvof 
)
inline

construct link between current and the level up

Parameters
grid_dwgrid level down

Definition at line 3406 of file grid_dist_id.hpp.

◆ conv() [1/2]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<unsigned int prop_src1, unsigned int prop_dst1, unsigned int stencil_size, typename lambda_f , typename ... ArgsT>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::conv ( grid_key_dx< dim >  start,
grid_key_dx< dim >  stop,
lambda_f  func,
ArgsT ...  args 
)
inline

apply a convolution on GPU

Definition at line 2991 of file grid_dist_id.hpp.

◆ conv() [2/2]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<unsigned int prop_src, unsigned int prop_dst, unsigned int stencil_size, unsigned int N, typename lambda_f , typename ... ArgsT>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::conv ( int(&)  stencil[N][dim],
grid_key_dx< 3 >  start,
grid_key_dx< 3 >  stop,
lambda_f  func,
ArgsT ...  args 
)
inline

apply a convolution using the stencil N

Definition at line 2817 of file grid_dist_id.hpp.

◆ conv2() [1/2]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<unsigned int prop_src1, unsigned int prop_src2, unsigned int prop_dst1, unsigned int prop_dst2, unsigned int stencil_size, typename lambda_f , typename ... ArgsT>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::conv2 ( grid_key_dx< dim >  start,
grid_key_dx< dim >  stop,
lambda_f  func,
ArgsT ...  args 
)
inline

apply a convolution on 2 property on GPU

Definition at line 2962 of file grid_dist_id.hpp.

◆ conv2() [2/2]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<unsigned int prop_src1, unsigned int prop_src2, unsigned int prop_dst1, unsigned int prop_dst2, unsigned int stencil_size, unsigned int N, typename lambda_f , typename ... ArgsT>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::conv2 ( int(&)  stencil[N][dim],
grid_key_dx< dim >  start,
grid_key_dx< dim >  stop,
lambda_f  func,
ArgsT ...  args 
)
inline

apply a convolution using the stencil N

Definition at line 2933 of file grid_dist_id.hpp.

◆ conv2_b()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<unsigned int prop_src1, unsigned int prop_src2, unsigned int prop_dst1, unsigned int prop_dst2, unsigned int stencil_size, typename lambda_f , typename ... ArgsT>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::conv2_b ( grid_key_dx< dim >  start,
grid_key_dx< dim >  stop,
lambda_f  func,
ArgsT ...  args 
)
inline

apply a convolution on 2 property on GPU

Definition at line 3020 of file grid_dist_id.hpp.

◆ conv3_b()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<unsigned int prop_src1, unsigned int prop_src2, unsigned int prop_src3, unsigned int prop_dst1, unsigned int prop_dst2, unsigned int prop_dst3, unsigned int stencil_size, typename lambda_f , typename ... ArgsT>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::conv3_b ( grid_key_dx< dim >  start,
grid_key_dx< dim >  stop,
lambda_f  func,
ArgsT ...  args 
)
inline

apply a convolution on 2 property on GPU

Definition at line 3051 of file grid_dist_id.hpp.

◆ conv_cross()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<unsigned int prop_src, unsigned int prop_dst, unsigned int stencil_size, typename lambda_f , typename ... ArgsT>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::conv_cross ( grid_key_dx< 3 >  start,
grid_key_dx< 3 >  stop,
lambda_f  func,
ArgsT ...  args 
)
inline

apply a convolution using the stencil N

Definition at line 2846 of file grid_dist_id.hpp.

◆ conv_cross2()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<unsigned int prop_src1, unsigned int prop_src2, unsigned int prop_dst1, unsigned int prop_dst2, unsigned int stencil_size, typename lambda_f , typename ... ArgsT>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::conv_cross2 ( grid_key_dx< 3 >  start,
grid_key_dx< 3 >  stop,
lambda_f  func,
ArgsT ...  args 
)
inline

apply a convolution using the stencil N

Definition at line 3089 of file grid_dist_id.hpp.

◆ conv_cross_b()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<unsigned int prop_src, unsigned int prop_dst, unsigned int stencil_size, typename lambda_f , typename ... ArgsT>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::conv_cross_b ( grid_key_dx< 3 >  start,
grid_key_dx< 3 >  stop,
lambda_f  func,
ArgsT ...  args 
)
inline

apply a convolution using the stencil N

Definition at line 2875 of file grid_dist_id.hpp.

◆ conv_cross_ids()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<unsigned int stencil_size, typename v_type , typename lambda_f , typename ... ArgsT>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::conv_cross_ids ( grid_key_dx< 3 >  start,
grid_key_dx< 3 >  stop,
lambda_f  func,
ArgsT ...  args 
)
inline

apply a convolution using the stencil N

Definition at line 2904 of file grid_dist_id.hpp.

◆ convert_ghost()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
static Ghost< dim, St > grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::convert_ghost ( const Ghost< dim, long int > &  gd,
const CellDecomposer_sm< dim, St, shift< dim, St > > &  cd_sm 
)
inlinestaticprotected

Convert a ghost from grid point units into continus space.

Parameters
gdGhost in continuous space
cd_smCellDecomposer of the grid
Returns
the ghost in continuous unit

Definition at line 1230 of file grid_dist_id.hpp.

◆ copy()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
grid_dist_id< dim, St, T, Decomposition, Memory, device_grid > & grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::copy ( grid_dist_id< dim, St, T, Decomposition, Memory, device_grid > &  g,
bool  use_memcpy = true 
)
inline

Copy the give grid into this grid.

It copy the first grid into the given grid (No ghost)

Warning
the Decomposition must be ensured to be the same, otherwise crashes can happen, if you want to copy the grid independently from the decomposition please use the operator equal
Parameters
gGrid to copy
use_memcpyuse memcpy function if possible
Returns
itself

Definition at line 2672 of file grid_dist_id.hpp.

◆ copy_sparse()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
grid_dist_id< dim, St, T, Decomposition, Memory, device_grid > & grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::copy_sparse ( grid_dist_id< dim, St, T, Decomposition, Memory, device_grid > &  g,
bool  use_memcpy = true 
)
inline

Copy the give grid into this grid.

It copy the first grid into the given grid (No ghost)

Warning
the Decomposition must be ensured to be the same, otherwise crashes can happen, if you want to copy the grid independently from the decomposition please use the operator equal
Parameters
gGrid to copy
use_memcpyuse memcpy function if possible
Returns
itself

Definition at line 2730 of file grid_dist_id.hpp.

◆ Create()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::Create ( openfpm::vector< Box< dim, long int > > &  bx_def,
const Ghost< dim, long int > &  g,
bool  use_bx_def 
)
inlineprivate

Create the grids on memory.

Parameters
bx_defWhere the grid is defined
use_bx_defuse the array that define where the grid is defined

Definition at line 1072 of file grid_dist_id.hpp.

◆ create_eg_box()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::create_eg_box ( )
inlineprivate

Create per-processor internal ghost box list in grid units.

Definition at line 622 of file grid_dist_id.hpp.

◆ create_ig_box()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::create_ig_box ( )
inlineprivate

Create per-processor internal ghost boxes list in grid units and g_id_to_external_ghost_box.

Definition at line 548 of file grid_dist_id.hpp.

◆ create_local_eg_box()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::create_local_eg_box ( )
inlineprivate

Create per-processor external ghost boxes list in grid units.

Definition at line 954 of file grid_dist_id.hpp.

◆ create_local_ig_box()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::create_local_ig_box ( )
inlineprivate

Create local internal ghost box in grid units.

Definition at line 830 of file grid_dist_id.hpp.

◆ debugPrint()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::debugPrint ( )
inline

It print the internal ghost boxes and external ghost boxes in global unit.

Definition at line 3296 of file grid_dist_id.hpp.

◆ existPoint()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<typename bg_key >
bool grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::existPoint ( const grid_dist_key_dx< dim, bg_key > &  v1) const
inline

Check if the point exist.

Parameters
v1grid_key that identify the element in the grid
Returns
the true if the point exist

Definition at line 2557 of file grid_dist_id.hpp.

◆ findNeighbours()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<typename NNtype >
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::findNeighbours ( )
inline

Definition at line 3076 of file grid_dist_id.hpp.

◆ flush()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<typename ... v_reduce>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::flush ( flush_type  opt = flush_type::FLUSH_ON_HOST)
inline

Definition at line 2316 of file grid_dist_id.hpp.

◆ flush_remove()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::flush_remove ( )
inline

remove an element in the grid

In case of dense grid this function print a warning, in case of sparse grid this function remove a grid point.

Parameters
v1grid_key that identify the element in the grid
Returns
a reference to the inserted element

Definition at line 2334 of file grid_dist_id.hpp.

◆ get() [1/6]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<unsigned int p = 0>
auto grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::get ( const grid_dist_g_dx< device_grid > &  v1) -> decltype(v1.getSub()->template get<p>(v1.getKey()))
inline

Get the reference of the selected element.

Template Parameters
pproperty to get (is an integer)
Parameters
v1grid_key that identify the element in the grid
Returns
the selected element

Definition at line 2483 of file grid_dist_id.hpp.

◆ get() [2/6]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<unsigned int p = 0>
auto grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::get ( const grid_dist_g_dx< device_grid > &  v1) const -> decltype(v1.getSub()->template get<p>(v1.getKey()))
inline

Get the reference of the selected element.

Template Parameters
pproperty to get (is an integer)
Parameters
v1grid_key that identify the element in the grid
Returns
the selected element

Definition at line 2465 of file grid_dist_id.hpp.

◆ get() [3/6]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<unsigned int p, typename bg_key >
auto grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::get ( const grid_dist_key_dx< dim, bg_key > &  v1) -> decltype(loc_grid.get(v1.getSub()).template get<p>(v1.getKey()))
inline

Get the reference of the selected element.

Template Parameters
pproperty to get (is an integer)
Parameters
v1grid_key that identify the element in the grid
Returns
the selected element

Definition at line 2447 of file grid_dist_id.hpp.

◆ get() [4/6]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<unsigned int p, typename bg_key >
auto grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::get ( const grid_dist_key_dx< dim, bg_key > &  v1) const -> typename std::add_lvalue_reference<decltype(loc_grid.get(v1.getSub()).template get<p>(v1.getKey()))>::type
inline

Get the reference of the selected element.

Template Parameters
pproperty to get (is an integer)
Parameters
v1grid_key that identify the element in the grid
Returns
the selected element

Definition at line 2428 of file grid_dist_id.hpp.

◆ get() [5/6]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<unsigned int p = 0>
auto grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::get ( const grid_dist_lin_dx v1) -> decltype(loc_grid.get(v1.getSub()).template get<p>(v1.getKey()))
inline

Get the reference of the selected element.

Template Parameters
pproperty to get (is an integer)
Parameters
v1grid_key that identify the element in the grid
Returns
the selected element

Definition at line 2517 of file grid_dist_id.hpp.

◆ get() [6/6]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<unsigned int p = 0>
auto grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::get ( const grid_dist_lin_dx v1) const -> decltype(loc_grid.get(v1.getSub()).template get<p>(v1.getKey()))
inline

Get the reference of the selected element.

Template Parameters
pproperty to get (is an integer)
Parameters
v1grid_key that identify the element in the grid
Returns
the selected element

Definition at line 2500 of file grid_dist_id.hpp.

◆ get_ig_box()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
const openfpm::vector< i_lbox_grid< dim > > & grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::get_ig_box ( )
inline

Get the internal ghost box.

Returns
the internal local ghost box

Definition at line 3571 of file grid_dist_id.hpp.

◆ get_loc_grid() [1/2]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
device_grid & grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::get_loc_grid ( size_t  i)
inline

Get the i sub-domain grid.

Parameters
isub-domain
Returns
local grid

Definition at line 3217 of file grid_dist_id.hpp.

◆ get_loc_grid() [2/2]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
const device_grid & grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::get_loc_grid ( size_t  i) const
inline

Get the i sub-domain grid.

Parameters
isub-domain
Returns
local grid

Definition at line 3229 of file grid_dist_id.hpp.

◆ get_loc_grid_iterator()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
grid_key_dx_iterator_sub< dim, no_stencil > grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::get_loc_grid_iterator ( size_t  i)
inline

Get the i sub-domain grid.

Parameters
isub-domain
Returns
local grid

Definition at line 3241 of file grid_dist_id.hpp.

◆ get_loc_grid_iterator_stencil()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<unsigned int Np>
grid_key_dx_iterator_sub< dim, stencil_offset_compute< dim, Np >, typename device_grid::linearizer_type > grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::get_loc_grid_iterator_stencil ( size_t  i,
const grid_key_dx< dim >(&)  stencil_pnt[Np] 
)
inline

Get the i sub-domain grid.

Parameters
isub-domain
Returns
local grid

Definition at line 3257 of file grid_dist_id.hpp.

◆ get_loc_ig_box()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
const openfpm::vector< i_lbox_grid< dim > > & grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::get_loc_ig_box ( )
inline

Get the internal local ghost box.

Returns
the internal local ghost box

Definition at line 3561 of file grid_dist_id.hpp.

◆ getCellDecomposer()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
const CellDecomposer_sm< dim, St, shift< dim, St > > & grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::getCellDecomposer ( ) const
inline

Return the cell decomposer.

Returns
the cell decomposer

Definition at line 1804 of file grid_dist_id.hpp.

◆ getDecomposition() [1/2]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
Decomposition & grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::getDecomposition ( )
inline

Get the object that store the information about the decomposition.

Returns
the decomposition object

Definition at line 1778 of file grid_dist_id.hpp.

◆ getDecomposition() [2/2]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
const Decomposition & grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::getDecomposition ( ) const
inline

Get the object that store the information about the decomposition.

Returns
the decomposition object

Definition at line 1791 of file grid_dist_id.hpp.

◆ getDomain() [1/2]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
const Box< dim, St > grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::getDomain ( ) const
inline

Get the domain where the grid is defined.

Returns
the domain of the grid

Definition at line 1305 of file grid_dist_id.hpp.

◆ getDomain() [2/2]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
Box< dim, size_t > grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::getDomain ( size_t  i)
inlineprotected

Given a local sub-domain i with a local grid Domain + ghost return the part of the local grid that is domain.

Parameters
isub-domain
Returns
the Box defining the domain in the local grid

Definition at line 1217 of file grid_dist_id.hpp.

◆ getDomainGhostIterator()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
grid_dist_iterator< dim, device_grid, decltype(device_grid::type_of_iterator()), FIXED > grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::getDomainGhostIterator ( ) const
inline

It return an iterator that span the grid domain + ghost part.

Returns
the iterator

Definition at line 2175 of file grid_dist_id.hpp.

◆ getDomainIterator()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
grid_dist_iterator< dim, device_grid, decltype(device_grid::type_of_subiterator()), FREE > grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::getDomainIterator ( ) const
inline

It return an iterator that span the full grid domain (each processor span its local domain)

Returns
the iterator

Definition at line 2118 of file grid_dist_id.hpp.

◆ getDomainIteratorStencil()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<unsigned int Np>
grid_dist_iterator< dim, device_grid, decltype(device_grid::template type_of_subiterator< stencil_offset_compute< dim, Np > >()), FREE, stencil_offset_compute< dim, Np > > grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::getDomainIteratorStencil ( const grid_key_dx< dim >(&)  stencil_pnt[Np]) const
inline

It return an iterator that span the full grid domain (each processor span its local domain)

Parameters
stencil_pntstencil points
Returns
the iterator

Definition at line 2148 of file grid_dist_id.hpp.

◆ getGKey()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
grid_key_dx< dim > grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::getGKey ( const grid_dist_key_dx< dim > &  k) const
inline

Convert a g_dist_key_dx into a global key.

See also
grid_dist_key_dx
grid_dist_iterator
Parameters
kgrid_dist_key_dx point (in general returned by the iterators)
Returns
the global position in the grid

Definition at line 2765 of file grid_dist_id.hpp.

◆ getGlobalGridsInfo()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::getGlobalGridsInfo ( openfpm::vector< GBoxes< device_grid::dims > > &  gdb_ext_global) const
inline

It gathers the information about local grids for all of the processors.

Parameters
gdb_ext_globalwhere to store the grid infos

Definition at line 1892 of file grid_dist_id.hpp.

◆ getGridGhostIterator()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
grid_dist_id_iterator_dec< Decomposition, true > grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::getGridGhostIterator ( const grid_key_dx< dim > &  start,
const grid_key_dx< dim > &  stop 
)
inline

/brief Get a grid Iterator running on domain and ghost area

In case of dense grid getGridIterator is equivalent to getDomainIterator in case if sparse distributed grid getDomainIterator go across all the inserted point get grid iterator run across all grid points independently that the point has been insert or not

Returns
a Grid iterator

Definition at line 2081 of file grid_dist_id.hpp.

◆ getGridInfo()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
const grid_sm< dim, T > & grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::getGridInfo ( ) const
inline

Get an object containing the grid informations.

Returns
an information object about this grid

Definition at line 1752 of file grid_dist_id.hpp.

◆ getGridInfoVoid()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
const grid_sm< dim, void > & grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::getGridInfoVoid ( ) const
inline

Get an object containing the grid informations without type.

Returns
an information object about this grid

Definition at line 1765 of file grid_dist_id.hpp.

◆ getGridIterator() [1/2]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
grid_dist_id_iterator_dec< Decomposition > grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::getGridIterator ( )
inline

/brief Get a grid Iterator

In case of dense grid getGridIterator is equivalent to getDomainIterator in case if sparse distributed grid getDomainIterator go across all the inserted point get grid iterator run across all grid points independently that the point has been insert or not

Returns
a Grid iterator

Definition at line 2097 of file grid_dist_id.hpp.

◆ getGridIterator() [2/2]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
grid_dist_id_iterator_dec< Decomposition > grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::getGridIterator ( const grid_key_dx< dim > &  start,
const grid_key_dx< dim > &  stop 
)
inline

/brief Get a grid Iterator

In case of dense grid getGridIterator is equivalent to getDomainIterator in case of sparse grid getDomainIterator go across all the inserted point get grid iterator run across all grid points independently that the point has been insert or not

Returns
a Grid iterator

Definition at line 1968 of file grid_dist_id.hpp.

◆ getLocalDomainSize()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
size_t grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::getLocalDomainSize ( ) const
inline

Get the total number of grid points for the calling processor.

Returns
The number of grid points

Definition at line 1838 of file grid_dist_id.hpp.

◆ getLocalDomainWithGhostSize()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
size_t grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::getLocalDomainWithGhostSize ( ) const
inline

Get the total number of grid points with ghost for the calling processor.

Returns
The number of grid points

Definition at line 1858 of file grid_dist_id.hpp.

◆ getLocalGridsInfo()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
const openfpm::vector< GBoxes< device_grid::dims > > & grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::getLocalGridsInfo ( ) const
inline

It return the informations about the local grids.

Returns
The information about the local grids

Definition at line 1879 of file grid_dist_id.hpp.

◆ getN_loc_grid()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
size_t grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::getN_loc_grid ( ) const
inline

Return the number of local grid.

Returns
the number of local grid

Definition at line 3270 of file grid_dist_id.hpp.

◆ getOffset()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
Point< dim, St > grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::getOffset ( size_t  i)
inline

Get the point where it start the origin of the grid of the sub-domain i.

Parameters
isub-domain
Returns
the point

Definition at line 1317 of file grid_dist_id.hpp.

◆ getOldDomainIterator()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
grid_dist_iterator< dim, device_grid, decltype(device_grid::type_of_subiterator()), FREE > grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::getOldDomainIterator ( ) const
inline

It return an iterator that span the full grid domain (each processor span its local domain)

Returns
the iterator

Definition at line 1940 of file grid_dist_id.hpp.

◆ getPos()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<typename bg_key >
Point< dim, St > grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::getPos ( const grid_dist_key_dx< dim, bg_key > &  v1)
inline

Get the reference of the selected element.

Template Parameters
pproperty to get (is an integer)
Parameters
v1grid_key that identify the element in the grid
Returns
the selected element

Definition at line 2534 of file grid_dist_id.hpp.

◆ getProp() [1/2]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<unsigned int p = 0, typename bgkey >
auto grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::getProp ( const grid_dist_key_dx< dim, bgkey > &  v1) -> decltype(this->template get<p>(v1))
inline

Get the reference of the selected element.

Template Parameters
pproperty to get (is an integer)
Parameters
v1grid_key that identify the element in the grid
Returns
the selected element

Definition at line 2585 of file grid_dist_id.hpp.

◆ getProp() [2/2]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<unsigned int p = 0, typename bgkey >
auto grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::getProp ( const grid_dist_key_dx< dim, bgkey > &  v1) const -> decltype(this->template get<p>(v1))
inline

Get the reference of the selected element.

Template Parameters
pproperty to get (is an integer)
Parameters
v1grid_key that identify the element in the grid
Returns
the selected element

Definition at line 2571 of file grid_dist_id.hpp.

◆ getPropNames()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
const openfpm::vector< std::string > & grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::getPropNames ( )
inline

Set the properties names.

It is useful to specify name for the properties in vtk writers

Parameters
namesset of properties names

Definition at line 3351 of file grid_dist_id.hpp.

◆ getSpacing()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
Point< dim, St > grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::getSpacing ( )
inline

Get the spacing on each dimension.

Returns
the spacing of the grid on each dimension as a point

Definition at line 2750 of file grid_dist_id.hpp.

◆ getSubDomainIterator() [1/2]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
grid_dist_iterator_sub< dim, device_grid > grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::getSubDomainIterator ( const grid_key_dx< dim > &  start,
const grid_key_dx< dim > &  stop 
) const
inline

It return an iterator that span the grid domain only in the specified part.

The key spanned are the one inside the box spanned by the start point and the end point included

Parameters
startpoint
stoppoint
Returns
the sub-domain iterator

Definition at line 2204 of file grid_dist_id.hpp.

◆ getSubDomainIterator() [2/2]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
grid_dist_iterator_sub< dim, device_grid > grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::getSubDomainIterator ( const long int(&)  start[dim],
const long int(&)  stop[dim] 
) const
inline

It return an iterator that span the grid domain only in the specified part.

The key spanned are the one inside the box spanned by the start point and the end point included

Parameters
startpoint
stoppoint
Returns
an iterator on the sub-part of the grid

Definition at line 2227 of file grid_dist_id.hpp.

◆ getVC()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
Vcluster & grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::getVC ( )
inline

Get the Virtual Cluster machine.

Returns
the Virtual cluster machine

Definition at line 2248 of file grid_dist_id.hpp.

◆ ghost_get()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<int... prp>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::ghost_get ( size_t  opt = 0)
inline

It synchronize the ghost parts.

Template Parameters
prp...Properties to synchronize

Definition at line 2595 of file grid_dist_id.hpp.

◆ ghost_put()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<template< typename, typename > class op, int... prp>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::ghost_put ( )
inline

It synchronize the ghost parts.

Template Parameters
prp...Properties to synchronize

Definition at line 2631 of file grid_dist_id.hpp.

◆ InitializeCellDecomposer() [1/2]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::InitializeCellDecomposer ( const CellDecomposer_sm< dim, St, shift< dim, St > > &  cd_old,
const Box< dim, size_t > &  ext 
)
inlineprivate

Initialize the Cell decomposer of the grid enforcing perfect overlap of the cells.

Parameters
cd_oldthe CellDecomposer we are trying to mach
extextension of the domain

Definition at line 1112 of file grid_dist_id.hpp.

◆ InitializeCellDecomposer() [2/2]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::InitializeCellDecomposer ( const size_t(&)  g_sz[dim],
const size_t(&)  bc[dim] 
)
inlineprivate

Initialize the Cell decomposer of the grid.

Parameters
g_szSize of the grid
bcboundary conditions

Definition at line 1124 of file grid_dist_id.hpp.

◆ InitializeDecomposition()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::InitializeDecomposition ( const size_t(&)  g_sz[dim],
const size_t(&)  bc[dim],
const grid_sm< dim, void > &  g_dist = grid_sm<dim,void>() 
)
inlineprivate

Initialize the grid.

Parameters
g_szGlobal size of the grid
bcboundary conditions

Definition at line 1143 of file grid_dist_id.hpp.

◆ InitializeStructures() [1/2]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::InitializeStructures ( const size_t(&)  g_sz[dim])
inlineprivate

Initialize the grid.

Parameters
g_szGlobal size of the grid

Definition at line 1175 of file grid_dist_id.hpp.

◆ InitializeStructures() [2/2]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::InitializeStructures ( const size_t(&)  g_sz[dim],
openfpm::vector< Box< dim, long int > > &  bx,
const Ghost< dim, long int > &  g,
bool  use_bx_def 
)
inlineprivate

Initialize the grid.

Parameters
g_szGlobal size of the grid
gghost extension of the grid in integer unit
bxset of boxes that define where is defined the grid

Definition at line 1193 of file grid_dist_id.hpp.

◆ insert()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<unsigned int p, typename bg_key >
auto grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::insert ( const grid_dist_key_dx< dim, bg_key > &  v1) -> decltype(loc_grid.get(v1.getSub()).template insert<p>(v1.getKey()))
inline

insert an element in the grid

In case of dense grid this function is equivalent to get, in case of sparse grid this function insert a grid point. When the point already exist it return a reference to the already existing point. In case of massive insert Sparse grids it give a reference to the inserted element in the insert buffer

Template Parameters
pproperty to get (is an integer)
Parameters
v1grid_key that identify the element in the grid
Returns
a reference to the inserted element

Definition at line 2356 of file grid_dist_id.hpp.

◆ insertFlush() [1/2]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<typename bg_key >
auto grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::insertFlush ( const grid_dist_key_dx< dim, bg_key > &  v1) -> decltype(loc_grid.get(v1.getSub()).template insertFlush(v1.getKey()))
inline

insert an element in the grid

In case of dense grid this function is equivalent to get, in case of sparse grid this function insert a grid point. When the point already exist it return a reference to the already existing point. In case of massive insert Sparse grids The point is inserted immediately and a reference to the inserted element is returned

Warning
This function is not fast an unlucky insert can potentially cost O(N) where N is the number of points (worst case)
Template Parameters
pproperty to get (is an integer)
Parameters
v1grid_key that identify the element in the grid
Returns
a reference to the inserted element

Definition at line 2409 of file grid_dist_id.hpp.

◆ insertFlush() [2/2]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<unsigned int p, typename bg_key >
auto grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::insertFlush ( const grid_dist_key_dx< dim, bg_key > &  v1) -> decltype(loc_grid.get(v1.getSub()).template insertFlush<p>(v1.getKey()))
inline

insert an element in the grid

In case of dense grid this function is equivalent to get, in case of sparse grid this function insert a grid point. When the point already exist it return a reference to the already existing point. In case of massive insert Sparse grids The point is inserted immediately and a reference to the inserted element is returned

Warning
This function is not fast an unlucky insert can potentially cost O(N) where N is the number of points (worst case)
Template Parameters
pproperty to get (is an integer)
Parameters
v1grid_key that identify the element in the grid
Returns
a reference to the inserted element

Definition at line 2383 of file grid_dist_id.hpp.

◆ is_staggered()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
bool grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::is_staggered ( ) const
inline

Indicate that this grid is not staggered.

Returns
false

Definition at line 2273 of file grid_dist_id.hpp.

◆ isInside()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
bool grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::isInside ( const grid_key_dx< dim > &  gk) const
inline

Check that the global grid key is inside the grid domain.

Parameters
gkpoint to check
Returns
true if is inside

Definition at line 1819 of file grid_dist_id.hpp.

◆ load()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::load ( const std::string &  filename)
inline

Reload the grid from HDF5 file.

Parameters
filenameoutput filename

Definition at line 3494 of file grid_dist_id.hpp.

◆ map()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::map ( size_t  opt = 0)
inline

It move all the grid parts that do not belong to the local processor to the respective processor.

Definition at line 3441 of file grid_dist_id.hpp.

◆ msg_alloc_external_box()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
static void * grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::msg_alloc_external_box ( size_t  msg_i,
size_t  total_msg,
size_t  total_p,
size_t  i,
size_t  ri,
void *  ptr 
)
inlinestaticprivate

Call-back to allocate buffer to receive incoming objects (external ghost boxes)

Parameters
msg_imessage size required to receive from i
total_msgmessage size to receive from all the processors
total_pthe total number of processor want to communicate with you
iprocessor id
rirequest id (it is an id that goes from 0 to total_p, and is unique every time message_alloc is called)
ptrvoid pointer parameter for additional data to pass to the call-back

Definition at line 471 of file grid_dist_id.hpp.

◆ print_stats()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::print_stats ( )
inline

Definition at line 3576 of file grid_dist_id.hpp.

◆ remove()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<typename bg_key >
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::remove ( const grid_dist_key_dx< dim, bg_key > &  v1)
inline

remove an element in the grid

In case of dense grid this function print a warning, in case of sparse grid this function remove a grid point.

Parameters
v1grid_key that identify the element in the grid
Returns
a reference to the inserted element

Definition at line 2288 of file grid_dist_id.hpp.

◆ remove_no_flush()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<typename bg_key >
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::remove_no_flush ( const grid_dist_key_dx< dim, bg_key > &  v1)
inline

remove an element in the grid

In case of dense grid this function print a warning, in case of sparse grid this function remove a grid point.

Parameters
v1grid_key that identify the element in the grid
Returns
a reference to the inserted element

Definition at line 2306 of file grid_dist_id.hpp.

◆ removeUnusedBuffers()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::removeUnusedBuffers ( )
inline

Eliminate many internal temporary buffer you can use this between flushes if you get some out of memory.

Definition at line 2260 of file grid_dist_id.hpp.

◆ reset_ghost_structures()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::reset_ghost_structures ( )
inlineprotected

Definition at line 1260 of file grid_dist_id.hpp.

◆ save()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::save ( const std::string &  filename) const
inline

Save the grid state on HDF5.

Parameters
filenameoutput filename

Definition at line 3482 of file grid_dist_id.hpp.

◆ set_for_adjustment()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::set_for_adjustment ( size_t  sub_id,
const Box< dim, St > &  sub_domain_other,
const comb< dim > &  cmb,
Box< dim, long int > &  ib,
Ghost< dim, long int > &  g 
)
inlineprivate

this function is for optimization of the ghost size

Because the decomposition work in continuum and discrete ghost is converted in continuum, in some case continuum ghost because of rounding-off error can produce ghost bigger than the discrete selected one. This function adjust for this round-off error

Parameters
sub_idsub-domain id
sub_domain_otherthe other sub-domain
ibinternal ghost box to adjust

Definition at line 500 of file grid_dist_id.hpp.

◆ setBackgroundValue() [1/2]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<unsigned int p>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::setBackgroundValue ( const typename boost::mpl::at< typename T::type, boost::mpl::int_< p > >::type &  bv)
inline

set the background value

You can use this function make sense in case of sparse in case of dense it does nothing

Definition at line 1363 of file grid_dist_id.hpp.

◆ setBackgroundValue() [2/2]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::setBackgroundValue ( T &  bv)
inline

set the background value

You can use this function make sense in case of sparse in case of dense it does nothing

Definition at line 1350 of file grid_dist_id.hpp.

◆ setDecompositionGranularity()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::setDecompositionGranularity ( size_t  n_sub)
inlineprotected

Set the minimum number of sub-domain per processor.

Parameters
n_sub

Definition at line 1255 of file grid_dist_id.hpp.

◆ setPropNames()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::setPropNames ( const openfpm::vector< std::string > &  names)
inline

Set the properties names.

It is useful to specify name for the properties in vtk writers

Parameters
namesset of properties names

Definition at line 3339 of file grid_dist_id.hpp.

◆ size() [1/2]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
size_t grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::size ( ) const
inline

Return the total number of points in the grid.

Returns
number of points

Definition at line 1339 of file grid_dist_id.hpp.

◆ size() [2/2]

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
size_t grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::size ( size_t  i) const
inline

Return the total number of points in the grid.

Parameters
idirection
Returns
number of points on direction i

Definition at line 1394 of file grid_dist_id.hpp.

◆ size_local_inserted()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
size_t grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::size_local_inserted ( ) const
inline

Return the local total number of points inserted in the grid.

in case of dense grid it return the number of local points, in case of sparse it return the number of inserted points

Returns
number of points

Definition at line 1377 of file grid_dist_id.hpp.

◆ spacing()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
St grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::spacing ( size_t  i) const
inline

Get the spacing of the grid in direction i.

Parameters
idimension
Returns
the spacing

Definition at line 1329 of file grid_dist_id.hpp.

◆ tagBoundaries()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<typename stencil_type >
void grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::tagBoundaries ( )
inline

construct link between current and the level up

Parameters
grid_dwgrid level down

Definition at line 3425 of file grid_dist_id.hpp.

◆ type_of_subiterator()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<typename stencil = no_stencil>
static grid_dist_iterator_sub< dim, device_grid > grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::type_of_subiterator ( )
inlinestatic

This is a meta-function return which type of sub iterator a grid produce.

Returns
the type of the sub-grid iterator

Definition at line 3551 of file grid_dist_id.hpp.

◆ who()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
long int grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::who ( )
inline

It return the id of structure in the allocation list.

See also
print_alloc and SE_CLASS2
Returns
the id

Definition at line 3283 of file grid_dist_id.hpp.

◆ write()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
bool grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::write ( std::string  output,
size_t  opt = VTK_WRITER | FORMAT_BINARY 
)
inline

Write the distributed grid information.

  • grid_X.vtk Output each local grids for each local processor X
  • internal_ghost_X.vtk Internal ghost boxes in grid units for the local processor X
Parameters
outputdirectory where to put the files + prefix
optoptions
Returns
true if the write operation succeed

Definition at line 3124 of file grid_dist_id.hpp.

◆ write_debug()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
bool grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::write_debug ( std::string  output)
inline

Write all grids indigually.

Parameters
outputfiles

Definition at line 3156 of file grid_dist_id.hpp.

◆ write_frame()

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
bool grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::write_frame ( std::string  output,
size_t  i,
size_t  opt = VTK_WRITER | FORMAT_ASCII 
)
inline

Write the distributed grid information.

  • grid_X.vtk Output each local grids for each local processor X
  • internal_ghost_X.vtk Internal ghost boxes in grid units for the local processor X
Parameters
outputdirectory where to put the files + prefix
iframe number
optoptions
Returns
true id the write succeed

Definition at line 3186 of file grid_dist_id.hpp.

Field Documentation

◆ bx_def

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
openfpm::vector<Box<dim,long int> > grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::bx_def
private

Set of boxes that define where the grid is defined.

Definition at line 425 of file grid_dist_id.hpp.

◆ cd_sm

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
CellDecomposer_sm<dim,St,shift<dim,St> > grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::cd_sm
private

Structure that divide the space into cells.

Definition at line 323 of file grid_dist_id.hpp.

◆ dec

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
Decomposition grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::dec
private

Space Decomposition.

Definition at line 297 of file grid_dist_id.hpp.

◆ dims

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
const unsigned int grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::dims = dim
static

Number of dimensions.

Definition at line 1298 of file grid_dist_id.hpp.

◆ domain

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
Box<dim,St> grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::domain
private

Domain.

Definition at line 282 of file grid_dist_id.hpp.

◆ eb_gid_list

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
openfpm::vector<e_box_multi<dim> > grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::eb_gid_list
private

Link a received external ghost box to the linked eg_box. When the grid is defined everywhere for each received external ghost box exists one eg_box linked to it that contain the information on how to transfer the information to the associated sub-domain grid. Unfortunately when we specify where the grid is defined, a received external ghost box can be linked to multiple sub-domain grids (one sub-domain can have multiple sub grids). So in standard situation (grid defined everywhere) a received external ghost box is linked to a single eg_box entry and eb_gid_list play mainly no role. (play no role but must be filled ghost_get expect this structure to be filled consistently, it will be clear later how to do it in this case). When the grid is not defined everywhere a received ghost box can be linked to multiple external ghost boxes. (Like in figure)

  +--------------------------------------------+------
  |        Sub-domain                          | Another sub-domain
  |          +------+           +---------+    |
  |          |      |           |         |    |
  |          |      |           |         |    |
  |          |      |           |         |    |
  |          |  3   |           |    4    |    |
  |   empty  |      |    empty  |         |    |
  |          |      |           |         |    |
  |          |      |           |         |    |
  |          |      |           |         |    |                         1
  |          |      |           |         |    |
+-+-----+----+------+-----------+---------+----+-----+-----   Processor bound
        |***##########*********#############****|****|
        |                                            |                   0
        |                                            |
        |                                            |
        |                  9                         |
        |                                            |
        |                                            |
        |                                            |
        +--------------------------------------------+

     * 

As we can see here the grid number 9 on processo 0 has an internal ghost box The internal ghost-box is sent to processor 1 and is a received external ghost box. This external ghost box is partially shared in two separated grids. It is important to note that 3 and 4 are grid defined externally and are not defined by the sub-domain border. It is important also to note that the sub-domain granularity in processor 1 define the granularity of the internal ghost box in processor 0 and consequently every external ghost box in processor 1 is linked uniquely with one internal ghost box in processor 0. On the other hand if we have a secondary granularity define by external boxes like 3 and 4 this is not anymore true and one internal ghost box in 0 can be linked with multiple grids. The granularity of the space division is different from the granularity of where the grid is defined. Space decomposition exist independently from the data-structure and can be shared across multiple data-structure this mean that cannot be redefined based on where is the grid definitions. The internal ghost box could be redefined in order to respect the granularity. We do not do this for 3 main reason.

1) The definition box must be communicated across processors. 2) An interprocessor global-id link must be established with lower sub-domain granularty 3) Despite the points * are not linked, but must be anyway sent to processor 1, this mean that make not too much sense to increase the granularity in advance on processor 0, but it is better receive the information an than solve the lower granularity locally on processor 1

Definition at line 406 of file grid_dist_id.hpp.

◆ eg_box

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
openfpm::vector<ep_box_grid<dim> > grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::eg_box
private

External ghost boxes in grid units.

Definition at line 449 of file grid_dist_id.hpp.

◆ g_id_to_external_ghost_box

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
std::unordered_map<size_t,size_t> grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::g_id_to_external_ghost_box
private

It map a global ghost id (g_id) to the external ghost box information It is unique across all the near processor

Definition at line 336 of file grid_dist_id.hpp.

◆ g_id_to_internal_ghost_box

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
openfpm::vector<std::unordered_map<size_t,size_t> > grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::g_id_to_internal_ghost_box
private

It map a global ghost id (g_id) to the internal ghost box information (is unique for processor), it is not unique across all the near processor

Definition at line 410 of file grid_dist_id.hpp.

◆ g_sz

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
size_t grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::g_sz[dim]
private

Size of the grid on each dimension.

Definition at line 320 of file grid_dist_id.hpp.

◆ gdb_ext

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
openfpm::vector<GBoxes<device_grid::dims> > grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::gdb_ext
private

Extension of each grid: Domain and ghost + domain.

Definition at line 311 of file grid_dist_id.hpp.

◆ gdb_ext_global

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
openfpm::vector<GBoxes<device_grid::dims> > grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::gdb_ext_global
mutableprivate

Global gdb_ext.

Definition at line 314 of file grid_dist_id.hpp.

◆ gdb_ext_markers

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
openfpm::vector<size_t> grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::gdb_ext_markers
private

gdb_ext markers In the case where the grid is defined everywhere gdb_ext_marker is useless and so is empty in the case we have a grid defined on a smaller set of boxes gbd_ext_markers indicate the division across subdomains. For example Sub-domain 0 produce 2 grid Sub-domain 1 produce 3 grid Sub-domain 2 produce 2 grid Sub-domain 3 produce 1 grid gdb_ext_markers contain 0,2,5,7,8

Definition at line 308 of file grid_dist_id.hpp.

◆ gdb_ext_old

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
openfpm::vector<GBoxes<device_grid::dims> > grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::gdb_ext_old
private

Extension of each old grid (old): Domain and ghost + domain.

Definition at line 317 of file grid_dist_id.hpp.

◆ ghost

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
Ghost<dim,St> grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::ghost
private

Ghost expansion.

Definition at line 285 of file grid_dist_id.hpp.

◆ ghost_int

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
Ghost<dim,long int> grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::ghost_int
private

Ghost expansion.

Definition at line 288 of file grid_dist_id.hpp.

◆ ginfo

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
grid_sm<dim,T> grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::ginfo
private

Grid informations object.

Definition at line 419 of file grid_dist_id.hpp.

◆ ginfo_v

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
grid_sm<dim,void> grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::ginfo_v
private

Grid informations object without type.

Definition at line 422 of file grid_dist_id.hpp.

◆ gint

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
Ghost<dim,long int> grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::gint = Ghost<dim,long int>(0)
private

Definition at line 1206 of file grid_dist_id.hpp.

◆ gpu_n_insert_thread

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
size_t grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::gpu_n_insert_thread
private

number of insert each GPU thread does

Definition at line 326 of file grid_dist_id.hpp.

◆ ig_box

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
openfpm::vector<ip_box_grid<dim> > grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::ig_box
private

Internal ghost boxes in grid units.

Definition at line 446 of file grid_dist_id.hpp.

◆ init_e_g_box

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
bool grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::init_e_g_box = false
private

Flag that indicate if the external ghost box has been initialized.

Definition at line 437 of file grid_dist_id.hpp.

◆ init_fix_ie_g_box

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
bool grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::init_fix_ie_g_box = false
private

Flag that indicate if the internal and external ghost box has been fixed.

Definition at line 443 of file grid_dist_id.hpp.

◆ init_i_g_box

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
bool grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::init_i_g_box = false
private

Flag that indicate if the internal ghost box has been initialized.

Definition at line 440 of file grid_dist_id.hpp.

◆ init_local_e_g_box

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
bool grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::init_local_e_g_box = false
private

Indicate if the local external ghost box has been initialized.

Definition at line 434 of file grid_dist_id.hpp.

◆ init_local_i_g_box

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
bool grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::init_local_i_g_box = false
private

Indicate if the local internal ghost box has been initialized.

Definition at line 431 of file grid_dist_id.hpp.

◆ loc_eg_box

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
openfpm::vector<e_lbox_grid<dim> > grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::loc_eg_box
private

Local external ghost boxes in grid units.

Definition at line 455 of file grid_dist_id.hpp.

◆ loc_grid

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
openfpm::vector<device_grid> grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::loc_grid
mutableprivate

Local grids.

Definition at line 291 of file grid_dist_id.hpp.

◆ loc_grid_old

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
openfpm::vector<device_grid> grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::loc_grid_old
mutableprivate

Old local grids.

Definition at line 294 of file grid_dist_id.hpp.

◆ loc_ig_box

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
openfpm::vector<i_lbox_grid<dim> > grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::loc_ig_box
private

Local internal ghost boxes in grid units.

Definition at line 452 of file grid_dist_id.hpp.

◆ prp_names

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
openfpm::vector<std::string> grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::prp_names
private

properties names

Definition at line 332 of file grid_dist_id.hpp.

◆ recv_mem_gg

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
openfpm::vector<HeapMemory> grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::recv_mem_gg
private

Receiving buffer for particles ghost get.

Definition at line 416 of file grid_dist_id.hpp.

◆ recv_sz

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
openfpm::vector<size_t> grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::recv_sz
private

Receiving size.

Definition at line 413 of file grid_dist_id.hpp.

◆ use_bx_def

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
bool grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::use_bx_def = false
private

Indicate if we have to use bx_def to define the grid.

Definition at line 428 of file grid_dist_id.hpp.

◆ v_cl

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
Vcluster& grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::v_cl
private

Communicator class.

Definition at line 329 of file grid_dist_id.hpp.

◆ v_sub_unit_factor

template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
size_t grid_dist_id< dim, St, T, Decomposition, Memory, device_grid >::v_sub_unit_factor = 64
private

Number of sub-sub-domain for each processor.

Definition at line 458 of file grid_dist_id.hpp.


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