# OptimisationProblem¶

class dolfin.cpp.la.OptimisationProblem

This is a base class for nonlinear optimisation problems which return the real-valued objective function $$f(x)$$ , its gradient $$F(x) = f'(x)and its Hessian :math:$$ J(x) = f’‘(x)

Constructor.

F()

Compute the gradient $$F(x) = f'(x)$$.

Parameters: & b (GenericVector) – GenericVector & x (const) – void
J()

Compute the Hessian $$J(x) = f''(x)$$.

Parameters: & A (GenericMatrix) – GenericVector & x (const) – void
J_pc()

Compute J_pc used to precondition J. Not implementing this or leaving P empty results in system matrix A being used to construct preconditioner. Note that if nonempty P is not assembled on first call then a solver implementation may throw away P and not call this routine ever again.

Parameters: & P (GenericMatrix) – GenericVector & x (const) – void
f()

Compute the objective function $$f(x)$$

Parameters: GenericVector & x (const) – double
form()

Compute the Hessian $$J(x)=f''(x)and the gradient :math:$$ F(x)=f’(x) together. Called before requesting F or J. NOTE: This function is deprecated. Use variant with preconditioner

Parameters: & A (GenericMatrix) – & b (GenericVector) – GenericVector & x (const) – void
thisown

The membership flag