Class that distribute sub-sub-domains across processors using an hilbert curve to divide the space. More...
Class that distribute sub-sub-domains across processors using an hilbert curve to divide the space.
Definition at line 24 of file SpaceDistribution.hpp.
#include <SpaceDistribution.hpp>
Public Member Functions | |
| SpaceDistribution (Vcluster &v_cl) | |
| SpaceDistribution (const ParMetisDistribution< dim, T > &pm) | |
| SpaceDistribution (SpaceDistribution< dim, T > &&pm) | |
| void | createCartGraph (grid_sm< dim, void > &grid, Box< dim, T > dom) | 
| Create the Cartesian graph.  More... | |
| Graph_CSR< nm_v, nm_e > & | getGraph () | 
| Get the current graph (main)  More... | |
| void | decompose () | 
| Create the decomposition.  More... | |
| void | refine () | 
| Refine current decomposition.  More... | |
| float | getUnbalance () | 
| Compute the unbalance of the processor compared to the optimal balance.  More... | |
| void | getSubSubDomainPosition (size_t id, T(&pos)[dim]) | 
| function that return the position of the vertex in the space  More... | |
| void | setComputationCost (size_t id, size_t weight) | 
| Function that set the weight of the vertex.  More... | |
| bool | weightsAreUsed () | 
| Checks if weights are used on the vertices.  More... | |
| size_t | getSubSubDomainComputationCost (size_t id) | 
| function that get the weight of the vertex  More... | |
| size_t | getProcessorLoad () | 
| Compute the processor load counting the total weights of its vertices.  More... | |
| void | setMigrationCost (size_t id, size_t migration) | 
| Set migration cost of the vertex id.  More... | |
| void | setCommunicationCost (size_t v_id, size_t e, size_t communication) | 
| Set communication cost of the edge id.  More... | |
| size_t | getNSubSubDomains () | 
| Returns total number of sub-sub-domains in the distribution graph.  More... | |
| size_t | getNSubSubDomainNeighbors (size_t id) | 
| Returns total number of neighbors of the sub-sub-domain id.  More... | |
| void | write (const std::string &file) | 
| Print the current distribution and save it to VTK file.  More... | |
| const SpaceDistribution< dim, T > & | operator= (const SpaceDistribution< dim, T > &dist) | 
| const SpaceDistribution< dim, T > & | operator= (SpaceDistribution< dim, T > &&dist) | 
| size_t | get_ndec () | 
| It return the decomposition id.  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.  | |
      
  | 
  inline | 
Constructor
| v_cl | Vcluster to use as communication object in this class | 
Definition at line 45 of file SpaceDistribution.hpp.
      
  | 
  inline | 
Copy constructor
| pm | Distribution to copy | 
Definition at line 55 of file SpaceDistribution.hpp.
      
  | 
  inline | 
Copy constructor
| pm | Distribution to copy | 
Definition at line 66 of file SpaceDistribution.hpp.
      
  | 
  inline | 
Create the Cartesian graph.
| grid | info | 
| dom | domain | 
Definition at line 77 of file SpaceDistribution.hpp.
      
  | 
  inline | 
Create the decomposition.
Definition at line 114 of file SpaceDistribution.hpp.
      
  | 
  inline | 
It return the decomposition id.
It just return 0
Definition at line 390 of file SpaceDistribution.hpp.
      
  | 
  inline | 
Get the current graph (main)
Definition at line 106 of file SpaceDistribution.hpp.
      
  | 
  inline | 
Returns total number of neighbors of the sub-sub-domain id.
| id | id of the sub-sub-domain | 
Definition at line 348 of file SpaceDistribution.hpp.
      
  | 
  inline | 
Returns total number of sub-sub-domains in the distribution graph.
Definition at line 339 of file SpaceDistribution.hpp.
      
  | 
  inline | 
Compute the processor load counting the total weights of its vertices.
Definition at line 298 of file SpaceDistribution.hpp.
      
  | 
  inline | 
function that get the weight of the vertex
| id | vertex id | 
Definition at line 289 of file SpaceDistribution.hpp.
      
  | 
  inline | 
function that return the position of the vertex in the space
| id | vertex id | 
| pos | vector that will contain x, y, z | 
Definition at line 248 of file SpaceDistribution.hpp.
      
  | 
  inline | 
Compute the unbalance of the processor compared to the optimal balance.
Definition at line 237 of file SpaceDistribution.hpp.
      
  | 
  inline | 
Refine current decomposition.
Has no effect in this case
Definition at line 228 of file SpaceDistribution.hpp.
      
  | 
  inline | 
Set communication cost of the edge id.
| v_id | Id of the source vertex of the edge | 
| e | i child of the vertex | 
| communication | Communication value | 
Definition at line 330 of file SpaceDistribution.hpp.
      
  | 
  inline | 
Function that set the weight of the vertex.
| id | vertex id | 
| weight | to give to the vertex | 
Definition at line 268 of file SpaceDistribution.hpp.
      
  | 
  inline | 
Set migration cost of the vertex id.
| id | of the vertex to update | 
| migration | cost of the migration | 
Definition at line 320 of file SpaceDistribution.hpp.
      
  | 
  inline | 
Checks if weights are used on the vertices.
Definition at line 277 of file SpaceDistribution.hpp.
      
  | 
  inline | 
Print the current distribution and save it to VTK file.
| file | filename | 
Definition at line 358 of file SpaceDistribution.hpp.