2.7. Reduced functional¶
- class opentidalfarm.reduced_functional.ReducedFunctional(functional, controls, solver, parameters)[source]¶
Following parameters are expected:
- Variables:
functional – a
PrototypeFunctional
class.controls – a
TurbineFarmControl
ordolfin_adjoint.DolfinAdjointControl
class.solver – a
Solver
object.parameters – a
ReducedFunctionalParameters
object.
This class has a parameter attribute for further adjustments.
- static default_parameters()[source]¶
Return the default parameters for the
ReducedFunctional
.
- derivative(m_array, forget=True, **kwargs)[source]¶
Computes the first derivative of the functional with respect to its parameters by solving the adjoint equations.
- class opentidalfarm.reduced_functional.ReducedFunctionalParameters[source]¶
A set of parameters for a
ReducedFunctional
.Following parameters are available:
- Variables:
scale – A scaling factor. Default: 1.0
automatic_scaling – The reduced functional will be automatically scaled such that the maximum absolute value of the initial gradient is equal to the specified factor. Set to False to deactivate the automatic scaling. Default: 5.
load_checkpoints – If True, the checkpoints are loaded from file and used. Default: False
save_checkpoints – Automatically store checkpoints after each search iteration. Default: False
checkpoint_basefilename – The base filename (without extensions) for storing or loading the checkpoints. Default: ‘checkpoints’.