332 void operator=(
const ISQP&) =
delete;
355 virtual ~ISQP() =
default;
tmp< scalarField > preconVectorProduct(const scalarField &vector, autoPtr< scalarField > &precon)
Preconditioner-vector product for CG.
tmp< scalarField > resFuTilda()
Residual of the complementarity slackness for the upper bound constraints.
tmp< scalarField > diagPreconditioner()
Diagonal preconditioner of the deltaP eqn.
virtual void updateOldCorrection(const scalarField &oldCorrection)
Update old correction. Useful for quasi-Newton methods coupled with line search.
scalarField p_
The set of design variables being updated during the subproblem.
label maxLineSearchIters_
Maxmimum number of line search iterations for each iteration of the subproblem.
virtual void update()
Update design variables.
label nConstraints() const
Get the number of constraints.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
void updateYS()
Update the vectors accosiated with the Hessian matrix.
void initialize()
Allocate fields related to constraints.
virtual scalar computeMeritFunction()
Compute merit function. Could be different than the objective in the presence of constraints.
autoPtr< scalarField > deltaUTilda_
bool doAllocateLagrangeMultipliers_
Should Lagrange multipliers be allocated.
tmp< scalarField > ShermanMorrisonRank1Update(const PtrList< scalarField > &r1Updates, const scalarField &p, const refPtr< scalarField > &diag, const scalarField &mult, label n)
Recursive (naive) implementation of the rank-1 update.
tmp< scalarField > resFlTilda()
Residual of the complementarity slackness for the lower bound constraints.
autoPtr< scalarField > uTilda_
Lagrange multipliers for the upper bound constraints.
bool includeBoundConstraints_
Are bound constraints included?
autoPtr< scalarField > lTilda_
Lagrange multipliers for the lower bound constraints.
scalar c_
Multiplier of the additional variables y in the Lagrangian, to make them 'expensive'.
virtual bool writeData(Ostream &os) const
Write useful quantities to files.
virtual scalar meritFunctionDirectionalDerivative()
Derivative of the merit function. Could be different than the objective derivative in the presence of...
label preconType_
Which preconditioner to use for the solution of the subproblem.
tmp< scalarField > computeRHSForDeltaX(const scalarField &FDx)
Compute the RHS for the deltaX equation.
autoPtr< scalarField > deltaZ_
void computeCorrection()
Compute design variables correction.
autoPtr< scalarField > extraVars_
Extra variables for finding solutions even in infeasible problems.
autoPtr< scalarField > deltaLs_
A class for managing references or pointers (no reference counting)
void adjustStep(scalar &step, const scalar value, const scalar update)
Adjust step to satisfy cireteria.
virtual scalar meritFunctionConstraintPart() const
Get the part the merit function that depends on the constraints.
void CGforDeltaP(const scalarField &FDx)
CG algorithm for the solution of the deltaP eqn.
virtual ~ISQP()=default
Destructor.
tmp< scalarField > resFExtraVars()
Residual of the Lagrangian derivative wrt the extra variables.
tmp< scalarField > resFL()
Residual of the gradient of the Lagrangian.
void updateSizes()
Update sizes of fields related to the active design variables.
tmp< scalarField > resFlamda()
Residual of the complementarity slackness for the inequality constraints.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
autoPtr< scalarField > deltaExtraVars_
autoPtr< scalarField > deltaLTilda_
scalar cRed_
Percentage reduction for the constraints.
label maxDxIters_
Maxmimum number of iterations for the deltaX equation.
void solveDeltaPEqn()
Solve the equation for deltaX, which is the expensive part of the Newtopn step.
void computeNewtonDirection()
Compute direction for the Newton problem.
A class for handling words, derived from Foam::string.
tmp< scalarField > resFls()
Residual of the lower bounds slackness.
scalar lineSearch()
Perform line search and return max residual corresponding to the updated solution.
tmp< scalarField > computeResiduals()
Compute and return residuals based on the current solution.
Base class for Sequantial Quadratic Programming (SQP) methods.
void allocateBoundMultipliers()
Allocate multipliers for the bound constraints.
autoPtr< scalarField > z_
Lagrange multipliers for positive extra variables.
tmp< scalarField > resFz()
Residual of the complementarity slackness for the extra variables.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
tmp< scalarField > resFGs()
Residual of the inequality constraint slackness.
OBJstream os(runTime.globalPath()/outputName)
tmp< scalarField > ShermanMorrisonPrecon(const scalarField &vector)
Use the Sherman-Morrison formula to compute the matrix-free product of the approximate inverse of the...
void solveSubproblem()
Solve subproblem using a Newton optimiser.
An L-BFGS-based SQP algorithm for computing the update of the design variables in the presence of ine...
void updateSolution(const scalar step)
Update the current solution using the known direction and the given step length.
scalarField gs_
Slack variables for the inequality constraints.
static const Enum< preconditioners > preconditionerNames
Names of preconditioners for the subproblem.
virtual bool writeAuxiliaryData()
Write merit function information.
TypeName("ISQP")
Runtime type information.
autoPtr< scalarField > ls_
Slack variables the lower bound constraints.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
bool includeExtraVars_
Are additional design variables included?
Mesh data needed to do the Finite Volume discretisation.
scalar eps_
Infinitesimal quantity.
scalar epsMin_
Final eps quantity to be reached during the solution of the subproblem.
label maxNewtonIters_
Maxmimum number of Newton iterations for the subproblem.
scalar relTol_
Relative tolerance of the CG solver, solving for deltaP_.
tmp< scalarField > matrixVectorProduct(const scalarField &vector)
Procudt of the LHS of the deltaP eqn with a vector.
The quasi-Newton Limited-memory BFGS formula. Keeps nPrevSteps_ of the y and s vectors and approximat...
autoPtr< scalarField > us_
Slack variables the upper bound constraints.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
tmp< scalarField > resFus()
Residual of the upper bounds slackness.
A class for managing temporary objects.
tmp< scalarField > invHFL()
Product of the inverse Hessian with the residual of the gradient of the Lagrangian.
void storeOldFields()
Store old fields needed for the next iter.
autoPtr< scalarField > deltaUs_
void allocateLagrangeMultipliers()
Allocate Lagrange multipliers for the inequality constraints.
void zeroUpdates()
Zero the updates computed in the previous optimisation cycle.
preconditioners
Enumeration of preconditioners for the subproblem.
autoPtr< OFstream > meritFunctionFile_
File including the l1 merit function.