From 3b5f871b03e075de61a625746e8d2f06a34dfe0a Mon Sep 17 00:00:00 2001
From: Simon Praetorius <simon.praetorius@tu-dresden.de>
Date: Mon, 24 Jan 2011 12:42:17 +0000
Subject: [PATCH] different versions of addRobinBC added to ProblemVec

---
 AMDiS/src/ProblemVec.cc | 33 +++++++++++++++++++++++++++++++++
 AMDiS/src/ProblemVec.h  | 10 ++++++++++
 2 files changed, 43 insertions(+)

diff --git a/AMDiS/src/ProblemVec.cc b/AMDiS/src/ProblemVec.cc
index 20735008..63710b11 100644
--- a/AMDiS/src/ProblemVec.cc
+++ b/AMDiS/src/ProblemVec.cc
@@ -1336,6 +1336,39 @@ namespace AMDiS {
       rhs->getDOFVector(row)->getBoundaryManager()->addBoundaryCondition(robin);
   }
 
+  void ProblemVec::addRobinBC(BoundaryType type, int row, int col, 
+			      DOFVector<double> *n,
+			      DOFVector<double> *r)
+  {
+    FUNCNAME("ProblemVec::addRobinBC()");
+
+    boundaryConditionSet = true;
+
+    RobinBC *robin = 
+      new RobinBC(type, n, r, componentSpaces[row], componentSpaces[col]);
+
+    if (systemMatrix && (*systemMatrix)[row][col])
+      (*systemMatrix)[row][col]->getBoundaryManager()->addBoundaryCondition(robin);
+    if (rhs)
+      rhs->getDOFVector(row)->getBoundaryManager()->addBoundaryCondition(robin);
+  }
+
+  void ProblemVec::addRobinBC(BoundaryType type, int row, int col, 
+			      Operator *n,
+			      Operator *r)
+  {
+    FUNCNAME("ProblemVec::addRobinBC()");
+
+    boundaryConditionSet = true;
+
+    RobinBC *robin = 
+      new RobinBC(type, n, r, componentSpaces[row], componentSpaces[col]);
+
+    if (systemMatrix && (*systemMatrix)[row][col])
+      (*systemMatrix)[row][col]->getBoundaryManager()->addBoundaryCondition(robin);
+    if (rhs)
+      rhs->getDOFVector(row)->getBoundaryManager()->addBoundaryCondition(robin);
+  }
 
   void ProblemVec::addPeriodicBC(BoundaryType type, int row, int col) 
   {
diff --git a/AMDiS/src/ProblemVec.h b/AMDiS/src/ProblemVec.h
index 3f00a348..a4bf93ff 100644
--- a/AMDiS/src/ProblemVec.h
+++ b/AMDiS/src/ProblemVec.h
@@ -261,6 +261,16 @@ namespace AMDiS {
 			    AbstractFunction<double, WorldVector<double> > *n,
 			    AbstractFunction<double, WorldVector<double> > *r);
 
+    /// Adds Robin boundary condition.
+    virtual void addRobinBC(BoundaryType type, int row, int col, 
+			    DOFVector<double> *n,
+			    DOFVector<double> *r);
+
+    /// Adds Robin boundary condition.
+    virtual void addRobinBC(BoundaryType type, int row, int col, 
+			    Operator *n,
+			    Operator *r);
+
     /// Adds a periodic boundary condition.
     virtual void addPeriodicBC(BoundaryType type, int row, int col);
 
-- 
GitLab