Skip to content
Snippets Groups Projects
Commit 14ede7ae authored by Oliver Sander's avatar Oliver Sander Committed by sander@PCPOOL.MI.FU-BERLIN.DE
Browse files

do not use the array in the implementation of BoxConstraint

[[Imported from SVN: r2013]]
parent f50180ff
No related branches found
No related tags found
No related merge requests found
...@@ -41,15 +41,15 @@ void setTrustRegionObstacles(double trustRegionRadius, ...@@ -41,15 +41,15 @@ void setTrustRegionObstacles(double trustRegionRadius,
if (dirichletNodes[j*blocksize+k]) if (dirichletNodes[j*blocksize+k])
continue; continue;
trustRegionObstacles[j].val[2*k] = trustRegionObstacles[j].lower(k) =
(trueObstacles[j].val[2*k] < -1e10) (trueObstacles[j].lower(k) < -1e10)
? std::min(-trustRegionRadius, trueObstacles[j].val[2*k+1] - trustRegionRadius) ? std::min(-trustRegionRadius, trueObstacles[j].upper(k) - trustRegionRadius)
: trueObstacles[j].val[2*k]; : trueObstacles[j].lower(k);
trustRegionObstacles[j].val[2*k+1] = trustRegionObstacles[j].upper(k) =
(trueObstacles[j].val[2*k+1] > 1e10) (trueObstacles[j].upper(k) > 1e10)
? std::max(trustRegionRadius,trueObstacles[j].val[2*k] + trustRegionRadius) ? std::max(trustRegionRadius,trueObstacles[j].lower(k) + trustRegionRadius)
: trueObstacles[j].val[2*k+1]; : trueObstacles[j].upper(k);
} }
...@@ -167,7 +167,7 @@ int main (int argc, char *argv[]) try ...@@ -167,7 +167,7 @@ int main (int argc, char *argv[]) try
for (int i=0; i<trueObstacles[maxlevel].size(); i++) { for (int i=0; i<trueObstacles[maxlevel].size(); i++) {
trueObstacles[maxlevel][i].clear(); trueObstacles[maxlevel][i].clear();
//trueObstacles[maxlevel][i].val[0] = - x[i][0]; //trueObstacles[maxlevel][i].val[0] = - x[i][0];
trueObstacles[maxlevel][i].val[1] = 0.1 - x[i][0]; trueObstacles[maxlevel][i].upper(0) = 0.1 - x[i][0];
} }
// //////////////////////////////// // ////////////////////////////////
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment