Skip to content
Snippets Groups Projects
Commit 5d3f355d authored by Andrew Heather's avatar Andrew Heather
Browse files

Merge branch 'bug-1948-wrong-first-merit-function-value' into 'master'

BUG: Wrong First extrapolated value of the merit function (fixes #1948)

Closes #1948

See merge request Development/openfoam!402
parents d119b8b8 2eae536a
No related branches found
No related tags found
1 merge request!402BUG: Wrong First extrapolated value of the merit function (fixes #1948)
...@@ -175,9 +175,6 @@ void optimisationType::update() ...@@ -175,9 +175,6 @@ void optimisationType::update()
void optimisationType::update(scalarField& direction) void optimisationType::update(scalarField& direction)
{ {
// Compute eta if needed
computeEta(direction);
// Multiply with line search step, if necessary // Multiply with line search step, if necessary
scalarField correction(direction); scalarField correction(direction);
if (lineSearch_.valid()) if (lineSearch_.valid())
...@@ -218,6 +215,9 @@ tmp<scalarField> optimisationType::computeDirection() ...@@ -218,6 +215,9 @@ tmp<scalarField> optimisationType::computeDirection()
scalarField& correction = tcorrection.ref(); scalarField& correction = tcorrection.ref();
correction = updateMethod_->returnCorrection(); correction = updateMethod_->returnCorrection();
// Compute eta if needed
computeEta(correction);
return tcorrection; return tcorrection;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment