OptimisationProblem.h¶
Note
The documentation on this page was automatically extracted from the DOLFIN C++ code and may need to be edited or expanded.
-
class
OptimisationProblem
¶ Parent class(es)
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 \(J(x) = f''(x)\)
-
OptimisationProblem
()¶ Constructor
-
double
f
(const GenericVector &x) = 0¶ Compute the objective function \(f(x)\)
-
void
form
(GenericMatrix &A, GenericVector &b, const GenericVector &x)¶ Compute the Hessian \(J(x)=f''(x)\) and the gradient \(F(x)=f'(x)\) together. Called before requesting F or J. NOTE: This function is deprecated. Use variant with preconditioner
-
void
form
(GenericMatrix &A, GenericMatrix &P, GenericVector &b, const GenericVector &x)¶ Function called by the solver before requesting F, J or J_pc. This can be used to compute F, J and J_pc together. Preconditioner matrix P can be left empty so that A is used instead
-
void
F
(GenericVector &b, const GenericVector &x) = 0¶ Compute the gradient \(F(x) = f'(x)\)
-
void
J
(GenericMatrix &A, const GenericVector &x) = 0¶ Compute the Hessian \(J(x) = f''(x)\)
-
void
J_pc
(GenericMatrix &P, const GenericVector &x)¶ 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.
-