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

#include <sparse_graph.hh>

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

Public Member Functions

 SparseGraphPETSC (int n_vtxs, MPI_Comm comm)
 
 SparseGraphPETSC (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 ~SparseGraphPETSC ()
 

Private Attributes

Mat petsc_adj_mat
 
MatPartitioning petsc_part
 
IS part_IS
 

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 PETSC for partitioning.

Definition at line 172 of file sparse_graph.hh.

Constructor & Destructor Documentation

◆ SparseGraphPETSC() [1/2]

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

Construct empty graph only from number of vertices, use default initial distribution.

Definition at line 180 of file sparse_graph.hh.

◆ SparseGraphPETSC() [2/2]

SparseGraphPETSC::SparseGraphPETSC ( const Distribution distr)
inline

Construct empty graph with given distribution of vertices.

Definition at line 186 of file sparse_graph.hh.

◆ ~SparseGraphPETSC()

SparseGraphPETSC::~SparseGraphPETSC ( )
privatevirtual

Definition at line 352 of file sparse_graph.cc.

Member Function Documentation

◆ allocate_sparse_graph()

void SparseGraphPETSC::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 325 of file sparse_graph.cc.

◆ partition()

void SparseGraphPETSC::partition ( int *  loc_part)
virtual

Implementation of partitioning using PETSC interface to various partitioning software.

Implements SparseGraph.

Definition at line 333 of file sparse_graph.cc.

Member Data Documentation

◆ part_IS

IS SparseGraphPETSC::part_IS
private

Definition at line 196 of file sparse_graph.hh.

◆ petsc_adj_mat

Mat SparseGraphPETSC::petsc_adj_mat
private

Definition at line 194 of file sparse_graph.hh.

◆ petsc_part

MatPartitioning SparseGraphPETSC::petsc_part
private

Definition at line 195 of file sparse_graph.hh.


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