| 6 |
|
|
| 7 |
|
model = nlmodel; |
| 8 |
|
//set the dimension |
| 9 |
< |
|
| 9 |
> |
|
| 10 |
|
#ifndef IS_MPI |
| 11 |
|
dim = model->getDim(); |
| 12 |
|
#else |
| 13 |
< |
|
| 13 |
> |
dim = model->getDim(); |
| 14 |
|
#endif |
| 15 |
|
prevGrad.resize(dim); |
| 16 |
|
gradient.resize(dim); |
| 68 |
|
for(currentIter = 1;currentIter <= maxIteration; currentIter++){ |
| 69 |
|
|
| 70 |
|
// perform line search to minimize f(x + lamda * direction) where stepSize > 0 |
| 71 |
< |
lsMinimizer->minimize(direction, 0.0, 1.0); |
| 71 |
> |
lsMinimizer->minimize(direction, 0.0, 0.01); |
| 72 |
|
|
| 73 |
|
lsStatus = lsMinimizer->getMinimizationStatus(); |
| 74 |
|
|