FIX: functions objects in optimisation
In steadyOptimisation mode, each time-step corresponds to an optimisation cycle and is sub-cycled, to allow for iterating the flow and adjoint equations. This sub-cycling does not allow the execution of function objects. This was circumvented in 8947735b, by explicitly calling the execution of the function objects in the simple solver of adjointOptimisationFoam.
However, each sub-cycled iteration is a writeTime, if the current optimisation cycle corresponds to a writeTime. This means that function objects with a
writeControl write;
will be executed in each iteration of the flow equations, within this specific optimisation cycle, leading to a lot of disc space and file clutter, if the function object outputs fields (e.g. yPlus).
8947735b is partially rolled back, by protecting the call to the execution of the function objects with a bool that defaults to false, restoring the default behavior to that prior to 8947735b.