52 minRatio_(coeffsDict().getOrDefault<scalar>(
"minRatio", 0.1)),
53 firstMeritValue_(Zero),
54 secondMeritValue_(Zero),
55 meritDerivative_(Zero)
63 Info<<
"f(0)" << firstMeritValue_ <<
endl;
64 Info<<
"f(a0)" << secondMeritValue_ <<
endl;
65 Info<<
"df(0)" << meritDerivative_ <<
endl;
67 scalar denom = 1./(step*step);
69 (secondMeritValue_ - meritDerivative_*step - firstMeritValue_)
71 scalar tempStep = - 0.5*meritDerivative_/coeff1;
72 if (tempStep < minRatio_*step)
74 step = minRatio_*step;
85 meritDerivative_ = deriv;
91 secondMeritValue_ = value;
97 firstMeritValue_ = value;
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
virtual void updateStep()
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Fits a quadratic polynomial of the merit function as a function of step and finds the "optimal" value...
virtual void setDeriv(const scalar deriv)
Set objective derivative.
virtual void setOldMeritValue(const scalar value)
Set old merit value.
virtual void setNewMeritValue(const scalar value)
Set new merit value.
Abstract base class for step update methods used in line search.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.