ADflow
v1.0
ADflow is a finite volume RANS solver tailored for gradient-based aerodynamic design optimization.
src
metis-4.0
struct.h
Go to the documentation of this file.
1
/*
2
* Copyright 1997, Regents of the University of Minnesota
3
*
4
* struct.h
5
*
6
* This file contains data structures for ILU routines.
7
*
8
* Started 9/26/95
9
* George
10
*
11
* $Id$
12
*/
13
14
/* Modified by Edwin van der Weide, 02-12-2003, such that idxtype */
15
/* is set to the integer type used in the entire code. */
16
17
#include <
ADflow_c_types.h
>
18
19
typedef
ADflow_intT
idxtype
;
20
21
#define MAXIDX (((idxtype) 1)<<(8*sizeof(idxtype)-2))
22
23
24
/*************************************************************************
25
* The following data structure stores key-value pair
26
**************************************************************************/
27
struct
KeyValueType
{
28
idxtype
key
;
29
idxtype
val
;
30
};
31
32
typedef
struct
KeyValueType
KeyValueType
;
33
34
35
/*************************************************************************
36
* The following data structure will hold a node of a doubly-linked list.
37
**************************************************************************/
38
struct
ListNodeType
{
39
int
id
;
/* The id value of the node */
40
struct
ListNodeType
*
prev
, *
next
;
/* It's a doubly-linked list */
41
};
42
43
typedef
struct
ListNodeType
ListNodeType
;
44
45
46
47
/*************************************************************************
48
* The following data structure is used to store the buckets for the
49
* refinment algorithms
50
**************************************************************************/
51
struct
PQueueType
{
52
int
type
;
/* The type of the representation used */
53
int
nnodes
;
54
int
maxnodes
;
55
int
mustfree
;
56
57
/* Linear array version of the data structures */
58
int
pgainspan
,
ngainspan
;
/* plus and negative gain span */
59
int
maxgain
;
60
ListNodeType
*
nodes
;
61
ListNodeType
**
buckets
;
62
63
/* Heap version of the data structure */
64
KeyValueType
*
heap
;
65
idxtype
*
locator
;
66
};
67
68
typedef
struct
PQueueType
PQueueType
;
69
70
71
/*************************************************************************
72
* The following data structure stores an edge
73
**************************************************************************/
74
struct
edegreedef
{
75
idxtype
pid
;
76
idxtype
ed
;
77
};
78
typedef
struct
edegreedef
EDegreeType
;
79
80
81
/*************************************************************************
82
* The following data structure stores an edge for vol
83
**************************************************************************/
84
struct
vedegreedef
{
85
idxtype
pid
;
86
idxtype
ed
,
ned
;
87
idxtype
gv
;
88
};
89
typedef
struct
vedegreedef
VEDegreeType
;
90
91
92
/*************************************************************************
93
* This data structure holds various working space data
94
**************************************************************************/
95
struct
workspacedef
{
96
idxtype
*
core
;
/* Where pairs, indices, and degrees are coming from */
97
int
maxcore
,
ccore
;
98
99
EDegreeType
*
edegrees
;
100
VEDegreeType
*
vedegrees
;
101
int
cdegree
;
102
103
idxtype
*
auxcore
;
/* This points to the memory of the edegrees */
104
105
idxtype
*
pmat
;
/* An array of k^2 used for eliminating domain
106
connectivity in k-way refinement */
107
};
108
109
typedef
struct
workspacedef
WorkSpaceType
;
110
111
112
/*************************************************************************
113
* The following data structure holds information on degrees for k-way
114
* partition
115
**************************************************************************/
116
struct
rinfodef
{
117
int
id
,
ed
;
/* ID/ED of nodes */
118
int
ndegrees
;
/* The number of different ext-degrees */
119
EDegreeType
*
edegrees
;
/* List of edges */
120
};
121
122
typedef
struct
rinfodef
RInfoType
;
123
124
125
/*************************************************************************
126
* The following data structure holds information on degrees for k-way
127
* vol-based partition
128
**************************************************************************/
129
struct
vrinfodef
{
130
int
id
,
ed
,
nid
;
/* ID/ED of nodes */
131
int
gv
;
/* IV/EV of nodes */
132
int
ndegrees
;
/* The number of different ext-degrees */
133
VEDegreeType
*
edegrees
;
/* List of edges */
134
};
135
136
typedef
struct
vrinfodef
VRInfoType
;
137
138
139
/*************************************************************************
140
* The following data structure holds information on degrees for k-way
141
* partition
142
**************************************************************************/
143
struct
nrinfodef
{
144
idxtype
edegrees
[2];
145
};
146
147
typedef
struct
nrinfodef
NRInfoType
;
148
149
150
/*************************************************************************
151
* This data structure holds the input graph
152
**************************************************************************/
153
struct
graphdef
{
154
idxtype
*
gdata
, *
rdata
;
/* Memory pools for graph and refinement data.
155
This is where memory is allocated and used
156
the rest of the fields in this structure */
157
158
int
nvtxs
,
nedges
;
/* The # of vertices and edges in the graph */
159
idxtype
*
xadj
;
/* Pointers to the locally stored vertices */
160
idxtype
*
vwgt
;
/* Vertex weights */
161
idxtype
*
vsize
;
/* Vertex sizes for min-volume formulation */
162
idxtype
*
adjncy
;
/* Array that stores the adjacency lists of nvtxs */
163
idxtype
*
adjwgt
;
/* Array that stores the weights of the adjacency lists */
164
165
idxtype
*
adjwgtsum
;
/* The sum of the adjacency weight of each vertex */
166
167
idxtype
*
label
;
168
169
idxtype
*
cmap
;
170
171
/* Partition parameters */
172
int
mincut
,
minvol
;
173
idxtype
*
where
, *
pwgts
;
174
int
nbnd
;
175
idxtype
*
bndptr
, *
bndind
;
176
177
/* Bisection refinement parameters */
178
idxtype
*
id
, *
ed
;
179
180
/* K-way refinement parameters */
181
RInfoType
*
rinfo
;
182
183
/* K-way volume refinement parameters */
184
VRInfoType
*
vrinfo
;
185
186
/* Node refinement information */
187
NRInfoType
*
nrinfo
;
188
189
190
/* Additional info needed by the MOC routines */
191
int
ncon
;
/* The # of constrains */
192
float
*
nvwgt
;
/* Normalized vertex weights */
193
float
*
npwgts
;
/* The normalized partition weights */
194
195
struct
graphdef
*
coarser
, *
finer
;
196
};
197
198
typedef
struct
graphdef
GraphType
;
199
200
201
202
/*************************************************************************
203
* The following data type implements a timer
204
**************************************************************************/
205
typedef
double
timer
;
206
207
208
/*************************************************************************
209
* The following structure stores information used by Metis
210
**************************************************************************/
211
struct
controldef
{
212
int
CoarsenTo
;
/* The # of vertices in the coarsest graph */
213
int
dbglvl
;
/* Controls the debuging output of the program */
214
int
CType
;
/* The type of coarsening */
215
int
IType
;
/* The type of initial partitioning */
216
int
RType
;
/* The type of refinement */
217
int
maxvwgt
;
/* The maximum allowed weight for a vertex */
218
float
nmaxvwgt
;
/* The maximum allowed weight for a vertex for each constrain */
219
int
optype
;
/* Type of operation */
220
int
pfactor
;
/* .1*prunning factor */
221
int
nseps
;
/* The number of separators to be found during multiple bisections */
222
int
oflags
;
223
224
WorkSpaceType
wspace
;
/* Work Space Informations */
225
226
/* Various Timers */
227
timer
TotalTmr
,
InitPartTmr
,
MatchTmr
,
ContractTmr
,
CoarsenTmr
,
UncoarsenTmr
,
228
SepTmr
,
RefTmr
,
ProjectTmr
,
SplitTmr
,
AuxTmr1
,
AuxTmr2
,
AuxTmr3
,
AuxTmr4
,
AuxTmr5
,
AuxTmr6
;
229
230
};
231
232
typedef
struct
controldef
CtrlType
;
233
234
235
/*************************************************************************
236
* The following data structure stores max-partition weight info for
237
* Vertical MOC k-way refinement
238
**************************************************************************/
239
struct
vpwgtdef
{
240
float
max
[2][
MAXNCON
];
241
int
imax
[2][
MAXNCON
];
242
};
243
244
typedef
struct
vpwgtdef
VPInfoType
;
ADflow_c_types.h
ADflow_intT
int ADflow_intT
Definition:
ADflow_c_types.h:42
MAXNCON
#define MAXNCON
Definition:
defs.h:20
idxtype
ADflow_intT idxtype
Definition:
struct.h:19
timer
double timer
Definition:
struct.h:205
KeyValueType
Definition:
struct.h:27
KeyValueType::key
idxtype key
Definition:
struct.h:28
KeyValueType::val
idxtype val
Definition:
struct.h:29
ListNodeType
Definition:
struct.h:38
ListNodeType::id
int id
Definition:
struct.h:39
ListNodeType::next
struct ListNodeType * next
Definition:
struct.h:40
ListNodeType::prev
struct ListNodeType * prev
Definition:
struct.h:40
PQueueType
Definition:
struct.h:51
PQueueType::mustfree
int mustfree
Definition:
struct.h:55
PQueueType::locator
idxtype * locator
Definition:
struct.h:65
PQueueType::type
int type
Definition:
struct.h:52
PQueueType::pgainspan
int pgainspan
Definition:
struct.h:58
PQueueType::nodes
ListNodeType * nodes
Definition:
struct.h:60
PQueueType::buckets
ListNodeType ** buckets
Definition:
struct.h:61
PQueueType::maxnodes
int maxnodes
Definition:
struct.h:54
PQueueType::maxgain
int maxgain
Definition:
struct.h:59
PQueueType::heap
KeyValueType * heap
Definition:
struct.h:64
PQueueType::ngainspan
int ngainspan
Definition:
struct.h:58
PQueueType::nnodes
int nnodes
Definition:
struct.h:53
controldef
Definition:
struct.h:211
controldef::AuxTmr3
timer AuxTmr3
Definition:
struct.h:228
controldef::dbglvl
int dbglvl
Definition:
struct.h:213
controldef::ContractTmr
timer ContractTmr
Definition:
struct.h:227
controldef::wspace
WorkSpaceType wspace
Definition:
struct.h:224
controldef::ProjectTmr
timer ProjectTmr
Definition:
struct.h:228
controldef::AuxTmr2
timer AuxTmr2
Definition:
struct.h:228
controldef::pfactor
int pfactor
Definition:
struct.h:220
controldef::RefTmr
timer RefTmr
Definition:
struct.h:228
controldef::CoarsenTmr
timer CoarsenTmr
Definition:
struct.h:227
controldef::AuxTmr6
timer AuxTmr6
Definition:
struct.h:228
controldef::CType
int CType
Definition:
struct.h:214
controldef::UncoarsenTmr
timer UncoarsenTmr
Definition:
struct.h:227
controldef::InitPartTmr
timer InitPartTmr
Definition:
struct.h:227
controldef::optype
int optype
Definition:
struct.h:219
controldef::IType
int IType
Definition:
struct.h:215
controldef::nseps
int nseps
Definition:
struct.h:221
controldef::maxvwgt
int maxvwgt
Definition:
struct.h:217
controldef::CoarsenTo
int CoarsenTo
Definition:
struct.h:212
controldef::RType
int RType
Definition:
struct.h:216
controldef::SepTmr
timer SepTmr
Definition:
struct.h:228
controldef::MatchTmr
timer MatchTmr
Definition:
struct.h:227
controldef::AuxTmr1
timer AuxTmr1
Definition:
struct.h:228
controldef::nmaxvwgt
float nmaxvwgt
Definition:
struct.h:218
controldef::oflags
int oflags
Definition:
struct.h:222
controldef::AuxTmr4
timer AuxTmr4
Definition:
struct.h:228
controldef::AuxTmr5
timer AuxTmr5
Definition:
struct.h:228
controldef::TotalTmr
timer TotalTmr
Definition:
struct.h:227
controldef::SplitTmr
timer SplitTmr
Definition:
struct.h:228
edegreedef
Definition:
struct.h:74
edegreedef::pid
idxtype pid
Definition:
struct.h:75
edegreedef::ed
idxtype ed
Definition:
struct.h:76
graphdef
Definition:
struct.h:153
graphdef::nbnd
int nbnd
Definition:
struct.h:174
graphdef::adjncy
idxtype * adjncy
Definition:
struct.h:162
graphdef::vrinfo
VRInfoType * vrinfo
Definition:
struct.h:184
graphdef::bndind
idxtype * bndind
Definition:
struct.h:175
graphdef::where
idxtype * where
Definition:
struct.h:173
graphdef::rdata
idxtype * rdata
Definition:
struct.h:154
graphdef::nvtxs
int nvtxs
Definition:
struct.h:158
graphdef::gdata
idxtype * gdata
Definition:
struct.h:154
graphdef::ed
idxtype * ed
Definition:
struct.h:178
graphdef::vwgt
idxtype * vwgt
Definition:
struct.h:160
graphdef::nvwgt
float * nvwgt
Definition:
struct.h:192
graphdef::minvol
int minvol
Definition:
struct.h:172
graphdef::nrinfo
NRInfoType * nrinfo
Definition:
struct.h:187
graphdef::adjwgtsum
idxtype * adjwgtsum
Definition:
struct.h:165
graphdef::finer
struct graphdef * finer
Definition:
struct.h:195
graphdef::rinfo
RInfoType * rinfo
Definition:
struct.h:181
graphdef::pwgts
idxtype * pwgts
Definition:
struct.h:173
graphdef::label
idxtype * label
Definition:
struct.h:167
graphdef::ncon
int ncon
Definition:
struct.h:191
graphdef::id
idxtype * id
Definition:
struct.h:178
graphdef::npwgts
float * npwgts
Definition:
struct.h:193
graphdef::nedges
int nedges
Definition:
struct.h:158
graphdef::mincut
int mincut
Definition:
struct.h:172
graphdef::adjwgt
idxtype * adjwgt
Definition:
struct.h:163
graphdef::bndptr
idxtype * bndptr
Definition:
struct.h:175
graphdef::vsize
idxtype * vsize
Definition:
struct.h:161
graphdef::coarser
struct graphdef * coarser
Definition:
struct.h:195
graphdef::xadj
idxtype * xadj
Definition:
struct.h:159
graphdef::cmap
idxtype * cmap
Definition:
struct.h:169
nrinfodef
Definition:
struct.h:143
nrinfodef::edegrees
idxtype edegrees[2]
Definition:
struct.h:144
rinfodef
Definition:
struct.h:116
rinfodef::id
int id
Definition:
struct.h:117
rinfodef::ndegrees
int ndegrees
Definition:
struct.h:118
rinfodef::edegrees
EDegreeType * edegrees
Definition:
struct.h:119
rinfodef::ed
int ed
Definition:
struct.h:117
vedegreedef
Definition:
struct.h:84
vedegreedef::ed
idxtype ed
Definition:
struct.h:86
vedegreedef::ned
idxtype ned
Definition:
struct.h:86
vedegreedef::pid
idxtype pid
Definition:
struct.h:85
vedegreedef::gv
idxtype gv
Definition:
struct.h:87
vpwgtdef
Definition:
struct.h:239
vpwgtdef::imax
int imax[2][MAXNCON]
Definition:
struct.h:241
vpwgtdef::max
float max[2][MAXNCON]
Definition:
struct.h:240
vrinfodef
Definition:
struct.h:129
vrinfodef::gv
int gv
Definition:
struct.h:131
vrinfodef::id
int id
Definition:
struct.h:130
vrinfodef::ndegrees
int ndegrees
Definition:
struct.h:132
vrinfodef::edegrees
VEDegreeType * edegrees
Definition:
struct.h:133
vrinfodef::nid
int nid
Definition:
struct.h:130
vrinfodef::ed
int ed
Definition:
struct.h:130
workspacedef
Definition:
struct.h:95
workspacedef::core
idxtype * core
Definition:
struct.h:96
workspacedef::ccore
int ccore
Definition:
struct.h:97
workspacedef::edegrees
EDegreeType * edegrees
Definition:
struct.h:99
workspacedef::maxcore
int maxcore
Definition:
struct.h:97
workspacedef::auxcore
idxtype * auxcore
Definition:
struct.h:103
workspacedef::cdegree
int cdegree
Definition:
struct.h:101
workspacedef::vedegrees
VEDegreeType * vedegrees
Definition:
struct.h:100
workspacedef::pmat
idxtype * pmat
Definition:
struct.h:105
Generated by
1.9.1