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