Class that distribute sub-sub-domains across processors using Metis Library. More...
Class that distribute sub-sub-domains across processors using Metis Library.
Given a graph and setting Computational cost, Communication cost (on the edge) and Migration cost or total Communication costs, it produce the optimal distribution
Definition at line 30 of file MetisDistribution.hpp.
#include <MetisDistribution.hpp>
Data Structures | |
| struct | met_sub_w | 
| sub-domain list and weight  More... | |
Public Member Functions | |
| MetisDistribution (Vcluster &v_cl) | |
| constructor  More... | |
| MetisDistribution (const MetisDistribution &mt) | |
| Copy constructor.  More... | |
| MetisDistribution (MetisDistribution &&mt) | |
| Copy constructor.  More... | |
| ~MetisDistribution () | |
| Destructor.  More... | |
| void | createCartGraph (grid_sm< dim, void > &grid, Box< dim, T > dom) | 
| create a Cartesian distribution graph  More... | |
| Graph_CSR< nm_v, nm_e > & | getGraph () | 
| Get the current graph (main)  More... | |
| void | decompose () | 
| Distribute the sub-sub-domains.  More... | |
| void | refine () | 
| Refine current decomposition.  More... | |
| void | redecompose () | 
| Redecompose current decomposition.  More... | |
| void | getSSDomainPos (size_t id, T(&pos)[dim]) | 
| Function that return the position (point P1) of the sub-sub domain box in the space.  More... | |
| size_t | getComputationalCost (size_t id) | 
| function that get the computational cost of the sub-sub-domain  More... | |
| void | setComputationCost (size_t id, size_t cost) | 
| Set computation cost on a sub-sub domain.  More... | |
| void | setMigrationCost (size_t id, size_t cost) | 
| Set migration cost on a sub-sub domain.  More... | |
| void | setCommunicationCost (size_t id, size_t e, size_t cost) | 
| Set communication cost between neighborhood sub-sub-domains (weight on the edge)  More... | |
| size_t | getNSubSubDomains () | 
| Returns total number of sub-sub-domains.  More... | |
| size_t | getNSubSubDomainNeighbors (size_t id) | 
| Returns total number of neighbors of one sub-sub-domain.  More... | |
| float | getUnbalance () | 
| Compute the unbalance of the processor compared to the optimal balance.  More... | |
| size_t | getNOwnerSubSubDomains () const | 
| Return the total number of sub-sub-domains in the distribution graph.  More... | |
| size_t | getOwnerSubSubDomain (size_t id) const | 
| Return the id of the set sub-sub-domain.  More... | |
| void | onTest () | 
| It set the Classs on test mode.  More... | |
| void | write (std::string out) | 
| Write the distribution graph into file.  More... | |
| size_t | getProcessorLoad () | 
| Compute the processor load.  More... | |
| MetisDistribution & | operator= (const MetisDistribution &mt) | 
| operator=  More... | |
| MetisDistribution & | operator= (MetisDistribution &&mt) | 
| operator=  More... | |
| bool | operator== (const MetisDistribution &mt) | 
| operator==  More... | |
| void | setDistTol (double tol) | 
| Set the tolerance for each partition.  More... | |
| size_t | getSubSubDomainComputationCost (size_t id) | 
| function that get the weight of the vertex  More... | |
| size_t | get_ndec () | 
| Get the decomposition counter.  More... | |
Static Public Attributes | |
| static constexpr unsigned int | computation = nm_v::computation | 
Private Member Functions | |
| void | check_overflow (size_t id) | 
| Check that the sub-sub-domain id exist.  More... | |
| void | check_overflowe (size_t id, size_t e) | 
| Check that the sub-sub-domain id exist.  More... | |
Private Attributes | |
| Vcluster & | v_cl | 
| Vcluster.  | |
| grid_sm< dim, void > | gr | 
| Structure that store the cartesian grid information.  | |
| Box< dim, T > | domain | 
| rectangular domain to decompose  | |
| Graph_CSR< nm_v, nm_e > | gp | 
| Global sub-sub-domain graph.  | |
| bool | testing = false | 
| Flag that indicate if we are doing a test (In general it fix the seed)  | |
| Metis< Graph_CSR< nm_v, nm_e > > | metis_graph | 
| Metis decomposer utility.  | |
| 
std::unordered_map< size_t,  size_t >  | owner_scs | 
| unordered map that map global sub-sub-domain to owned_cost_sub id  | |
| openfpm::vector< met_sub_w > | owner_cost_sub | 
| list owned sub-sub-domains set for computation cost  | |
| openfpm::vector< met_sub_w > | recv_ass | 
| received assignment  | |
      
  | 
  inline | 
      
  | 
  inline | 
Copy constructor.
| mt | distribution to copy | 
Definition at line 127 of file MetisDistribution.hpp.
      
  | 
  inline | 
Copy constructor.
| mt | distribution to copy | 
Definition at line 142 of file MetisDistribution.hpp.
      
  | 
  inline | 
Destructor.
Definition at line 155 of file MetisDistribution.hpp.
      
  | 
  inlineprivate | 
Check that the sub-sub-domain id exist.
| id | sub-sub-domain id | 
Definition at line 78 of file MetisDistribution.hpp.
      
  | 
  inlineprivate | 
Check that the sub-sub-domain id exist.
| id | sub-sub-domain id | 
Definition at line 94 of file MetisDistribution.hpp.
      
  | 
  inline | 
create a Cartesian distribution graph
| grid | grid info (sub-sub somains on each dimension) | 
| dom | domain (domain where the sub-sub-domains are defined) | 
Definition at line 169 of file MetisDistribution.hpp.
      
  | 
  inline | 
Distribute the sub-sub-domains.
Definition at line 217 of file MetisDistribution.hpp.
      
  | 
  inline | 
Get the decomposition counter.
Definition at line 665 of file MetisDistribution.hpp.
      
  | 
  inline | 
function that get the computational cost of the sub-sub-domain
| id | sub-sub-domain | 
Definition at line 346 of file MetisDistribution.hpp.
      
  | 
  inline | 
Get the current graph (main)
Definition at line 206 of file MetisDistribution.hpp.
      
  | 
  inline | 
Return the total number of sub-sub-domains in the distribution graph.
Definition at line 484 of file MetisDistribution.hpp.
      
  | 
  inline | 
Returns total number of neighbors of one sub-sub-domain.
| id | of the sub-sub-domain | 
Definition at line 436 of file MetisDistribution.hpp.
      
  | 
  inline | 
Returns total number of sub-sub-domains.
Definition at line 424 of file MetisDistribution.hpp.
      
  | 
  inline | 
Return the id of the set sub-sub-domain.
| id | id in the list of the set sub-sub-domains | 
Definition at line 496 of file MetisDistribution.hpp.
      
  | 
  inline | 
Compute the processor load.
Definition at line 536 of file MetisDistribution.hpp.
      
  | 
  inline | 
Function that return the position (point P1) of the sub-sub domain box in the space.
| id | vertex id | 
| pos | vector that contain x, y, z | 
Definition at line 325 of file MetisDistribution.hpp.
      
  | 
  inline | 
function that get the weight of the vertex
| id | vertex id | 
Definition at line 642 of file MetisDistribution.hpp.
      
  | 
  inline | 
Compute the unbalance of the processor compared to the optimal balance.
Definition at line 454 of file MetisDistribution.hpp.
      
  | 
  inline | 
It set the Classs on test mode.
At the moment it fix the seed to have reproducible results
Definition at line 506 of file MetisDistribution.hpp.
      
  | 
  inline | 
operator=
| mt | object to copy | 
Definition at line 568 of file MetisDistribution.hpp.
      
  | 
  inline | 
operator=
| mt | object to copy | 
Definition at line 589 of file MetisDistribution.hpp.
      
  | 
  inline | 
operator==
| mt | Metis distribution to compare with | 
Definition at line 610 of file MetisDistribution.hpp.
      
  | 
  inline | 
Redecompose current decomposition.
Definition at line 310 of file MetisDistribution.hpp.
      
  | 
  inline | 
Refine current decomposition.
In metis case it just re-decompose
Definition at line 298 of file MetisDistribution.hpp.
      
  | 
  inline | 
Set communication cost between neighborhood sub-sub-domains (weight on the edge)
| id | sub-sub domain | 
| e | id in the neighborhood list (id in the adjacency list) | 
| cost | 
Definition at line 406 of file MetisDistribution.hpp.
      
  | 
  inline | 
Set computation cost on a sub-sub domain.
| id | sub-sub domain id | 
| cost | 
Definition at line 362 of file MetisDistribution.hpp.
      
  | 
  inline | 
Set the tolerance for each partition.
| tol | tolerance | 
Definition at line 630 of file MetisDistribution.hpp.
      
  | 
  inline | 
Set migration cost on a sub-sub domain.
| id | of the sub-sub domain | 
| cost | 
Definition at line 388 of file MetisDistribution.hpp.
      
  | 
  inline | 
Write the distribution graph into file.
| out | output filename | 
Definition at line 519 of file MetisDistribution.hpp.