375 void operator=(
const MMA&);
398 virtual ~MMA() =
default;
tmp< scalarField > pLamda()
p and q functions, using the dual lamda
scalarField ksi_
Lagrange multipliers for the lower limits constraints.
void setVariableRho(bool varRho=true)
Set variable rho.
void solveSubproblem()
Solve subproblem using a Newton optimiser.
bool correctDVs_
Correct the design variables.
Abstract base class for optimisation methods supporting constraints. Does not add functionality to up...
scalarField alpha_
Terms multyplying z in the constraint functions.
void computeCorrection()
Compute design variables correction.
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 ...
label nConstraints() const
Get the number of constraints.
tmp< scalarField > b()
The rhs of the contraint approximations.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
scalarField lamda_
Constraint Lagrange multipliers.
tmp< scalarField > qLamda()
scalarField s_
Slack variables for the inequality constraints.
void computeNewtonDirection()
Compute direction for the Newton problem.
Abstract base class for optimisation methods.
label maxNewtonIters_
Maxmimum number of Newton iterations for the subproblem.
void updateValuesAndApproximations()
Compute objective/constraint values and their approximations.
void updateSolution(const scalar step)
Update the current solution using the known direction and the given step length.
virtual bool writeData(Ostream &os) const
Write useful quantities to files.
tmp< scalarField > p(const scalarField &derivs, const scalar r, const scalarField &x)
p and q functions, used to approximate the objective and contraints
bool converged()
Checks convergence of GCMMA.
autoPtr< scalar > Jnorm_
Normalisation factor for the objective.
virtual ~MMA()=default
Destructor.
scalar asymIncr_
Upper assymprote increase rate.
PtrList< scalarField > valsAndApproxs_
Objective/Constraint values and approximations in the new point.
scalar asymDecr_
Lower assymprote reduction rate.
scalarField rho_
Constants in the (p,q) functions.
scalarField b_
Upper design variables constraints.
scalar sInit_
Used to update the assymptotes in the first optimisation cycle.
scalarField d_
y^2 multipliers in the objective function
scalarField lower_
Lower design variables asymptotes.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
tmp< scalarField > q(const scalarField &derivs, const scalar r, const scalarField &x)
void normalise()
Normalise the objective and constraints if necessary.
scalarField mu_
Lagrange multipliers for the y constraints.
tmp< scalarField > Cnorm_
Normalisation factors for the constraints.
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 ...
void updateRho()
Update rho value if needed.
bool variableRho_
Change rho constants in each iteration?
A class for handling words, derived from Foam::string.
const scalarField & getRho() const
Get rho value if needed.
tmp< scalarField > gConstr(const scalarField &vars)
g of all constraint functions
scalar z_
Second term in the approximation function.
void adjustStep(scalar &step, const scalar value, const scalar update)
Adjust step to satisfy cireteria.
const word & name() const
Name function is needed to disambiguate those inherited from regIOobject and dictionary.
scalarField oldCValues_
Old constraint values.
scalarField x00_
The twice previous design variables. Used to compute new bounds.
label lastNormalisationStep_
Constaint weight after the normalisation.
bool initializeEverySubproblem_
Initialize every subproblem with x = 0.5*(a + b) and reset Lagrange multipliers.
scalar eps_
Infinitesimal quantity.
Update design variables using the Method of Moving Assymptotes. Can handle inequality constraints...
An Ostream is an abstract base class for all output systems (streams, files, token lists...
scalar maxInitRhoMult_
Multiplier of the mean derivative used for the initialisation of rho.
bool dynamicRhoInitialisation_
Change rho constants in each iteration?
OBJstream os(runTime.globalPath()/outputName)
scalar raa0_
Constant in p, q functions.
bool boundRho_
Bound the rho value with an upper value?
scalarField a_
Lower design variables constraints.
scalar maxRhoMult_
Multiplier for the max. rho value during its update.
tmp< scalarField > computeResiduals()
Compute and return residuals based on the current solution.
scalarField c_
y multipliers in the objective function
scalarField xNew_
The set of design variables being updated during the subproblem.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
void updateSizes()
Update sizes of fields related to the active design variables.
Mesh data needed to do the Finite Volume discretisation.
scalar lineSearch()
Perform line search and return max residual corresponding to the updated solution.
const PtrList< scalarField > & getValuesAndApproximations() const
Get objective/constraint values and their approximations.
scalar cw_
Constaint weight after the normalisation.
void zeroUpdates()
Zero the updates computed in the previous optimisation cycle.
void initializeRho()
Initialize rho constants in the (p, q) functions.
scalar dynamicRhoMult_
The rho values obtained by the dynamic rho initialisation might be too conservative. Multiply with this number to relax them.
scalar move_
Movement of the unatainable upper and lower bounds.
scalar alpha0_
Term multiplying z in the objective function.
scalarField upper_
Upper design variables asymptotes.
label maxLineSearchIters_
Maxmimum number of line search iterations for each iteration of the subproblem.
scalarField Eta_
Lagrange multipliers for the upper limits constraints.
scalarField y_
y in the constraints functions
scalar zeta_
Lagrange multiplier for the z constraint.
A class for managing temporary objects.
TypeName("MMA")
Runtime type information.
void updateBounds()
Update the bounds associated with the design variables.
bool continuousNormalisation_
Perform the normalisation in each optimisation cycle.
void initialize()
Allocate fields related to constraints.
void storeOldValues()
Store old objcective and constraint values.
scalar fTilda(const scalarField &xInit, const scalarField &x, const scalar f, const scalarField &dfdx, const scalar rho)
Computation of the approximate function.
scalarField x0_
The previous design variables. Used to compute new bounds.
scalar oldObjectiveValue_
Old objective value.
static constexpr const zero Zero
Global zero (0)
bool normalise_
Perform the normalisation.