68 public constrainedOptimisationMethod,
375 void operator=(
const MMA&);
398 virtual ~MMA() =
default;
label size() const noexcept
The number of elements in list.
tmp< scalarField > gConstr(const scalarField &vars)
g of all constraint functions
TypeName("MMA")
Runtime type information.
scalarField x0_
The previous design variables. Used to compute new bounds.
bool normalise_
Perform the normalisation.
scalar lineSearch()
Perform line search and return max residual corresponding to the updated solution.
void updateSolution(const scalar step)
Update the current solution using the known direction and the given step length.
void solveSubproblem()
Solve subproblem using a Newton optimiser.
void computeCorrection()
Compute design variables correction.
scalar maxInitRhoMult_
Multiplier of the mean derivative used for the initialisation of rho.
bool converged()
Checks convergence of GCMMA.
void initialize()
Allocate fields related to constraints.
scalar zeta_
Lagrange multiplier for the z constraint.
PtrList< scalarField > valsAndApproxs_
Objective/Constraint values and approximations in the new point.
scalarField mu_
Lagrange multipliers for the y constraints.
autoPtr< Function1< scalar > > c_
y multipliers in the objective function
scalarField alpha_
Terms multyplying z in the constraint functions.
scalar oldObjectiveValue_
Old objective value.
void adjustStep(scalar &step, const scalar value, const scalar update)
Adjust step to satisfy cireteria.
scalar maxRhoMult_
Multiplier for the max. rho value during its update.
virtual bool writeData(Ostream &os) const
Write useful quantities to files.
scalarField xNew_
The set of design variables being updated during the subproblem.
scalar sInit_
Used to update the assymptotes in the first optimisation cycle.
tmp< scalarField > q(const scalarField &derivs, const scalar r, const scalarField &x)
bool initializeEverySubproblem_
Initialize every subproblem with x = 0.5*(a + b) and reset Lagrange multipliers.
scalarField x00_
The twice previous design variables. Used to compute new bounds.
void updateValuesAndApproximations()
Compute objective/constraint values and their approximations.
void updateBounds()
Update the bounds associated with the design variables.
bool correctDVs_
Correct the design variables.
void computeNewtonDirection()
Compute direction for the Newton problem.
scalar move_
Movement of the unatainable upper and lower bounds.
scalarField ksi_
Lagrange multipliers for the lower limits constraints.
tmp< scalarField > b()
The rhs of the contraint approximations.
void initializeRho()
Initialize rho constants in the (p, q) functions.
tmp< scalarField > getOrDefaultScalarField(const word &name, const label size, const scalar value=Zero)
Read in scalarField from self (potentially in binary), or allocate field with the size of the active ...
scalar z_
Second term in the approximation function.
scalar fTilda(const scalarField &xInit, const scalarField &x, const scalar f, const scalarField &dfdx, const scalar rho)
Computation of the approximate function.
bool dynamicRhoInitialisation_
Change rho constants in each iteration?
scalarField b_
Upper design variables constraints.
bool continuousNormalisation_
Perform the normalisation in each optimisation cycle.
void zeroUpdates()
Zero the updates computed in the previous optimisation cycle.
tmp< scalarField > pLamda()
p and q functions, using the dual lamda
scalar eps_
Infinitesimal quantity.
scalarField d_
y^2 multipliers in the objective function
virtual ~MMA()=default
Destructor.
scalarField lamda_
Constraint Lagrange multipliers.
void updateRho()
Update rho value if needed.
label maxLineSearchIters_
Maxmimum number of line search iterations for each iteration of the subproblem.
scalarField upper_
Upper design variables asymptotes.
scalarField oldCValues_
Old constraint values.
scalar asymIncr_
Upper assymprote increase rate.
scalarField s_
Slack variables for the inequality constraints.
label lastNormalisationStep_
Constaint weight after the normalisation.
scalar cw_
Constaint weight after the normalisation.
scalarField a_
Lower design variables constraints.
scalar raa0_
Constant in p, q functions.
autoPtr< scalar > Jnorm_
Normalisation factor for the objective.
scalar asymDecr_
Lower assymprote reduction rate.
void setOrDefaultScalarField(scalarField &field, const word &name, const label size, const scalarField &defaultField)
Read in scalarField from self (potentially in binary), or allocate field with the size of the active ...
const scalarField & getRho() const
Get rho value if needed.
scalarField lower_
Lower design variables asymptotes.
bool variableRho_
Change rho constants in each iteration?
tmp< scalarField > qLamda()
void normalise()
Normalise the objective and constraints if necessary.
scalarField y_
y in the constraints functions
void storeOldValues()
Store old objcective and constraint values.
bool boundRho_
Bound the rho value with an upper value?
scalarField rho_
Constants in the (p,q) functions.
scalar dynamicRhoMult_
The rho values obtained by the dynamic rho initialisation might be too conservative....
tmp< scalarField > computeResiduals()
Compute and return residuals based on the current solution.
void updateSizes()
Update sizes of fields related to the active design variables.
tmp< scalarField > Cnorm_
Normalisation factors for the constraints.
scalar alpha0_
Term multiplying z in the objective function.
void setVariableRho(bool varRho=true)
Set variable rho.
label maxNewtonIters_
Maxmimum number of Newton iterations for the subproblem.
scalarField Eta_
Lagrange multipliers for the upper limits constraints.
const PtrList< scalarField > & getValuesAndApproximations() const
Get objective/constraint values and their approximations.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
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.
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)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
static constexpr const zero Zero
Global zero (0).
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.