Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
optimisationType Class Referenceabstract

Abstract base class for optimisation methods. More...

Inheritance diagram for optimisationType:
Inheritance graph
[legend]
Collaboration diagram for optimisationType:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("optimisationType")
 
 declareRunTimeSelectionTable (autoPtr, optimisationType, dictionary,(fvMesh &mesh, const dictionary &dict, PtrList< adjointSolverManager > &adjointSolverManagers),(mesh, dict, adjointSolverManagers))
 
 optimisationType (fvMesh &mesh, const dictionary &dict, PtrList< adjointSolverManager > &adjointSolverManagers)
 
virtual ~optimisationType ()=default
 
virtual void update ()
 
virtual void update (scalarField &correction)
 
virtual void storeDesignVariables ()=0
 
virtual void resetDesignVariables ()=0
 
virtual tmp< scalarFieldcomputeDirection ()
 
virtual void updateGradientsAndValues (scalarField &objectiveSens, PtrList< scalarField > &constraintSens, scalar &objectiveValue, scalarField &constraintValues)
 
virtual scalar computeMeritFunction ()
 
virtual scalar meritFunctionDirectionalDerivative ()
 
virtual void updateOldCorrection (const scalarField &)
 
virtual void write ()
 
const autoPtr< volScalarField > & sourcePtr ()
 
autoPtr< lineSearch > & getLineSearch ()
 

Static Public Member Functions

static autoPtr< optimisationTypeNew (fvMesh &mesh, const dictionary &dict, PtrList< adjointSolverManager > &adjointSolverManagers)
 

Protected Member Functions

virtual void updateDesignVariables (scalarField &correction)=0
 
virtual void computeEta (scalarField &correction)=0
 

Protected Attributes

fvMeshmesh_
 
const dictionary dict_
 
PtrList< adjointSolverManager > & adjointSolvManagers_
 
autoPtr< updateMethodupdateMethod_
 
autoPtr< volScalarFieldsourcePtr_
 
autoPtr< lineSearchlineSearch_
 

Detailed Description

Abstract base class for optimisation methods.

Source files

Definition at line 54 of file optimisationTypeIncompressible.H.

Constructor & Destructor Documentation

◆ optimisationType()

optimisationType ( fvMesh mesh,
const dictionary dict,
PtrList< adjointSolverManager > &  adjointSolverManagers 
)

Definition at line 43 of file optimisationTypeIncompressible.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::nl, and WarningInFunction.

Here is the call graph for this function:

◆ ~optimisationType()

virtual ~optimisationType ( )
virtualdefault

Member Function Documentation

◆ updateDesignVariables()

virtual void updateDesignVariables ( scalarField correction)
protectedpure virtual

Implemented in shapeOptimisation.

Referenced by optimisationType::update().

Here is the caller graph for this function:

◆ computeEta()

virtual void computeEta ( scalarField correction)
protectedpure virtual

Implemented in shapeOptimisation.

Referenced by optimisationType::computeDirection().

Here is the caller graph for this function:

◆ TypeName()

TypeName ( "optimisationType"  )

◆ declareRunTimeSelectionTable()

◆ New()

autoPtr< optimisationType > New ( fvMesh mesh,
const dictionary dict,
PtrList< adjointSolverManager > &  adjointSolverManagers 
)
static

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update() [1/2]

void update ( )
virtual

◆ update() [2/2]

void update ( scalarField correction)
virtual

Definition at line 168 of file optimisationTypeIncompressible.C.

References Foam::correction(), optimisationType::lineSearch_, and optimisationType::updateDesignVariables().

Here is the call graph for this function:

◆ storeDesignVariables()

virtual void storeDesignVariables ( )
pure virtual

Implemented in shapeOptimisation.

◆ resetDesignVariables()

virtual void resetDesignVariables ( )
pure virtual

Implemented in shapeOptimisation.

◆ computeDirection()

tmp< scalarField > computeDirection ( )
virtual

Definition at line 182 of file optimisationTypeIncompressible.C.

References optimisationType::computeEta(), Foam::correction(), tmp::ref(), optimisationType::updateGradientsAndValues(), optimisationType::updateMethod_, and Foam::Zero.

Referenced by optimisationType::update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateGradientsAndValues()

void updateGradientsAndValues ( scalarField objectiveSens,
PtrList< scalarField > &  constraintSens,
scalar &  objectiveValue,
scalarField constraintValues 
)
virtual

Definition at line 218 of file optimisationTypeIncompressible.C.

References forAll, PtrList::set(), PtrList::setSize(), and Foam::Zero.

Referenced by optimisationType::computeDirection().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeMeritFunction()

scalar computeMeritFunction ( )
virtual

◆ meritFunctionDirectionalDerivative()

scalar meritFunctionDirectionalDerivative ( )
virtual

Definition at line 302 of file optimisationTypeIncompressible.C.

References optimisationType::updateMethod_.

◆ updateOldCorrection()

void updateOldCorrection ( const scalarField oldCorrection)
virtual

Definition at line 308 of file optimisationTypeIncompressible.C.

References optimisationType::updateMethod_.

Referenced by optimisationType::update().

Here is the caller graph for this function:

◆ write()

void write ( )
virtual

Reimplemented in shapeOptimisation.

Definition at line 314 of file optimisationTypeIncompressible.C.

References optimisationType::updateMethod_.

Referenced by optimisationType::update(), and shapeOptimisation::write().

Here is the caller graph for this function:

◆ sourcePtr()

const autoPtr< volScalarField > & sourcePtr ( )

Definition at line 320 of file optimisationTypeIncompressible.C.

References optimisationType::sourcePtr_.

◆ getLineSearch()

autoPtr< lineSearch > & getLineSearch ( )

Definition at line 326 of file optimisationTypeIncompressible.C.

References optimisationType::lineSearch_.

Member Data Documentation

◆ mesh_

fvMesh& mesh_
protected

◆ dict_

const dictionary dict_
protected

Definition at line 61 of file optimisationTypeIncompressible.H.

◆ adjointSolvManagers_

PtrList<adjointSolverManager>& adjointSolvManagers_
protected

◆ updateMethod_

autoPtr<updateMethod> updateMethod_
protected

◆ sourcePtr_

autoPtr<volScalarField> sourcePtr_
protected

Definition at line 64 of file optimisationTypeIncompressible.H.

Referenced by optimisationType::sourcePtr().

◆ lineSearch_

autoPtr<lineSearch> lineSearch_
protected

The documentation for this class was generated from the following files: