diff --git a/src/core/load_balancing/ParMetisWrapper.cpp b/src/core/load_balancing/ParMetisWrapper.cpp index 3c8b525a0d71ee1699fe75f53f01a4b03d2e53ce..e1d2a237548934b45a7fd24ff0d7f04c238ce7c0 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 cc3b9a3125121aff462eda26aedfa82de891af82..a6de2f29b22f0ae18689f8953f8e1b73082221f5 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,