parmetis.h
Go to the documentation of this file.
1 /*
2  * Copyright 1997-2003, Regents of the University of Minnesota
3  *
4  * parmetis.h
5  *
6  * This file contains function prototypes and constrant definitions for
7  * ParMETIS
8  *
9  * Started 7/21/03
10  * George
11  *
12  */
13 
14 #ifndef __parmetis_h__
15 #define __parmetis_h__
16 
17 //ALH: Need to buffer this case for when compiling in serial
18 #ifdef OOMPH_HAS_MPI
19 #include <mpi.h>
20 #endif
21 
22 #ifndef _MSC_VER
23 #define __cdecl
24 #endif
25 
26 
27 /*************************************************************************
28 * Data-structures
29 **************************************************************************/
30 /* Undefine the following #define in order to use short int as the idxtype */
31 #define IDXTYPE_INT
32 
33 /* Indexes are as long as integers for now */
34 #ifdef IDXTYPE_INT
35 typedef int idxtype;
36 #else
37 typedef short idxtype;
38 #endif
39 
40 
41 //ALH: Also need to buffer out the entire rest of the code
42 // because MPIComm is not defined
43 #ifdef OOMPH_HAS_MPI
44 
45 /*************************************************************************
46 * Constants
47 **************************************************************************/
48 #define PARMETIS_MAJOR_VERSION 3
49 #define PARMETIS_MINOR_VERSION 1
50 #define PARMETIS_SUBMINOR_VERSION 1
51 
52 
53 /*************************************************************************
54 * Function prototypes
55 **************************************************************************/
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59 
60 /*-------------------------------------------------------------------
61 * API Introduced with Release 3.0 (current API)
62 *--------------------------------------------------------------------*/
63 void __cdecl ParMETIS_V3_AdaptiveRepart(
64  idxtype *vtxdist, idxtype *xadj, idxtype *adjncy, idxtype *vwgt,
65  idxtype *vsize, idxtype *adjwgt, int *wgtflag, int *numflag, int *ncon,
66  int *nparts, float *tpwgts, float *ubvec, float *ipc2redist,
67  int *options, int *edgecut, idxtype *part, MPI_Comm *comm);
68 
69 void __cdecl ParMETIS_V3_PartGeomKway(
70  idxtype *vtxdist, idxtype *xadj, idxtype *adjncy, idxtype *vwgt,
71  idxtype *adjwgt, int *wgtflag, int *numflag, int *ndims, float *xyz,
72  int *ncon, int *nparts, float *tpwgts, float *ubvec, int *options,
73  int *edgecut, idxtype *part, MPI_Comm *comm);
74 
75 void __cdecl ParMETIS_V3_PartGeom(
76  idxtype *vtxdist, int *ndims, float *xyz, idxtype *part, MPI_Comm *comm);
77 
78 void __cdecl ParMETIS_V3_PartKway(
79  idxtype *vtxdist, idxtype *xadj, idxtype *adjncy, idxtype *vwgt,
80  idxtype *adjwgt, int *wgtflag, int *numflag, int *ncon, int *nparts,
81  float *tpwgts, float *ubvec, int *options, int *edgecut, idxtype *part,
82  MPI_Comm *comm);
83 
84 void __cdecl ParMETIS_V3_Mesh2Dual(
85  idxtype *elmdist, idxtype *eptr, idxtype *eind, int *numflag,
86  int *ncommonnodes, idxtype **xadj, idxtype **adjncy, MPI_Comm *comm);
87 
88 void __cdecl ParMETIS_V3_PartMeshKway(
89  idxtype *elmdist, idxtype *eptr, idxtype *eind, idxtype *elmwgt,
90  int *wgtflag, int *numflag, int *ncon, int *ncommonnodes, int *nparts,
91  float *tpwgts, float *ubvec, int *options, int *edgecut, idxtype *part,
92  MPI_Comm *comm);
93 
94 void __cdecl ParMETIS_V3_NodeND(
95  idxtype *vtxdist, idxtype *xadj, idxtype *adjncy, int *numflag,
96  int *options, idxtype *order, idxtype *sizes, MPI_Comm *comm);
97 
98 void __cdecl ParMETIS_V3_RefineKway(
99  idxtype *vtxdist, idxtype *xadj, idxtype *adjncy, idxtype *vwgt,
100  idxtype *adjwgt, int *wgtflag, int *numflag, int *ncon, int *nparts,
101  float *tpwgts, float *ubvec, int *options, int *edgecut,
102  idxtype *part, MPI_Comm *comm);
103 
104 
105 /*------------------------------------------------------------------
106 * Backward compatibility routines with Release 2.0
107 *-------------------------------------------------------------------*/
108 void __cdecl ParMETIS_PartKway(
109  idxtype *vtxdist, idxtype *xadj, idxtype *adjncy, idxtype *vwgt,
110  idxtype *adjwgt, int *wgtflag, int *numflag, int *nparts, int *options,
111  int *edgecut, idxtype *part, MPI_Comm *comm);
112 
113 void __cdecl ParMETIS_PartGeomKway(
114  idxtype *vtxdist, idxtype *xadj, idxtype *adjncy, idxtype *vwgt, idxtype *adjwgt,
115  int *wgtflag, int *numflag, int *ndims, float *xyz, int *nparts, int *options,
116  int *edgecut, idxtype *part, MPI_Comm *comm);
117 
118 void __cdecl ParMETIS_PartGeom(
119  idxtype *vtxdist, int *ndims, float *xyz, idxtype *part, MPI_Comm *comm);
120 
121 void __cdecl ParMETIS_PartGeomRefine(
122  idxtype *vtxdist, idxtype *xadj, idxtype *adjncy, idxtype *vwgt,
123  idxtype *adjwgt, int *wgtflag, int *numflag, int *ndims, float *xyz,
124  int *options, int *edgecut, idxtype *part, MPI_Comm *comm);
125 
126 void __cdecl ParMETIS_RefineKway(
127  idxtype *vtxdist, idxtype *xadj, idxtype *adjncy, idxtype *vwgt,
128  idxtype *adjwgt, int *wgtflag, int *numflag, int *options, int *edgecut,
129  idxtype *part, MPI_Comm *comm);
130 
131 void __cdecl ParMETIS_RepartLDiffusion(
132  idxtype *vtxdist, idxtype *xadj, idxtype *adjncy, idxtype *vwgt,
133  idxtype *adjwgt, int *wgtflag, int *numflag, int *options, int *edgecut,
134  idxtype *part, MPI_Comm *comm);
135 
136 void __cdecl ParMETIS_RepartGDiffusion(
137  idxtype *vtxdist, idxtype *xadj, idxtype *adjncy, idxtype *vwgt,
138  idxtype *adjwgt, int *wgtflag, int *numflag, int *options, int *edgecut,
139  idxtype *part, MPI_Comm *comm);
140 
141 void __cdecl ParMETIS_RepartRemap(
142  idxtype *vtxdist, idxtype *xadj, idxtype *adjncy, idxtype *vwgt, idxtype *adjwgt,
143  int *wgtflag, int *numflag, int *options, int *edgecut, idxtype *part,
144  MPI_Comm *comm);
145 
146 void __cdecl ParMETIS_RepartMLRemap(
147  idxtype *vtxdist, idxtype *xadj, idxtype *adjncy, idxtype *vwgt, idxtype *adjwgt,
148  int *wgtflag, int *numflag, int *options, int *edgecut, idxtype *part,
149  MPI_Comm *comm);
150 
151 void __cdecl ParMETIS_NodeND(
152  idxtype *vtxdist, idxtype *xadj, idxtype *adjncy, int *numflag, int *options,
153  idxtype *order, idxtype *sizes, MPI_Comm *comm);
154 
155 void __cdecl ParMETIS_SerialNodeND(
156  idxtype *vtxdist, idxtype *xadj, idxtype *adjncy, int *numflag, int *options,
157  idxtype *order, idxtype *sizes, MPI_Comm *comm);
158 
159 
160 
161 
162 /*-------------------------------------------------------------------
163 * Backward compatibility routines with Release 1.0
164 *--------------------------------------------------------------------*/
165 void __cdecl PARKMETIS(
166  idxtype *vtxdist, idxtype *xadj, idxtype *vwgt, idxtype *adjncy, idxtype *adjwgt,
167  idxtype *part, int *options, MPI_Comm comm);
168 
169 void __cdecl PARGKMETIS(
170  idxtype *vtxdist, idxtype *xadj, idxtype *vwgt, idxtype *adjncy, idxtype *adjwgt,
171  int ndims, float *xyz, idxtype *part, int *options, MPI_Comm comm);
172 
173 void __cdecl PARGRMETIS(
174  idxtype *vtxdist, idxtype *xadj, idxtype *vwgt, idxtype *adjncy, idxtype *adjwgt,
175  int ndims, float *xyz, idxtype *part, int *options, MPI_Comm comm);
176 
177 void __cdecl PARGMETIS(
178  idxtype *vtxdist, idxtype *xadj, idxtype *adjncy, int ndims, float *xyz,
179  idxtype *part, int *options, MPI_Comm comm);
180 
181 void __cdecl PARRMETIS(
182  idxtype *vtxdist, idxtype *xadj, idxtype *vwgt, idxtype *adjncy,
183  idxtype *adjwgt, idxtype *part, int *options, MPI_Comm comm);
184 
185 void __cdecl PARUAMETIS(
186  idxtype *vtxdist, idxtype *xadj, idxtype *vwgt, idxtype *adjncy,
187  idxtype *adjwgt, idxtype *part, int *options, MPI_Comm comm);
188 
189 void __cdecl PARDAMETIS(
190  idxtype *vtxdist, idxtype *xadj, idxtype *vwgt, idxtype *adjncy, idxtype *adjwgt,
191  idxtype *part, int *options, MPI_Comm comm);
192 
193 #ifdef __cplusplus
194 }
195 #endif
196 
197 
198 /*************************************************************************
199 * Various constants used for the different parameters
200 **************************************************************************/
201 /* Matching types */
202 #define PARMETIS_MTYPE_LOCAL 1
203 #define PARMETIS_MTYPE_GLOBAL 2
204 
205 /* Refinement types */
206 #define PARMETIS_RTYPE_RANDOM 1
207 #define PARMETIS_RTYPE_GREEDY 2
208 #define PARMETIS_RTYPE_2PHASE 3
209 
210 #endif
211 #endif
std::vector< Array2i > sizes
Definition: dense_solvers.cpp:12
int idxtype
Definition: oomph_metis_from_parmetis_3.1.1/struct.h:20
int idxtype
Definition: parmetis.h:35
#define __cdecl
Definition: parmetis.h:23