From 45772d6428a3bf9f5657e7b58b4f218ea30202f8 Mon Sep 17 00:00:00 2001
From: Christian Godenschwager <christian.godenschwager@fau.de>
Date: Wed, 27 Sep 2017 12:01:06 +0200
Subject: [PATCH] Fixed bug in StaticParMetis when used with refinement

---
 src/blockforest/loadbalancing/StaticParMetis.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/blockforest/loadbalancing/StaticParMetis.cpp b/src/blockforest/loadbalancing/StaticParMetis.cpp
index f3ccb4e45..0ab962013 100644
--- a/src/blockforest/loadbalancing/StaticParMetis.cpp
+++ b/src/blockforest/loadbalancing/StaticParMetis.cpp
@@ -92,7 +92,7 @@ uint_t StaticLevelwiseParMetis::operator()( SetupBlockForest & forest, const uin
       vtxdist.reserve( uint_c(numRunnerProcesses) + uint_t(1) );
       for( uint_t i = 0; i < uint_c(numRunnerProcesses); ++i )
          vtxdist.push_back( int64_c( std::min( i * chunkSize, numBlocks ) ) );
-      vtxdist.push_back( int64_t( forest.getNumberOfBlocks() ) );
+      vtxdist.push_back( int64_t( forest.getNumberOfBlocks( level ) ) );
 
       std::vector<int64_t> adjncy, xadj, vwgt, adjwgt;
       std::vector<double> xyz;
-- 
GitLab