From b1872344c83bd295cb3eadf4fecdc179eadcac77 Mon Sep 17 00:00:00 2001
From: Thomas Witkowski <thomas.witkowski@gmx.de>
Date: Tue, 18 May 2010 08:34:53 +0000
Subject: [PATCH] UMFPACK works now correctly for multiple right hand sides.

---
 AMDiS/src/FileWriter.cc   | 2 +-
 AMDiS/src/ProblemVec.cc   | 9 +++++----
 AMDiS/src/UmfPackSolver.h | 4 ++--
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/AMDiS/src/FileWriter.cc b/AMDiS/src/FileWriter.cc
index 62db97dc..6af8eca9 100644
--- a/AMDiS/src/FileWriter.cc
+++ b/AMDiS/src/FileWriter.cc
@@ -165,7 +165,7 @@ namespace AMDiS {
 			      bool (*writeElem)(ElInfo*))
   {
     FUNCNAME("FileWriter::writeFiles()");
-    
+
     if ((adaptInfo->getTimestepNumber() % tsModulo != 0) && !force) 
       return;
 
diff --git a/AMDiS/src/ProblemVec.cc b/AMDiS/src/ProblemVec.cc
index 2eb64d17..76ca18b2 100644
--- a/AMDiS/src/ProblemVec.cc
+++ b/AMDiS/src/ProblemVec.cc
@@ -763,11 +763,12 @@ namespace AMDiS {
  				 assembleFlag);     
     }
 
-    solverMatrix.setMatrix(*systemMatrix);
-	 
-    createPrecon();
+    if (asmMatrix) {
+      solverMatrix.setMatrix(*systemMatrix);      
+      createPrecon();
 
-    INFO(info, 8)("fillin of assembled matrix: %d\n", nnz);
+      INFO(info, 8)("fillin of assembled matrix: %d\n", nnz);
+    }
 
 #ifdef _OPENMP
     INFO(info, 8)("buildAfterCoarsen needed %.5f seconds system time / %.5f seconds wallclock time\n",
diff --git a/AMDiS/src/UmfPackSolver.h b/AMDiS/src/UmfPackSolver.h
index 2ec4eb20..91213a9c 100644
--- a/AMDiS/src/UmfPackSolver.h
+++ b/AMDiS/src/UmfPackSolver.h
@@ -86,11 +86,11 @@ namespace AMDiS {
 	else
 	  solver = new mtl::matrix::umfpack::solver<matrix_type>(A, UMFPACK_STRATEGY_SYMMETRIC);
       } else {
-	//	if (!multipleRhs)
+	if (!multipleRhs)
  	  if (store_symbolic)
  	    solver->update_numeric();
  	  else
-	    solver->update();
+	    solver->update();	
       }
      
       int code= (*solver)(x, b);
-- 
GitLab