Loading...
Searching...
No Matches
dolfin::OptimisationProblem Class Referenceabstract

`#include <OptimisationProblem.h>`

Inheritance diagram for dolfin::OptimisationProblem:
[legend]
Collaboration diagram for dolfin::OptimisationProblem:
[legend]

## Public Member Functions

| OptimisationProblem ()
| Constructor.
virtual | ~OptimisationProblem ()
| Destructor.
virtual double | f (const GenericVector &x)=0
| Compute the objective function :math:f(x).
virtual void | form (GenericMatrix &A, GenericMatrix &P, GenericVector &b, const GenericVector &x)
virtual void | F (GenericVector &b, const GenericVector &x)=0
| Compute the gradient :math:F(x) = f'(x).
virtual void | J (GenericMatrix &A, const GenericVector &x)=0
| Compute the Hessian :math:J(x) = f''(x).
virtual void | J_pc (GenericMatrix &P, const GenericVector &x)
Public Member Functions inherited from dolfin::NonlinearProblem
| NonlinearProblem ()
| Constructor.
virtual | ~NonlinearProblem ()
| Destructor.

## Detailed Description

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

## Member Function Documentation

## F()

virtual void dolfin::OptimisationProblem::F | ( | GenericVector & | b,
|  | const GenericVector & | x )

pure virtual

Compute the gradient :math:F(x) = f'(x).

Implements dolfin::NonlinearProblem.

## form()

virtual void dolfin::OptimisationProblem::form | ( | GenericMatrix & | A,
|  | GenericMatrix & | P,
|  | GenericVector & | b,
|  | const GenericVector & | x )

inline virtual

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

Reimplemented from dolfin::NonlinearProblem.

## J()

virtual void dolfin::OptimisationProblem::J | ( | GenericMatrix & | A,
|  | const GenericVector & | x )

pure virtual

Compute the Hessian :math:J(x) = f''(x).

Implements dolfin::NonlinearProblem.

## J_pc()

virtual void dolfin::OptimisationProblem::J_pc | ( | GenericMatrix & | P,
|  | const GenericVector & | x )

inline virtual

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.

Reimplemented from dolfin::NonlinearProblem.

The documentation for this class was generated from the following file:

- /build/dolfin-wwk1CC/dolfin-2019.2.0~legacy20240219.1c52e83/dolfin/nls/OptimisationProblem.h