Flow123d  master-f44eb46
Public Member Functions | Private Member Functions | List of all members
SparseGraphMETIS Class Reference

#include <sparse_graph.hh>

Inheritance diagram for SparseGraphMETIS:
Inheritance graph
[legend]
Collaboration diagram for SparseGraphMETIS:
Collaboration graph
[legend]

Public Member Functions

 SparseGraphMETIS (int n_vtxs, MPI_Comm comm)
 
 SparseGraphMETIS (const Distribution &distr)
 
virtual void partition (int *loc_part)
 
- Public Member Functions inherited from SparseGraph
 SparseGraph (const Distribution &distr)
 
 SparseGraph (int loc_size, MPI_Comm comm)
 
void set_edge (const int a, const int b, int weight=1)
 
void set_vtx_position (const int vtx, const float xyz[3], int weight=1)
 
void finalize ()
 Make sparse graph structures: rows, adj. More...
 
bool check_subgraph_connectivity (int *part)
 
void DFS (int vtx)
 
Distribution get_distr ()
 
void view ()
 
bool is_symmetric ()
 
virtual ~SparseGraph ()
 

Private Member Functions

virtual void allocate_sparse_graph (int lsize_vtxs, int lsize_adj)
 
virtual ~SparseGraphMETIS ()
 

Additional Inherited Members

- Protected Attributes inherited from SparseGraph
Distribution vtx_distr
 distribution of vertexes More...
 
int * rows
 
float * vtx_XYZ
 optional vertex coordinates (global array) More...
 
int * vtx_weights
 Vertex weights for computations (optional). More...
 
int * adj
 sparse adjency More...
 
int * adj_weights
 
int * part_to_check
 created partitioning used through check of connectivity More...
 
int proc_to_check
 subgraph to check More...
 
std::vector< int > checked_vtx
 coloring of DFS algorithm More...
 
vector< stack< Edge > > adj_of_proc
 storage for graph edges for individual processors More...
 

Detailed Description

Sparse Graph that use METIS for partitioning.

Definition at line 207 of file sparse_graph.hh.

Constructor & Destructor Documentation

◆ SparseGraphMETIS() [1/2]

SparseGraphMETIS::SparseGraphMETIS ( int  n_vtxs,
MPI_Comm  comm 
)
inline

Construct empty graph only from number of vertices, use localized distribution in order to use sequential METIS library.

Definition at line 214 of file sparse_graph.hh.

◆ SparseGraphMETIS() [2/2]

SparseGraphMETIS::SparseGraphMETIS ( const Distribution distr)
inline

Construct empty graph with given distribution of vertices.

Definition at line 220 of file sparse_graph.hh.

◆ ~SparseGraphMETIS()

SparseGraphMETIS::~SparseGraphMETIS ( )
privatevirtual

Definition at line 472 of file sparse_graph.cc.

Member Function Documentation

◆ allocate_sparse_graph()

void SparseGraphMETIS::allocate_sparse_graph ( int  lsize_vtxs,
int  lsize_adj 
)
privatevirtual

Use virtual method for allocation since for PETSC interface we have to use PetscMalloc.

Implements SparseGraph.

Definition at line 371 of file sparse_graph.cc.

◆ partition()

void SparseGraphMETIS::partition ( int *  loc_part)
virtual

Implementation of partitioning using METIS.

Implements SparseGraph.

Definition at line 379 of file sparse_graph.cc.


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