diff options
Diffstat (limited to 'sci_gateway/cpp/sci_minconNLP.cpp')
-rw-r--r-- | sci_gateway/cpp/sci_minconNLP.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sci_gateway/cpp/sci_minconNLP.cpp b/sci_gateway/cpp/sci_minconNLP.cpp index 600aed6..845e983 100644 --- a/sci_gateway/cpp/sci_minconNLP.cpp +++ b/sci_gateway/cpp/sci_minconNLP.cpp @@ -500,9 +500,17 @@ bool minconNLP::eval_h(Index n, const Number* x, bool new_x,Number obj_factor, I finalHessian_[n*row+col]=values[index++]; } } + + index=0; + for (Index col=0;col < numVars_ ;++col) + { + for (Index row=0; row <= col; ++row) + { + finalHessian_[n*row+col]=values[index++]; + } + } } - return true; } @@ -586,5 +594,3 @@ int minconNLP::returnStatus() } - - |