From 8c3b21ee101f5a95c895678d8d8274d52f191191 Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Mon, 12 May 2008 14:17:04 +0000 Subject: [PATCH] pick an initial iterate which is constant and has the required total force [[Imported from SVN: r2281]] --- src/averageinterface.hh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/averageinterface.hh b/src/averageinterface.hh index 0b8f824d..f8beb972 100644 --- a/src/averageinterface.hh +++ b/src/averageinterface.hh @@ -212,8 +212,9 @@ get_starting_point(Ipopt::Index n, bool init_x, Ipopt::Number* x, assert(init_lambda == false); // initialize to the given starting point - for (int i=0; i<n; i++) - x[i] = 0; + for (int i=0; i<n/dim; i++) + for (int j=0; j<dim; j++) + x[i*dim+j] = resultantForce_[j]/patchArea_; return true; } -- GitLab