From 2bd682227293906cbac04b70823a008b28103a84 Mon Sep 17 00:00:00 2001
From: Thomas Witkowski <thomas.witkowski@gmx.de>
Date: Mon, 25 May 2009 13:00:33 +0000
Subject: [PATCH] Sebastians changes.

---
 AMDiS/src/Estimator.h   | 41 +++++++++++++++++++++++++++++------------
 AMDiS/src/ProblemVec.cc |  3 +++
 2 files changed, 32 insertions(+), 12 deletions(-)

diff --git a/AMDiS/src/Estimator.h b/AMDiS/src/Estimator.h
index 5488970c..b5171781 100755
--- a/AMDiS/src/Estimator.h
+++ b/AMDiS/src/Estimator.h
@@ -53,7 +53,8 @@ namespace AMDiS {
     virtual ~Estimator() {}
 
     /// Returns \ref name of the Estimator
-    inline const std::string& getName() const { 
+    inline const std::string& getName() const 
+    { 
       return name; 
     }
 
@@ -70,37 +71,44 @@ namespace AMDiS {
     virtual void exit(bool output=true) {}
 
     /// Returns \ref est_sum of the Estimator
-    inline double getErrorSum() const { 
+    inline double getErrorSum() const 
+    { 
       return est_sum; 
     }
 
     /// Sets \ref est_sum of the Estimator
-    inline void setErrorSum(double sum) { 
+    inline void setErrorSum(double sum) 
+    { 
       est_sum = sum; 
     }
 
     /// Returns \ref est_max of the Estimator
-    inline double getErrorMax() const { 
+    inline double getErrorMax() const 
+    { 
       return est_max; 
     }
 
     /// Returns the estimated time error.
-    virtual double getTimeEst() const { 
+    virtual double getTimeEst() const 
+    { 
       return est_t_sum; 
     }
 
     /// Returns the maximal time estimation.
-    virtual double getTimeEstMax() const { 
+    virtual double getTimeEstMax() const 
+    { 
       return est_t_max; 
     }
 
     /// Sets \ref est_max of the Estimator
-    inline void setErrorMax(double m) { 
+    inline void setErrorMax(double m) 
+    { 
       est_max = m; 
     }
 
     /// Returns \ref norm.
-    inline Norm getErrorNorm() { 
+    inline Norm getErrorNorm() 
+    { 
       return norm; 
     }
 
@@ -116,6 +124,11 @@ namespace AMDiS {
       uhOld.push_back(uhOld_);
     }
 
+    void setNewMatrix(int i, DOFMatrix *m) 
+    {
+      matrix[i] = m;
+    }
+
     /// Adds pointer to old solution to the given system.
     virtual void addUhOldToSystem(int system, DOFVector<double> *uhOld_) 
     {
@@ -125,19 +138,23 @@ namespace AMDiS {
     }
 
     /// Returns number of systems.
-    inline int getNumSystems() { 
+    inline int getNumSystems() 
+    { 
       return static_cast<int>(matrix.size()); 
     }
 
-    inline Flag getTraverseFlag() { 
+    inline Flag getTraverseFlag() 
+    { 
       return traverseFlag; 
     }
 
-    inline Mesh* getMesh() { 
+    inline Mesh* getMesh() 
+    { 
       return mesh; 
     }
 
-    inline int getRow() { 
+    inline int getRow() 
+    { 
       return row; 
     }
 
diff --git a/AMDiS/src/ProblemVec.cc b/AMDiS/src/ProblemVec.cc
index 6b7bf79b..3f0aa3ad 100644
--- a/AMDiS/src/ProblemVec.cc
+++ b/AMDiS/src/ProblemVec.cc
@@ -878,6 +878,9 @@ namespace AMDiS {
       (*systemMatrix)[i][j]->getBoundaryManager()->
 	setBoundaryConditionMap((*systemMatrix)[i][i]->getBoundaryManager()->
 				getBoundaryConditionMap());
+
+      if (estimator[i])
+	estimator[i]->setNewMatrix(j, (*systemMatrix)[i][j]);
     }    
 
     (*systemMatrix)[i][j]->addOperator(op, factor, estFactor);
-- 
GitLab