From bacbfcef1d9cce6372ebb3cfd32e4f23ca59b6ce Mon Sep 17 00:00:00 2001
From: Markus Blatt <mblatt@dune-project.org>
Date: Wed, 21 Nov 2012 14:54:34 +0000
Subject: [PATCH] Bugfix: tpwgts specifies the requested load per partition and
 must not be NULL

Patch by Olaf Ippisch

[[Imported from SVN: r1732]]
---
 dune/istl/repartition.hh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dune/istl/repartition.hh b/dune/istl/repartition.hh
index 330a225cd..c5d25b699 100644
--- a/dune/istl/repartition.hh
+++ b/dune/istl/repartition.hh
@@ -1297,7 +1297,10 @@ namespace Dune
       //
       //
       int numflag=0, wgtflag=0, options[3], edgecut=0, ncon=1;
-      float *tpwgts = NULL;
+      //float *tpwgts = NULL;
+      float *tpwgts = new float[nparts];
+      for(int i=0; i<nparts; ++i)
+        tpwgts[i]=1.0/nparts;
       float ubvec[1];
       options[0] = 0; // 0=default, 1=options are defined in [1]+[2]
 #ifdef DEBUG_REPART
-- 
GitLab