OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
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.
 
 ~DistParmetis ()
 destructor
 
void initSubGraph (Graph &sub_g)
 Set the Sub-graph.
 
template<unsigned int i>
void decompose (Graph &sub_g)
 Decompose the graph.
 
template<unsigned int i>
void refine (Graph &sub_g)
 Refine the graph.
 
idx_t * getPartition ()
 Get graph partition vector.
 
void reset (Graph &sub_g)
 Reset graph and reconstruct it.
 

Private Member Functions

void constructAdjList (Graph &sub_g)
 Construct Adjacency list.
 

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

◆ DistParmetis()

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.

◆ ~DistParmetis()

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

◆ constructAdjList()

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.

◆ decompose()

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 400 of file parmetis_dist_util.hpp.

◆ getPartition()

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 446 of file parmetis_dist_util.hpp.

◆ initSubGraph()

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 302 of file parmetis_dist_util.hpp.

◆ refine()

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 428 of file parmetis_dist_util.hpp.

◆ reset()

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

Reset graph and reconstruct it.

Parameters
sub_ggraph to decompose

Definition at line 456 of file parmetis_dist_util.hpp.

Field Documentation

◆ comm

template<typename Graph >
MPI_Comm DistParmetis< Graph >::comm = (MPI_Comm)NULL
private

Communticator for OpenMPI.

Definition at line 103 of file parmetis_dist_util.hpp.

◆ Mg

template<typename Graph >
Parmetis_dist_graph DistParmetis< Graph >::Mg
private

Graph in parmetis reppresentation.

Definition at line 100 of file parmetis_dist_util.hpp.

◆ nc

template<typename Graph >
size_t DistParmetis< Graph >::nc = 0
private

nc Number of partition

Definition at line 112 of file parmetis_dist_util.hpp.

◆ p_id

template<typename Graph >
int DistParmetis< Graph >::p_id = 0
private

Process rank information.

Definition at line 109 of file parmetis_dist_util.hpp.

◆ v_cl

template<typename Graph >
Vcluster& DistParmetis< Graph >::v_cl
private

VCluster.

Definition at line 106 of file parmetis_dist_util.hpp.


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