40 #ifndef optimisationManager_H 41 #define optimisationManager_H 102 const label startTimeIndex,
208 virtual optimisationManager&
operator++() = 0;
211 virtual optimisationManager&
operator++(
int) = 0;
218 virtual bool end() = 0;
221 virtual bool update() = 0;
static autoPtr< optimisationManager > New(fvMesh &mesh)
Return a reference to the selected turbulence model.
virtual bool checkEndOfLoopAndUpdate()=0
Return true if end of optimisation run.
PtrList< adjointSolverManager > adjointSolverManagers_
List of adjoint solver managers to be included in the optimisation.
void fixedStepUpdate()
Update design variables using a fixed step.
virtual void updatePrimalBasedQuantities()
Solve all primal equations.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
fvMesh & mesh_
Reference to the mesh.
Abstract base class for optimisation methods.
Time & time_
Reference to the time.
declareRunTimeSelectionTable(autoPtr, optimisationManager, dictionary,(fvMesh &mesh),(mesh))
autoPtr< designVariablesUpdate > & getOptimisationType()
Get the mechanism supporting the update of the design variables.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, any/none. Also accepts 0/1 as a string and shortcuts t/f, y/n.
autoPtr< designVariablesUpdate > dvUpdate_
Helper class managing parts of the optimisation.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
virtual void initialize()
Initialization. Construct primal and adjoint solvers.
PtrList< primalSolver > primalSolvers_
List of primal solvers to be included in the optimisation.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
const word managerType_
Type of the optimisation manager (singleRun, (un)steadyOptimisation)
A class for handling words, derived from Foam::string.
virtual ~optimisationManager()=default
Destructor.
void lineSearchUpdate()
Update design variables using a line-search.
PtrList< primalSolver > & primalSolvers()
Get the primal solvers.
PtrList< adjointSolverManager > & adjointSolverManagers()
Get the adjoint solver managers.
virtual void resetTime(const dimensionedScalar startTime, const label startTimeIndex, const scalar endTime)
Reset time.
virtual void moveDesignVariables()
Update design variables.
virtual bool end()=0
Return true if end of optimisation run.
autoPtr< designVariables > designVars_
Design variables of the optimisation problem.
virtual void computeSensitivities()
Compute all adjoint sensitivities.
virtual optimisationManager & operator++()=0
Prefix increment.
Switch shouldUpdateDesignVariables_
Switch defining if the design variables should be updated or not.
virtual void solveAdjointEquations()
Solve all adjoint equations.
TypeName("optimisationManager")
Runtime type information.
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< designVariables > & getDesignVariables()
Get the design variables.
virtual void clearSensitivities()
Clear all adjoint sensitivities.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Macros to ease declaration of run-time selection tables.
virtual bool read()
Changes in case of run-time update of optimisationDict.
virtual bool update()=0
Whether to update the design variables.
virtual void solvePrimalEquations()
Solve all primal equations.
virtual void updateDesignVariables()
Update design variables.