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