From d7a85bf49945acbc995856786d7a9d99879ac0b4 Mon Sep 17 00:00:00 2001
From: Thomas Witkowski <thomas.witkowski@gmx.de>
Date: Thu, 7 Aug 2008 09:10:34 +0000
Subject: [PATCH] * Bug fix in ParallelProblem for the vec-case

---
 AMDiS/src/ParallelProblem.cc | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/AMDiS/src/ParallelProblem.cc b/AMDiS/src/ParallelProblem.cc
index b5b7f46b..39811f5a 100644
--- a/AMDiS/src/ParallelProblem.cc
+++ b/AMDiS/src/ParallelProblem.cc
@@ -461,7 +461,7 @@ namespace AMDiS {
     if (debugMode) {
       dbgMesh = mesh;
       if (mpiRank == 0) {
-	structures[mpiRank].fitMeshToStructure(dbgMesh,
+      	structures[mpiRank].fitMeshToStructure(dbgMesh,
 					       refinementManager,
 					       true, true);
       }
@@ -1487,11 +1487,18 @@ namespace AMDiS {
     if (debugMode) {
       dbgRankSolution.resize(mpiSize);
       for (int i = 0; i < mpiSize; i++) {
-	dbgRankSolution[i] = NEW SystemVector(*(rankSolution[i]));
+	dbgRankSolution[i] = NEW SystemVector("debug rank solution", feSpaces, nComponents);
+	for (int j = 0; j < nComponents; j++) {
+	  dbgRankSolution[i]->setDOFVector(j, NEW DOFVector<double>(feSpaces[j], 
+								    "debug rank solution"));	
+	}
       }
 
       if (mpiRank == 0) {
-	dbgSolution = NEW SystemVector(*(problem->getSolution()));
+      	dbgSolution = NEW SystemVector("debug solution", feSpaces, nComponents);
+	for (int i = 0; i < nComponents; i++) {
+	  dbgSolution->setDOFVector(i, NEW DOFVector<double>(feSpaces[i], "debug solution"));
+	}
       }
     }
 
@@ -1518,7 +1525,7 @@ namespace AMDiS {
 	}
 	DELETE dbgRankSolution[i];
       }
-
+      
       if (mpiRank == 0) {
 	for (int i = 0; i < nComponents; i++) {
 	  DELETE dbgSolution->getDOFVector(i);
-- 
GitLab