168 virtual void setDeriv(
const scalar deriv);
180 virtual void reset();
196 virtual void updateStep(
const scalar newStep);
scalar prevMeritDeriv_
Merit directional deriv from the previous opt cycle.
void setDirection(const scalarField &direction)
Set direction.
scalarField direction_
Update direction.
autoPtr< stepUpdate > stepUpdate_
Mechanism to update method if line search conditions are not set.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
virtual void updateStep()=0
Update the line search step based on the specific line search strategy, e.g. bisection, quadratic fit, etc.
const dictionary dict_
Subdict within updateMethod.
bool extrapolateInitialStep_
Whether to extrapolate the correction multiplier for this optimisation cycle based on the previous on...
const dictionary & coeffsDict()
Optional coeffs dict.
TypeName("lineSearch")
Runtime type information.
static autoPtr< lineSearch > New(const dictionary &dict, const Time &time)
Return a reference to the selected turbulence model.
void setNewMeritValue(const scalar value)
Set new objective value.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
virtual void setDeriv(const scalar deriv)
Set objective derivative.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
scalar newMeritValue_
New merit value from this opt cycle.
scalar minStep_
Minimum allowed correction multiplier.
scalar directionalDeriv_
Directional derivative of the merit function.
void setOldMeritValue(const scalar value)
Set old objective value.
virtual lineSearch & operator++()
Increment iteration number and store merit value corresponding to the previous optimisation cycle...
virtual void reset()
Reset step to initial value.
scalar step_
Correction multiplier.
label iter_
Inner line search iteration.
virtual ~lineSearch()=default
Destructor.
scalar initialStep_
Correction multiplier at the first step of line search.
label maxIters_
Maximum line search iterations.
scalar step() const
Get current step.
Abstract base class for line search methods.
IOdictionary lineSearchDict_
IOdictionary under time/uniform for continuation.
declareRunTimeSelectionTable(autoPtr, lineSearch, dictionary,(const dictionary &dict, const Time &time),(dict, time))
scalar oldMeritValue_
Old merit value from this opt cycle.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Macros to ease declaration of run-time selection tables.
virtual bool converged()=0
Return the correction of the design variables.
label maxIters() const
Get max number of iterations.