OpenFPM_pdata  1.1.0
Project that contain the implementation of distributed structures
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Pages
DistParmetis< Graph > Class Template Reference

Helper class to define Metis graph. More...

Detailed Description

template<typename Graph>
class DistParmetis< Graph >

Helper class to define Metis graph.

TODO Transform pointer to openfpm vector

Template Parameters
graphstructure that store the graph

Definition at line 97 of file parmetis_dist_util.hpp.

#include <parmetis_dist_util.hpp>

Public Member Functions

 DistParmetis (Vcluster &v_cl, size_t nc)
 Constructor. More...
 
 ~DistParmetis ()
 destructor More...
 
void initSubGraph (Graph &sub_g)
 Set the Sub-graph. More...
 
template<unsigned int i>
void decompose (Graph &sub_g)
 Decompose the graph. More...
 
template<unsigned int i>
void refine (Graph &sub_g)
 Refine the graph. More...
 
idx_t * getPartition ()
 Get graph partition vector. More...
 
void reset (Graph &sub_g)
 Reset graph and reconstruct it. More...
 

Private Member Functions

void constructAdjList (Graph &sub_g)
 Construct Adjacency list. More...
 

Private Attributes

Parmetis_dist_graph Mg
 Graph in parmetis reppresentation.
 
MPI_Comm comm = (MPI_Comm)NULL
 Communticator for OpenMPI.
 
Vclusterv_cl
 VCluster.
 
int p_id = 0
 Process rank information.
 
size_t nc = 0
 nc Number of partition
 

Constructor & Destructor Documentation

template<typename Graph>
DistParmetis< Graph >::DistParmetis ( Vcluster v_cl,
size_t  nc 
)
inline

Constructor.

Construct a metis graph from a Graph_CSR

Parameters
v_clVcluster
ncnumber of partitions

Definition at line 181 of file parmetis_dist_util.hpp.

template<typename Graph>
DistParmetis< Graph >::~DistParmetis ( )
inline

destructor

Destructor, It destroy all the memory allocated

Definition at line 213 of file parmetis_dist_util.hpp.

Member Function Documentation

template<typename Graph>
void DistParmetis< Graph >::constructAdjList ( Graph &  sub_g)
inlineprivate

Construct Adjacency list.

Parameters
sub_ggraph in which we construct the adjacency list

starting point in the adjacency list

Definition at line 119 of file parmetis_dist_util.hpp.

template<typename Graph>
template<unsigned int i>
void DistParmetis< Graph >::decompose ( Graph &  sub_g)
inline

Decompose the graph.

Template Parameters
iwhich property store the decomposition
Parameters
sub_ggraph to decompose

Definition at line 366 of file parmetis_dist_util.hpp.

template<typename Graph>
idx_t* DistParmetis< Graph >::getPartition ( )
inline

Get graph partition vector.

Returns
the partition or the assignment of each sub-sub-domain

Definition at line 412 of file parmetis_dist_util.hpp.

template<typename Graph>
void DistParmetis< Graph >::initSubGraph ( Graph &  sub_g)
inline

Set the Sub-graph.

Parameters
sub_gSub-graph to set

Set option for the graph partitioning (set as default)

adaptiveRepart itr value

init tpwgts to have balanced vertices and ubvec

This is used to indicate the numbering scheme that is used for the vtxdist, xadj, adjncy, and part arrays. (0 for C-style, start from 0 index)

This is used to indicate if the graph is weighted.

Definition at line 292 of file parmetis_dist_util.hpp.

template<typename Graph>
template<unsigned int i>
void DistParmetis< Graph >::refine ( Graph &  sub_g)
inline

Refine the graph.

Template Parameters
iwhich property store the refined decomposition
Parameters
sub_ggraph to decompose

Definition at line 394 of file parmetis_dist_util.hpp.

template<typename Graph>
void DistParmetis< Graph >::reset ( Graph &  sub_g)
inline

Reset graph and reconstruct it.

Parameters
sub_ggraph to decompose

Definition at line 422 of file parmetis_dist_util.hpp.


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