This class defines a Newton solver for nonlinear systems of equations of the form \(F(x) = 0\).
More...
#include <NewtonSolver.h>
This class defines a Newton solver for nonlinear systems of equations of the form \(F(x) = 0\).
◆ NewtonSolver()
nls::NewtonSolver::NewtonSolver |
( |
MPI_Comm |
comm | ) |
|
|
explicit |
Create nonlinear solver.
- Parameters
-
[in] | comm | The MPI communicator for the solver |
◆ krylov_iterations()
int nls::NewtonSolver::krylov_iterations |
( |
| ) |
const |
Return number of Krylov iterations elapsed since solve started.
- Returns
- Number of iterations.
◆ residual()
double nls::NewtonSolver::residual |
( |
| ) |
const |
Return current residual.
- Returns
- Current residual
◆ residual0()
double nls::NewtonSolver::residual0 |
( |
| ) |
const |
Return initial residual.
- Returns
- Initial residual
◆ solve()
std::pair< int, bool > dolfinx::nls::NewtonSolver::solve |
( |
NonlinearProblem & |
nonlinear_function, |
|
|
Vec |
x |
|
) |
| |
Solve abstract nonlinear problem \(`F(x) = 0\) for given \(F\) and Jacobian \(\dfrac{\partial F}{\partial x}\).
- Parameters
-
[in] | nonlinear_function | The nonlinear problem |
[in,out] | x | The vector |
- Returns
- Pair of number of Newton iterations, and whether iteration converged)
The documentation for this class was generated from the following files:
- /build/dolfinx-EGDDvI/dolfinx-2019.2.0~git20200723.696fbc0/cpp/dolfinx/nls/NewtonSolver.h
- /build/dolfinx-EGDDvI/dolfinx-2019.2.0~git20200723.696fbc0/cpp/dolfinx/nls/NewtonSolver.cpp