40 #ifndef optimisationTypeIncompressible_H 41 #define optimisationTypeIncompressible_H 52 namespace incompressible
158 scalar& objectiveValue,
174 virtual void write();
tmp< fvMatrix< Type > > correction(const fvMatrix< Type > &)
Return the correction form of the given matrix by subtracting the matrix multiplied by the current fi...
virtual ~optimisationType()=default
virtual void updateDesignVariables(scalarField &correction)=0
Update the design variables given their correction.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
TypeName("optimisationType")
Runtime type information.
static autoPtr< optimisationType > New(fvMesh &mesh, const dictionary &dict, PtrList< adjointSolverManager > &adjointSolverManagers)
Return a reference to the selected turbulence model.
virtual void updateOldCorrection(const scalarField &)
Update old correction. Needed for quasi-Newton Methods.
virtual void update()
Update design variables.
Abstract base class for optimisation methods.
virtual void resetDesignVariables()=0
Reset to starting point of line search.
autoPtr< volScalarField > sourcePtr_
PtrList< adjointSolverManager > & adjointSolvManagers_
virtual tmp< scalarField > computeDirection()
Compute update direction.
autoPtr< updateMethod > updateMethod_
const autoPtr< volScalarField > & sourcePtr()
Get source term.
virtual void computeEta(scalarField &correction)=0
Compute eta if not set in the first step.
virtual void updateGradientsAndValues(scalarField &objectiveSens, PtrList< scalarField > &constraintSens, scalar &objectiveValue, scalarField &constraintValues)
Compute cumulative objective and constraint gradients.
virtual scalar meritFunctionDirectionalDerivative()
Derivative of the merit function.
declareRunTimeSelectionTable(autoPtr, optimisationType, dictionary,(fvMesh &mesh, const dictionary &dict, PtrList< adjointSolverManager > &adjointSolverManagers),(mesh, dict, adjointSolverManagers))
virtual scalar computeMeritFunction()
Compute the merit function of the optimisation problem.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
Mesh data needed to do the Finite Volume discretisation.
autoPtr< lineSearch > & getLineSearch()
Get a reference to the line search object.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
A class for managing temporary objects.
virtual void storeDesignVariables()=0
Store design variables, as the starting point for line search.
PtrList< adjointSolverManager > & adjointSolverManagers
autoPtr< lineSearch > lineSearch_
virtual void write()
Write useful quantities to files.