305 const word& description
317 void operator=(
const nullSpace&) =
delete;
void updateViolatedConstraintsSubsets()
Update the constraint subsets.
scalar lineSearch()
Perform line search and return max residual corresponding to the updated solution.
tmp< scalarField > activeConstraints(const labelListList &subsets)
Collect all constraint values corresponding to the provided indices.
scalar targetConstraintReduction_
Target reduction of active constraints (range in [0-1])
TypeName("nullSpace")
Runtime type information.
scalar dualTolerance_
Tolerance of the dual problem.
tmp< scalarField > constraintRelatedUpdate(const scalarField &rhs, const labelListList &subsets)
Computes the parts of ksiJ and ksiC that require a system solution.
void correction()
Compute the update of the design variables as a combination of null space and range space parts...
void initialise()
Update sizes of fields related to the constraints.
Abstract base class for optimisation methods supporting constraints. Does not add functionality to up...
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 computeNewtonDirection()
Compute direction for the Newton problem.
label maxLineSearchIters_
Maxmimum number of line search iterations for each Newton iteration of the dual problem.
label maxNewtonIters_
Maxmimum number of Newton iterations for the dual problem.
autoPtr< scalar > maxDVChange_
Max change of the design variables, pertaining to the objective reduction.
scalar eps_
Infinitesimal quantity.
Abstract base class for optimisation methods.
virtual ~nullSpace()=default
Destructor.
bool includeBoundConstraints_
Are bound constraints included?
void updateNullAndRangeSpaceSubsets()
Update the constraint subsets.
scalarField mu_
Lagrange multipliers for flow-reated constraints.
Update design variables using a null space approach. Can handle inequality and bound constraints...
tmp< scalarField > Av(const scalarField &v, const labelListList &subsets)
A & v.
scalarField l_
Lagrange multipliers for the lower bound constraints.
scalarField u_
Lagrange multipliers for the upper bound constraints.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
bool solveDualProblem_
Solve the dual problem?
virtual void computeCorrection()
Compute design variables correction.
A class for handling words, derived from Foam::string.
labelListList iTilda_
List of saturated or violated constraints.
void zeroUpdates()
Zero the updates computed in the previous optimisation cycle.
void updateSolution(const scalar step)
Update the current solution using the known direction and the given step length.
scalar epsPerturb_
Value to perturb the design variables by, if all of them lay on their bounds at the beginning of the ...
scalar epsConstr_
Value for considering a constraint as marginally active.
scalar aC_
Multiplier of the range space update.
label maxCGIters_
Maxmimum number of CG iterations for obtaining the null space and range space updates.
void updateCorrectionIndices(const label i, const scalarField &LagrangeMults, const scalarField &dual)
Update constraint indices related to the null and range space part of the correction.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
scalar bcMult_
Downplay the importance of the bound constraint reduction by this ammount.
OBJstream os(runTime.globalPath()/outputName)
virtual scalar meritFunctionDirectionalDerivative()
Directional derivative of the merit function, in the direction of the correction. ...
scalar aJ_
Multiplier of the null space update.
List< T > subset(const BoolListType &select, const UList< T > &input, const bool invert=false)
Extract elements of the input list when select is true.
tmp< scalarField > ATv(const scalarField &v, const labelListList &subsets)
A.T & v.
scalarField dualU_
Lagrange multipliers of the dual problem for the upper bound constraints.
tmp< scalarField > computeResiduals()
Compute and return residuals based on the current solution.
void solveDualProblem()
Solve the dual problem for computing the Lagrange multiplier using a Newton solver.
Mesh data needed to do the Finite Volume discretisation.
bool adaptiveStep_
Change aJ and aC adaptively.
labelListList iHat_
List of constraints that must remain active.
label lastAcceleratedCycle_
Last cycle on which to reset aJ.
virtual bool writeData(Ostream &os) const
Write useful quantities to files.
scalarField dualMu_
Lagrange multipliers of the dual problem for flow-related constraints.
void updateViolatedIndices(const label i, const scalarField &constraints)
Update violated constraints indices (iTilda and iTildaEps)
void adjustStep(scalar &step, const scalar value, const scalar update)
Adjust step to satisfy cireteria.
bool strictMaxDVChange_
Whether to impose maxDVChange strictly on all optimisation cycles or just up to the lastAcceleratedCy...
labelListList iRangeSpace_
List of constraints the values of which need to be reduced.
A class for managing temporary objects.
virtual scalar computeMeritFunction()
Compute the merit function for line search.
scalarField dualL_
Lagrange multipliers of the dual problem for the lower bound constraints.
void statistics(const labelListList &subset, const word &description)
Print statistics on the number of flow- and bound-related constraints included in the subset...
labelListList iTildaEps_
List of saturated or violated constraints (up to epsConstr_)