36 #ifndef NEKTAR_LIB_UTILITIES_BASICUTILS_METIS_HPP
37 #define NEKTAR_LIB_UTILITIES_BASICUTILS_METIS_HPP
49 int *options,
int *perm,
int *iperm,
int *map,
55 Nektar::Array<Nektar::OneD, int> xadj,
56 Nektar::Array<Nektar::OneD, int> adjncy,
57 Nektar::Array<Nektar::OneD, int> perm,
58 Nektar::Array<Nektar::OneD, int> iperm,
59 Nektar::Array<Nektar::OneD, int> map,
62 ASSERTL1(xadj.num_elements() == nVerts+1,
"Array xadj out of bounds");
63 ASSERTL1(perm.num_elements() == nVerts,
"Array perm out of bounds");
64 ASSERTL1(iperm.num_elements() == nVerts,
"Array iperm out of bounds");
67 &iperm[0], &map[0], &mdswitch);
74 Nektar::Array<Nektar::OneD, int>& xadj,
75 Nektar::Array<Nektar::OneD, int>& adjcy,
76 Nektar::Array<Nektar::OneD, int>& vertWgt,
77 Nektar::Array<Nektar::OneD, int>& vertSize,
80 Nektar::Array<Nektar::OneD, int>& part)
84 if (vertWgt.num_elements() > 0)
88 if (vertSize.num_elements() > 0)
93 int ncon = nVertConds;
94 int options[METIS_NOPTIONS];
95 METIS_SetDefaultOptions(options);
96 METIS_PartGraphKway(&nVerts, &ncon, &xadj[0], &adjcy[0], vwgt, vsize,
97 0, &nparts, 0, 0, options, &volume, &part[0]);
100 #endif //NEKTAR_LIB_UTILITIES_BASICUTILS_METIS_HPP