FrontISTR  5.7.0
Large-scale structural analysis program with finit element method
hecmw_graph.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2019 FrontISTR Commons
3  * This software is released under the MIT License, see LICENSE.txt
4  *****************************************************************************/
13 #ifndef HECMW_GRAPH_INCLUDED
14 #define HECMW_GRAPH_INCLUDED
15 
16 #include <stdio.h>
17 
18 struct hecmw_varray_int;
19 
23 struct hecmw_graph {
25  int m_num_edge;
27  *m_edge_index;
32  int is_ref;
33 };
34 
40 extern int HECMW_graph_init(struct hecmw_graph *graph
41  );
42 
49  struct hecmw_graph *graph,
50  int num_vertex,
51  int *edge_index,
52  int *edge_item
53  );
54 
57 extern void HECMW_graph_finalize(struct hecmw_graph *graph
58  );
59 
62 extern void HECMW_graph_setNumVertex(
63  struct hecmw_graph *graph,
64  int num_vertex
65  );
66 
72 extern int HECMW_graph_addEdge(
73  struct hecmw_graph *graph,
74  int vert1,
75  int vert2
76  );
77 
80 extern void HECMW_graph_print(
81  const struct hecmw_graph *graph,
82  FILE *fp
83  );
84 
89 extern int HECMW_graph_getNumVertex(
90  const struct hecmw_graph *graph
91  );
92 
97 extern int HECMW_graph_getNumEdge(
98  const struct hecmw_graph *graph
99  );
100 
105 extern const int *HECMW_graph_getEdgeIndex(
106  const struct hecmw_graph *graph
107  );
108 
113 extern const int *HECMW_graph_getEdgeItem(
114  const struct hecmw_graph *graph
115  );
116 
122 extern int HECMW_graph_degeneGraph(
123  struct hecmw_graph *graph,
124  const struct hecmw_graph
125  *refgraph,
126  int num_part,
127  const int *parttab
128  );
129 
130 #endif /* HECMW_GRAPH_INCLUDED */
HECMW_graph_setNumVertex
void HECMW_graph_setNumVertex(struct hecmw_graph *graph, int num_vertex)
Definition: hecmw_graph.c:106
HECMW_graph_finalize
void HECMW_graph_finalize(struct hecmw_graph *graph)
Definition: hecmw_graph.c:97
hecmw_graph::is_ref
int is_ref
Definition: hecmw_graph.h:32
hecmw_graph
Definition: hecmw_graph.h:23
HECMW_graph_getNumVertex
int HECMW_graph_getNumVertex(const struct hecmw_graph *graph)
Definition: hecmw_graph.c:144
HECMW_graph_getEdgeItem
const int * HECMW_graph_getEdgeItem(const struct hecmw_graph *graph)
Definition: hecmw_graph.c:156
hecmw_varray_int
varray int
Definition: hecmw_varray_int_f.f90:7
HECMW_graph_print
void HECMW_graph_print(const struct hecmw_graph *graph, FILE *fp)
Definition: hecmw_graph.c:123
hecmw_graph::m_edge_index
struct hecmw_varray_int * m_edge_index
Definition: hecmw_graph.h:26
HECMW_graph_addEdge
int HECMW_graph_addEdge(struct hecmw_graph *graph, int vert1, int vert2)
Definition: hecmw_graph.c:114
hecmw_graph::m_edge_item
struct hecmw_varray_int * m_edge_item
Definition: hecmw_graph.h:28
HECMW_graph_init_with_arrays
int HECMW_graph_init_with_arrays(struct hecmw_graph *graph, int num_vertex, int *edge_index, int *edge_item)
Definition: hecmw_graph.c:73
HECMW_graph_getNumEdge
int HECMW_graph_getNumEdge(const struct hecmw_graph *graph)
Definition: hecmw_graph.c:148
HECMW_graph_getEdgeIndex
const int * HECMW_graph_getEdgeIndex(const struct hecmw_graph *graph)
Definition: hecmw_graph.c:152
HECMW_graph_init
int HECMW_graph_init(struct hecmw_graph *graph)
Definition: hecmw_graph.c:55
hecmw_graph::m_vertex_weight
struct hecmw_varray_int * m_vertex_weight
Definition: hecmw_graph.h:30
hecmw_graph::m_num_edge
int m_num_edge
Definition: hecmw_graph.h:25
hecmw_graph::m_num_vertex
int m_num_vertex
Definition: hecmw_graph.h:24
HECMW_graph_degeneGraph
int HECMW_graph_degeneGraph(struct hecmw_graph *graph, const struct hecmw_graph *refgraph, int num_part, const int *parttab)
Definition: hecmw_graph.c:160