The quasi-Newton Symmetric Rank One formula. More...


Public Member Functions | |
| TypeName ("SR1") | |
| Runtime type information. More... | |
| SR1 (const fvMesh &mesh, const dictionary &dict) | |
| Construct from components. More... | |
| virtual | ~SR1 ()=default |
| Destructor. More... | |
| void | computeCorrection () |
| Compute design variables correction. More... | |
| virtual void | updateOldCorrection (const scalarField &oldCorrection) |
| Update old correction. Useful for quasi-Newton methods coupled with line search. More... | |
| virtual void | write () |
| Write old info to dict. More... | |
Public Member Functions inherited from updateMethod | |
| TypeName ("updateMethod") | |
| Runtime type information. More... | |
| declareRunTimeSelectionTable (autoPtr, updateMethod, dictionary,(const fvMesh &mesh, const dictionary &dict),(mesh, dict)) | |
| updateMethod (const fvMesh &mesh, const dictionary &dict) | |
| Construct from components. More... | |
| virtual | ~updateMethod ()=default |
| Destructor. More... | |
| void | setObjectiveDeriv (const scalarField &derivs) |
| Set objective derivative. More... | |
| void | setConstraintDeriv (const PtrList< scalarField > &derivs) |
| Set constraints derivative. More... | |
| void | setObjectiveValue (const scalar value) |
| Set constraints derivative. More... | |
| void | setConstraintValues (const scalarField &values) |
| Set constraints derivative. More... | |
| void | setStep (const scalar eta) |
| Set step for optimisation methods. More... | |
| void | setGlobalSum (const bool useGlobalSum) |
| Set globalSum variable. More... | |
| scalarField & | returnCorrection () |
| Return the correction of the design variables. More... | |
| void | writeCorrection () |
| virtual scalar | computeMeritFunction () |
| Compute merit function. Could be different than the objective in the presence of constraints. More... | |
| virtual scalar | meritFunctionDirectionalDerivative () |
| Directional derivative of the merit function, in the direction of the correction. Could be different than the objective directional derivative in the presence of constraints. More... | |
| bool & | initialEtaSet () |
| Return whether initial eta was set. More... | |
Protected Member Functions | |
| void | allocateMatrices () |
| Allocate matrices in the first optimisation cycle. More... | |
| void | updateHessian () |
| Update approximation of the inverse Hessian. More... | |
| void | update () |
| Update design variables. More... | |
| void | readFromDict () |
| Read old info from dict. More... | |
Protected Member Functions inherited from updateMethod | |
| const scalarField | leftMult (const scalarField &, const SquareMatrix< scalar > &) |
| const scalarField | rightMult (const SquareMatrix< scalar > &, const scalarField &) |
| SquareMatrix< scalar > | outerProd (const scalarField &, const scalarField &) |
| SquareMatrix< scalar > | inv (SquareMatrix< scalar > A) |
| scalar | globalSum (const scalarField &field) |
| Compute either global or local sum, based on globalSum flag. More... | |
| scalar | globalSum (tmp< scalarField > &tfield) |
| Compute either global or local sum, based on globalSum flag. More... | |
| dictionary | coeffsDict () |
| Return optional dictionary with parameters specific to each method. More... | |
Protected Attributes | |
| scalar | etaHessian_ |
| Step for the Newton method. More... | |
| label | nSteepestDescent_ |
| Number of first steepest descent steps. More... | |
| scalar | ratioThreshold_ |
| For stability check. More... | |
| labelList | activeDesignVars_ |
| Map to active design variables. More... | |
| SquareMatrix< scalar > | HessianInv_ |
| The Hessian inverse. Should have the size of the active design variables. More... | |
| SquareMatrix< scalar > | HessianInvOld_ |
| The previous Hessian inverse. More... | |
| scalarField | derivativesOld_ |
| The previous derivatives. More... | |
| scalarField | correctionOld_ |
| The previous correction. More... | |
| label | counter_ |
| Optimisation counter. More... | |
Protected Attributes inherited from updateMethod | |
| const fvMesh & | mesh_ |
| const dictionary | dict_ |
| IOdictionary | optMethodIODict_ |
| Used to output values useful for continuation runs. More... | |
| scalarField | objectiveDerivatives_ |
| Derivatives of the objective functions. More... | |
| PtrList< scalarField > | constraintDerivatives_ |
| Derivatives of the constraints. More... | |
| scalar | objectiveValue_ |
| Objective value. More... | |
| scalarField | cValues_ |
| Constraint values. More... | |
| scalarField | correction_ |
| Design variables correction. More... | |
| scalarField | cumulativeCorrection_ |
| Cumulative design variables correction throughout the optimisation loop. More... | |
| scalar | eta_ |
| Step multiplying the correction. More... | |
| bool | initialEtaSet_ |
| Is initially set? More... | |
| word | correctionFolder_ |
| Folder storing the corrections to file. More... | |
| bool | globalSum_ |
| Whether to use gSum or sum in the inner products. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from updateMethod | |
| static autoPtr< updateMethod > | New (const fvMesh &mesh, const dictionary &dict) |
| Return a reference to the selected turbulence model. More... | |
The quasi-Newton Symmetric Rank One formula.
| SR1 | ( | const fvMesh & | mesh, |
| const dictionary & | dict | ||
| ) |
Construct from components.
Definition at line 152 of file SR1.C.
References SR1::activeDesignVars_, updateMethod::coeffsDict(), Foam::endl(), Foam::Info, SR1::readFromDict(), and readIfPresent().

|
virtualdefault |
Destructor.
|
protected |
Allocate matrices in the first optimisation cycle.
Definition at line 42 of file SR1.C.
References SR1::activeDesignVars_, UList< T >::empty(), forAll, SR1::HessianInv_, SR1::HessianInvOld_, Foam::identity(), updateMethod::objectiveDerivatives_, UList< T >::size(), and Foam::Zero.

|
protected |
Update approximation of the inverse Hessian.
Definition at line 64 of file SR1.C.
References Foam::endl(), s, Foam::sqr(), Foam::sqrt(), WarningInFunction, y, and Foam::Zero.

|
protected |
Update design variables.
Definition at line 95 of file SR1.C.
References Foam::endl(), forAll, Foam::Info, Field< Type >::map(), and Foam::Zero.

|
protected |
Read old info from dict.
Definition at line 128 of file SR1.C.
References Foam::identity(), n, and Foam::Zero.
Referenced by SR1::SR1().


| TypeName | ( | "SR1" | ) |
Runtime type information.
|
virtual |
Compute design variables correction.
Implements updateMethod.
Definition at line 194 of file SR1.C.
References update().

|
virtual |
Update old correction. Useful for quasi-Newton methods coupled with line search.
Reimplemented from updateMethod.
Definition at line 210 of file SR1.C.
References updateMethod::updateOldCorrection().

|
virtual |
Write old info to dict.
Reimplemented from updateMethod.
Definition at line 217 of file SR1.C.
References updateMethod::write().

|
protected |
|
protected |
Map to active design variables.
Definition at line 76 of file SR1.H.
Referenced by SR1::allocateMatrices(), and SR1::SR1().
|
protected |
The Hessian inverse. Should have the size of the active design variables.
Definition at line 82 of file SR1.H.
Referenced by SR1::allocateMatrices().
|
protected |
The previous Hessian inverse.
Definition at line 87 of file SR1.H.
Referenced by SR1::allocateMatrices().
|
protected |
|
protected |
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.