From e8ce3362154d5ef070ff53c7aa9ff424268a3958 Mon Sep 17 00:00:00 2001
From: Oliver Sander <sander@igpm.rwth-aachen.de>
Date: Tue, 4 Mar 2008 17:32:11 +0000
Subject: [PATCH] do not use the array from the implementation of BoxConstraint

[[Imported from SVN: r2021]]
---
 staticrod2.cc | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/staticrod2.cc b/staticrod2.cc
index f76c9e10..6d565545 100644
--- a/staticrod2.cc
+++ b/staticrod2.cc
@@ -42,15 +42,15 @@ void setTrustRegionObstacles(double trustRegionRadius,
             if (dirichletNodes[j*blocksize+k])
                 continue;
 
-            trustRegionObstacles[j].val[2*k] =
-                (trueObstacles[j].val[2*k] < -1e10)
-                ? std::min(-trustRegionRadius, trueObstacles[j].val[2*k+1] - trustRegionRadius)
-                : trueObstacles[j].val[2*k];
+            trustRegionObstacles[j].lower(k) =
+                (trueObstacles[j].lower(k) < -1e10)
+                ? std::min(-trustRegionRadius, trueObstacles[j].upper(k) - trustRegionRadius)
+                : trueObstacles[j].lower(k);
                 
-            trustRegionObstacles[j].val[2*k+1] =
-                (trueObstacles[j].val[2*k+1] >  1e10) 
-                ? std::max(trustRegionRadius,trueObstacles[j].val[2*k] + trustRegionRadius)
-                : trueObstacles[j].val[2*k+1];
+            trustRegionObstacles[j].upper(k) =
+                (trueObstacles[j].upper(k) >  1e10) 
+                ? std::max(trustRegionRadius,trueObstacles[j].lower(k) + trustRegionRadius)
+                : trueObstacles[j].upper(k);
 
         }
 
@@ -215,7 +215,7 @@ int main (int argc, char *argv[]) try
         for (int i=0; i<trueObstacles[toplevel].size(); i++) {
             trueObstacles[toplevel][i].clear();
             //trueObstacles[toplevel][i].val[0] =     - x[i][0];
-            trueObstacles[toplevel][i].val[1] = 0.1 - x[i][0];
+            trueObstacles[toplevel][i].upper(0) = 0.1 - x[i][0];
         }
         
 
-- 
GitLab