18 #ifndef SPARSE_GRAPH_HH_ 19 #define SPARSE_GRAPH_HH_ 27 #include "petscistypes.h" 79 void set_edge(
const int a,
const int b,
int weight=1);
90 void set_vtx_position(
const int vtx,
const float xyz[3],
int weight=1);
108 virtual void partition(
int *loc_part) = 0;
114 bool check_subgraph_connectivity(
int *part);
159 virtual void allocate_sparse_graph(
int lsize_vtxs,
int lsize_adj)=0;
187 :
SparseGraph(distr), petsc_adj_mat(0), petsc_part(0), part_IS(0) {}
191 virtual void partition(
int *loc_part);
198 virtual void allocate_sparse_graph(
int lsize_vtxs,
int lsize_adj);
226 virtual void partition(
int *loc_part);
229 virtual void allocate_sparse_graph(
int lsize_vtxs,
int lsize_adj);
MatPartitioning petsc_part
SparseGraphMETIS(int n_vtxs, MPI_Comm comm)
ostream & operator<<(ostream &out, const SparseGraph &sg)
Output a sparse graph.
SparseGraphPETSC(int n_vtxs, MPI_Comm comm)
int * part_to_check
created partitioning used through check of connectivity
int weight
Edge weights for communication (optional).
Virtual class for construction and partitioning of a distributed sparse graph.
Distribution vtx_distr
distribution of vertexes
vector< stack< Edge > > adj_of_proc
storage for graph edges for individual processors
int proc_to_check
subgraph to check
std::vector< int > checked_vtx
coloring of DFS algorithm
Support classes for parallel programing.
float * vtx_XYZ
optional vertex coordinates (global array)
SparseGraphMETIS(const Distribution &distr)
SparseGraphPETSC(const Distribution &distr)
int * vtx_weights
Vertex weights for computations (optional).
bool operator<(IntersectionResult a, IntersectionResult b)