ENH: changes related to when the objective value is written
- Objective now inherits from localIOdictionary and writes the mean objective value under the uniform folder, each time mesh.write() is called. This is crucial for getting the correct old merit function value if the simulation is continued from a previous state and lineSearch is used. - Objectives are now computed and written even if the corresponding adjoint solver is inactive. This, among others, is also essential for getting the correct old merit function value in case of continuation. - Writing of the objective function (and its mean, if present) history has now moved to updatePrimalBasedQuantities, instead of the preLoop part of the adjoint solvers. This was decided to get the objective values to files, even if the adjoint solver is inactive. Arguably, an even better place to write the objective functions would be the postLoop part of the primal solvers, however this might cause multiple writes of the objective value for the inner iterations of lineSearch, if one is used.
Showing
- src/optimisation/adjointOptimisation/adjoint/objectives/objective/objective.C 24 additions, 32 deletions...ointOptimisation/adjoint/objectives/objective/objective.C
- src/optimisation/adjointOptimisation/adjoint/objectives/objective/objective.H 12 additions, 2 deletions...ointOptimisation/adjoint/objectives/objective/objective.H
- src/optimisation/adjointOptimisation/adjoint/solvers/adjointSolvers/incompressible/adjointSimple/adjointSimple.C 11 additions, 5 deletions...jointSolvers/incompressible/adjointSimple/adjointSimple.C
- src/optimisation/adjointOptimisation/adjoint/solvers/adjointSolvers/incompressible/adjointSimple/adjointSimple.H 10 additions, 2 deletions...jointSolvers/incompressible/adjointSimple/adjointSimple.H
- src/optimisation/adjointOptimisation/adjoint/solvers/primalSolvers/incompressible/incompressiblePrimalSolver/incompressiblePrimalSolver.C 3 additions, 3 deletions...e/incompressiblePrimalSolver/incompressiblePrimalSolver.C
Please register or sign in to comment