Flow123d  release_3.0.0-1124-g41e620f
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::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::SparseGraphPETSC ( const Distribution distr)
inline

Construct empty graph with given distribution of vertices.

Definition at line 186 of file sparse_graph.hh.

SparseGraphPETSC::~SparseGraphPETSC ( )
privatevirtual

Definition at line 351 of file sparse_graph.cc.

Member Function Documentation

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 324 of file sparse_graph.cc.

void SparseGraphPETSC::partition ( int *  loc_part)
virtual

Implementation of partitioning using PETSC interface to various partitioning software.

Implements SparseGraph.

Definition at line 332 of file sparse_graph.cc.

Member Data Documentation

IS SparseGraphPETSC::part_IS
private

Definition at line 196 of file sparse_graph.hh.

Mat SparseGraphPETSC::petsc_adj_mat
private

Definition at line 194 of file sparse_graph.hh.

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: