From 678819c3df666dccbb2dfd3b05ccb12dbc66752b Mon Sep 17 00:00:00 2001 From: Sebastian Eibl <sebastian.eibl@fau.de> Date: Fri, 8 Dec 2017 16:55:00 +0100 Subject: [PATCH] added PartGeom to ParMetis wrapper --- src/core/load_balancing/ParMetisWrapper.cpp | 17 ++++++++++++++++- src/core/load_balancing/ParMetisWrapper.h | 3 +++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/core/load_balancing/ParMetisWrapper.cpp b/src/core/load_balancing/ParMetisWrapper.cpp index 3c8b525a0..e1d2a2375 100644 --- a/src/core/load_balancing/ParMetisWrapper.cpp +++ b/src/core/load_balancing/ParMetisWrapper.cpp @@ -118,6 +118,15 @@ int ParMETIS_V3_PartGeomKway( edgecut, part, comm ); } +int ParMETIS_V3_PartGeom( + ::walberla::int64_t *vtxdist, ::walberla::int64_t *ndims, double *xyz, ::walberla::int64_t *part, MPI_Comm *comm ) +{ + static_assert( boost::is_same< ::walberla::int64_t, ::idx_t >::value, "You have to compile the metis library with 64-bit wide integer type support!" ); + static_assert( boost::is_same< double, ::real_t >::value, "You have to compile the metis library with 64-bit wide floating-point type support!" ); + + return ::ParMETIS_V3_PartGeom( vtxdist, ndims, xyz, part, comm ); +} + int ParMETIS_V3_RefineKway( ::walberla::int64_t *vtxdist, ::walberla::int64_t *xadj, ::walberla::int64_t *adjncy, ::walberla::int64_t *vwgt, ::walberla::int64_t *adjwgt, ::walberla::int64_t *wgtflag, ::walberla::int64_t *numflag, ::walberla::int64_t *ncon, ::walberla::int64_t *nparts, @@ -164,6 +173,12 @@ int ParMETIS_V3_PartGeomKway( WALBERLA_ABORT( "You are trying to use ParMetis functionality but waLBerla is not configured to use it. Set 'WALBERLA_BUILD_WITH_PARMETIS' to 'ON' in your CMake cache to build against an installed version of ParMetis!" ); } +int ParMETIS_V3_PartGeom( + ::walberla::int64_t *, ::walberla::int64_t *, double *, ::walberla::int64_t *, MPI_Comm * ) +{ + WALBERLA_ABORT( "You are trying to use ParMetis functionality but waLBerla is not configured to use it. Set 'WALBERLA_BUILD_WITH_PARMETIS' to 'ON' in your CMake cache to build against an installed version of ParMetis!" ); +} + int ParMETIS_V3_RefineKway( ::walberla::int64_t *, ::walberla::int64_t *, ::walberla::int64_t *, ::walberla::int64_t *, ::walberla::int64_t *, ::walberla::int64_t *, ::walberla::int64_t *, ::walberla::int64_t *, ::walberla::int64_t *, @@ -177,4 +192,4 @@ int ParMETIS_V3_RefineKway( } // namespace core -} // namespace walberla \ No newline at end of file +} // namespace walberla diff --git a/src/core/load_balancing/ParMetisWrapper.h b/src/core/load_balancing/ParMetisWrapper.h index cc3b9a312..a6de2f29b 100644 --- a/src/core/load_balancing/ParMetisWrapper.h +++ b/src/core/load_balancing/ParMetisWrapper.h @@ -47,6 +47,9 @@ int ParMETIS_V3_PartGeomKway( int64_t *ncon, int64_t *nparts, double *tpwgts, double *ubvec, int64_t *options, int64_t *edgecut, int64_t *part, MPI_Comm *comm ); +int ParMETIS_V3_PartGeom( + int64_t *vtxdist, int64_t *ndims, double *xyz, int64_t *part, MPI_Comm *comm ); + int ParMETIS_V3_RefineKway( int64_t *vtxdist, int64_t *xadj, int64_t *adjncy, int64_t *vwgt, int64_t *adjwgt, int64_t *wgtflag, int64_t *numflag, int64_t *ncon, int64_t *nparts, -- GitLab