8#ifndef SRC_DECOMPOSITION_CARTDECOMPOSITION_EXT_HPP_
9#define SRC_DECOMPOSITION_CARTDECOMPOSITION_EXT_HPP_
11#include "memory/HeapMemory.hpp"
12#include "Decomposition/Distribution/ParMetisDistribution.hpp"
13#include "Space/Ghost.hpp"
14#include "Decomposition/nn_processor.hpp"
57 typedef ::Box<dim,T> b;
67 for (
size_t j = 0 ; j < dim ; j++)
70 box.
setLow(j,ext_dom.getLow(j));
75 box.
setHigh(j,ext_dom.getHigh(j));
84 this->
bbox.enclose(box);
159 this->initialize_fine_s(ext_domain);
160 this->construct_fine_s();
223 this->
cd.setDimensions(ext_domain, dec.
gr.
getSize(), 0);
236 this->
domain = ext_domain;
240 for (
size_t i = 0 ; i < dim ; i++)
246 for (
size_t i = 0 ; i < dim ; i++)
247 this->
bc[i] = dec.
bc[i];
This class represent an N-dimensional box.
__device__ __host__ void setHigh(int i, T val)
set the high interval of the box
__device__ __host__ void setLow(int i, T val)
set the low interval of the box
This class decompose a space into sub-sub-domains and distribute them across processors.
CartDecomposition_ext(Vcluster<> &v_cl)
Cartesian decomposition constructor.
CartDecomposition< dim, T, Memory, layout_base, Distribution > base_type
The non-extended decomposition base class.
void extend_subdomains(const CartDecomposition< dim, T, Memory, layout_base, Distribution > &dec, const ::Box< dim, T > &ext_dom)
It copy the sub-domains into another CartesianDecomposition object extending them.
void setParameters(const CartDecomposition< dim, T, Memory, layout_base, Distribution > &dec, const Ghost< dim, T > &g, const ::Box< dim, T > &ext_domain)
It create another object that contain the same decomposition information but with different ghost box...
void reconstruct_fine_s_from_extended_domain(const ::Box< dim, T > &ext_domain)
Extend the fines for the new Cartesian decomposition.
This class decompose a space into sub-sub-domains and distribute them across processors.
void calculateGhostBoxes()
It calculate the internal ghost boxes.
Vcluster & v_cl
Runtime virtual cluster machine.
Ghost< dim, T > ghost
ghost info
openfpm::vector< openfpm::vector< long unsigned int > > box_nn_processor
for each sub-domain, contain the list of the neighborhood processors
::Box< dim, T > bbox
Processor bounding box.
CellDecomposer_sm< dim, T, shift< dim, T > > cd
T spacing[dim]
Box Spacing.
grid_sm< dim, void > gr
Structure that store the cartesian grid information.
Distribution dist
Create distribution.
openfpm::vector< SpaceBox< dim, T >, Memory, layout_base > sub_domains
the set of all local sub-domain as vector
size_t bc[dim]
Boundary condition info.
::Box< dim, T > domain
rectangular domain to decompose
void Initialize_geo_cell_lists()
Initialize geo_cell lists.
Class that distribute sub-sub-domains across processors using ParMetis Library.
Implementation of VCluster class.
void setDimensions(const size_t(&dims)[N])
Reset the dimension of the grid.
__device__ __host__ const size_t(& getSize() const)[N]
Return the size of the grid as an array.
void create(openfpm::vector< SpaceBox< dim, T >, Memory, layout_base > &sub_domains, Box< dim, T > &domain, Ghost< dim, T > &ghost, const size_t(&bc)[dim])
Create external and internal local ghosts.
void applyBC(openfpm::vector< Box_loc_sub< dim, T > > &sub_domains, const Box< dim, T > &domain, const Ghost< dim, T > &ghost, const size_t(&bc)[dim])
In case of periodic boundary conditions we replicate the sub-domains at the border.
This class store the adjacent processors and the adjacent sub_domains.
Transform the boost::fusion::vector into memory specification (memory_traits)