From 0fcade3f07f7dc20588a6b5ffb56b6c20a2cda6d Mon Sep 17 00:00:00 2001 From: Peter Gottschling <peter.gottschling@simunova.com> Date: Mon, 22 Jun 2009 09:53:55 +0000 Subject: [PATCH] Used accumulated slot size. --- AMDiS/src/SolverMatrix.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/AMDiS/src/SolverMatrix.h b/AMDiS/src/SolverMatrix.h index a4c4761b..ef996f40 100644 --- a/AMDiS/src/SolverMatrix.h +++ b/AMDiS/src/SolverMatrix.h @@ -72,7 +72,14 @@ namespace AMDiS { matrix.change_dim(block_starts[ns], block_starts[ns]); set_to_zero(matrix); - DOFMatrix::inserter_type ins(matrix); + + int nnz= 0; + for (int rb= 0; rb < ns; ++rb) + for (int cb= 0; cb < ns; ++cb) + if (A[rb][cb]) + nnz+= A[rb][cb]->getBaseMatrix().nnz(); + + DOFMatrix::inserter_type ins(matrix, int(1.2 * nnz / matrix.dim1())); for (int rb= 0; rb < ns; ++rb) for (int cb= 0; cb < ns; ++cb) if (A[rb][cb]) -- GitLab