Merge pull request #6144 from MaelRL/BGL-Fix_METIS_npart_int-GF

Fix conversion error in METIS wrappers
This commit is contained in:
Laurent Rineau 2021-11-23 15:38:33 +01:00
commit cd747b44c1
2 changed files with 5 additions and 2 deletions

View File

@ -79,6 +79,7 @@ void partition_dual_graph(const TriangleMesh& tm,
// a dual edge between elements exists if they share 'nparts' vertices // a dual edge between elements exists if they share 'nparts' vertices
idx_t ncommon = 2; idx_t ncommon = 2;
idx_t nparts_as_idx_t = nparts;
// either the edgecut or the total communication volume of the dual graphs partitioning // either the edgecut or the total communication volume of the dual graphs partitioning
idx_t objval; idx_t objval;
@ -98,7 +99,7 @@ void partition_dual_graph(const TriangleMesh& tm,
CGAL_assertion_code(int ret =) CGAL_assertion_code(int ret =)
METIS_PartMeshDual(&ne, &nn, eptr, eind, METIS_PartMeshDual(&ne, &nn, eptr, eind,
nullptr /* elements weights*/, nullptr /*elements sizes*/, nullptr /* elements weights*/, nullptr /*elements sizes*/,
&ncommon, &nparts, &ncommon, &nparts_as_idx_t,
nullptr /* partitions weights */, nullptr /* partitions weights */,
*options, *options,
&objval, epart, npart); &objval, epart, npart);

View File

@ -112,6 +112,8 @@ void partition_graph(const TriangleMesh& tm,
eptr[i + 1] = j; eptr[i + 1] = j;
} }
idx_t nparts_as_idx_t = nparts;
// either the edgecut or the total communication volume of the dual graphs partitioning // either the edgecut or the total communication volume of the dual graphs partitioning
idx_t objval; idx_t objval;
@ -130,7 +132,7 @@ void partition_graph(const TriangleMesh& tm,
CGAL_assertion_code(int ret =) CGAL_assertion_code(int ret =)
METIS_PartMeshNodal(&ne, &nn, eptr, eind, METIS_PartMeshNodal(&ne, &nn, eptr, eind,
nullptr /* nodes weights */, nullptr /* nodes sizes */, nullptr /* nodes weights */, nullptr /* nodes sizes */,
&nparts, &nparts_as_idx_t,
nullptr /* partitions weights */, nullptr /* partitions weights */,
*options, *options,
&objval, epart, npart); &objval, epart, npart);