Abstract base class for optimisation methods. More...
Public Member Functions | |
TypeName ("optimisationType") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, optimisationType, dictionary,(fvMesh &mesh, const dictionary &dict, PtrList< adjointSolverManager > &adjointSolverManagers),(mesh, dict, adjointSolverManagers)) | |
optimisationType (fvMesh &mesh, const dictionary &dict, PtrList< adjointSolverManager > &adjointSolverManagers) | |
Construct from components. More... | |
virtual | ~optimisationType ()=default |
virtual void | update () |
Update design variables. More... | |
virtual void | update (scalarField &correction) |
Update design variables based on a given correction. More... | |
virtual void | storeDesignVariables ()=0 |
Store design variables, as the starting point for line search. More... | |
virtual void | resetDesignVariables ()=0 |
Reset to starting point of line search. More... | |
virtual tmp< scalarField > | computeDirection () |
Compute update direction. More... | |
virtual void | updateGradientsAndValues (scalarField &objectiveSens, PtrList< scalarField > &constraintSens, scalar &objectiveValue, scalarField &constraintValues) |
Compute cumulative objective and constraint gradients. More... | |
virtual scalar | computeMeritFunction () |
Compute the merit function of the optimisation problem. More... | |
virtual scalar | meritFunctionDirectionalDerivative () |
Derivative of the merit function. More... | |
virtual void | updateOldCorrection (const scalarField &) |
Update old correction. Needed for quasi-Newton Methods. More... | |
virtual void | write () |
Write useful quantities to files. More... | |
const autoPtr< volScalarField > & | sourcePtr () |
Get source term. More... | |
autoPtr< lineSearch > & | getLineSearch () |
Get a reference to the line search object. More... | |
Static Public Member Functions | |
static autoPtr< optimisationType > | New (fvMesh &mesh, const dictionary &dict, PtrList< adjointSolverManager > &adjointSolverManagers) |
Return a reference to the selected turbulence model. More... | |
Protected Member Functions | |
virtual void | updateDesignVariables (scalarField &correction)=0 |
Update the design variables given their correction. More... | |
virtual void | computeEta (scalarField &correction)=0 |
Compute eta if not set in the first step. More... | |
Protected Attributes | |
fvMesh & | mesh_ |
const dictionary | dict_ |
PtrList< adjointSolverManager > & | adjointSolvManagers_ |
autoPtr< updateMethod > | updateMethod_ |
autoPtr< volScalarField > | sourcePtr_ |
autoPtr< lineSearch > | lineSearch_ |
Abstract base class for optimisation methods.
Definition at line 54 of file optimisationTypeIncompressible.H.
optimisationType | ( | fvMesh & | mesh, |
const dictionary & | dict, | ||
PtrList< adjointSolverManager > & | adjointSolverManagers | ||
) |
Construct from components.
Definition at line 43 of file optimisationTypeIncompressible.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::nl, and WarningInFunction.
|
virtualdefault |
|
protectedpure virtual |
Update the design variables given their correction.
Implemented in shapeOptimisation.
Referenced by optimisationType::update().
|
protectedpure virtual |
Compute eta if not set in the first step.
Implemented in shapeOptimisation.
Referenced by optimisationType::computeDirection().
TypeName | ( | "optimisationType" | ) |
Runtime type information.
declareRunTimeSelectionTable | ( | autoPtr | , |
optimisationType | , | ||
dictionary | , | ||
(fvMesh &mesh, const dictionary &dict, PtrList< adjointSolverManager > &adjointSolverManagers) | , | ||
(mesh, dict, adjointSolverManagers) | |||
) |
|
static |
Return a reference to the selected turbulence model.
Definition at line 120 of file optimisationTypeIncompressible.C.
References adjointSolverManagers, dict, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, Foam::Info, and mesh.
Referenced by steadyOptimisation::steadyOptimisation().
|
virtual |
Update design variables.
Definition at line 152 of file optimisationTypeIncompressible.C.
References optimisationType::computeDirection(), Foam::correction(), tmp< T >::ref(), optimisationType::updateOldCorrection(), and optimisationType::write().
|
virtual |
Update design variables based on a given correction.
Definition at line 168 of file optimisationTypeIncompressible.C.
References Foam::correction(), optimisationType::lineSearch_, and optimisationType::updateDesignVariables().
|
pure virtual |
Store design variables, as the starting point for line search.
Implemented in shapeOptimisation.
|
pure virtual |
Reset to starting point of line search.
Implemented in shapeOptimisation.
|
virtual |
Compute update direction.
Definition at line 182 of file optimisationTypeIncompressible.C.
References optimisationType::computeEta(), Foam::correction(), tmp< T >::ref(), UList< T >::size(), optimisationType::updateGradientsAndValues(), optimisationType::updateMethod_, and Foam::Zero.
Referenced by optimisationType::update().
|
virtual |
Compute cumulative objective and constraint gradients.
Definition at line 218 of file optimisationTypeIncompressible.C.
References UPtrList< T >::empty(), UList< T >::empty(), forAll, PtrList< T >::set(), PtrList< T >::setSize(), List< T >::setSize(), UPtrList< T >::size(), and Foam::Zero.
Referenced by optimisationType::computeDirection().
|
virtual |
Compute the merit function of the optimisation problem.
Could be different than the objective function in case of constraint optimisation
Definition at line 275 of file optimisationTypeIncompressible.C.
References optimisationType::adjointSolvManagers_, UList< T >::empty(), List< T >::setSize(), optimisationType::updateMethod_, and Foam::Zero.
|
virtual |
Derivative of the merit function.
Definition at line 302 of file optimisationTypeIncompressible.C.
References optimisationType::updateMethod_.
|
virtual |
Update old correction. Needed for quasi-Newton Methods.
Definition at line 308 of file optimisationTypeIncompressible.C.
References optimisationType::updateMethod_.
Referenced by optimisationType::update().
|
virtual |
Write useful quantities to files.
Reimplemented in shapeOptimisation.
Definition at line 314 of file optimisationTypeIncompressible.C.
References optimisationType::updateMethod_.
Referenced by optimisationType::update(), and shapeOptimisation::write().
const autoPtr< volScalarField > & sourcePtr | ( | ) |
Get source term.
Definition at line 320 of file optimisationTypeIncompressible.C.
References optimisationType::sourcePtr_.
autoPtr< lineSearch > & getLineSearch | ( | ) |
Get a reference to the line search object.
Definition at line 326 of file optimisationTypeIncompressible.C.
References optimisationType::lineSearch_.
|
protected |
Definition at line 60 of file optimisationTypeIncompressible.H.
Referenced by shapeOptimisation::updateDesignVariables().
|
protected |
Definition at line 61 of file optimisationTypeIncompressible.H.
|
protected |
Definition at line 62 of file optimisationTypeIncompressible.H.
Referenced by optimisationType::computeMeritFunction().
|
protected |
Definition at line 63 of file optimisationTypeIncompressible.H.
Referenced by optimisationType::computeDirection(), optimisationType::computeMeritFunction(), optimisationType::meritFunctionDirectionalDerivative(), optimisationType::updateOldCorrection(), shapeOptimisation::write(), and optimisationType::write().
|
protected |
Definition at line 64 of file optimisationTypeIncompressible.H.
Referenced by optimisationType::sourcePtr().
|
protected |
Definition at line 65 of file optimisationTypeIncompressible.H.
Referenced by optimisationType::getLineSearch(), and optimisationType::update().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.