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

`#include <NonlinearProblem.h>`

Inheritance diagram for dolfin::NonlinearProblem:
[legend]

## Public Member Functions

| NonlinearProblem ()
| Constructor.
virtual | ~NonlinearProblem ()
| Destructor.
virtual void | form (GenericMatrix &A, GenericMatrix &P, GenericVector &b, const GenericVector &x)
virtual void | F (GenericVector &b, const GenericVector &x)=0
| Compute F at current point x.
virtual void | J (GenericMatrix &A, const GenericVector &x)=0
| Compute J = F' at current point x.
virtual void | J_pc (GenericMatrix &P, const GenericVector &x)

## Detailed Description

This is a base class for nonlinear problems which can return the nonlinear function F(u) and its Jacobian J = dF(u)/du.

## Member Function Documentation

## F()

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

pure virtual

Compute F at current point x.

Implemented in dolfin::OptimisationProblem.

## form()

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

inline virtual

Function called by Newton 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 in dolfin::OptimisationProblem.

## J()

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

pure virtual

Compute J = F' at current point x.

Implemented in dolfin::OptimisationProblem.

## J_pc()

virtual void dolfin::NonlinearProblem::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 in dolfin::OptimisationProblem.

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

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