template<class LinearSolver>
Rodin::Solver::NewtonSolver class final

Newton solver for nonlinear systems.

Template parameters
LinearSolver Type of the linear solver used at each Newton step. Must have a FormLanguage::Traits specialization providing LinearSystemType.

The tangent linear system is assembled from the associated Variational::ProblemBase as:

\[ J(x) dx = -F(x), \]

and the state is updated with:

\[ x^{k + 1} = x^k + dx, \]

with $ x^0 $ given by the initial guess.

Convergence is checked using the residual norm $ \|F(x^k)\| $ with absolute and relative tolerances:

\[ \|F(x^k)\| \le \text{atol} \quad\text{or}\quad \|F(x^k)\| \le \text{rtol} \, \|F(x^0)\|. \]

Base classes

template<class LinearSolver>
class NewtonSolverBase<LinearSolver>
Abstract base class for Newton-type nonlinear solvers.

Constructors, destructors, conversion operators

NewtonSolver(LinearSolver& solver) explicit
Constructs a NewtonSolver from a linear solver reference.

Public functions

auto copy() const -> NewtonSolver* override noexcept
Creates a polymorphic copy of this object.
void solve(SolutionType& x) override
Solve a nonlinear system starting from the initial guess stored in x.

Function documentation

template<class LinearSolver>
Rodin::Solver::NewtonSolver<LinearSolver>::NewtonSolver(LinearSolver& solver) explicit

Constructs a NewtonSolver from a linear solver reference.

Parameters
solver The linear solver used at each Newton step. The associated ProblemBase is obtained from the solver via LinearSolverBase::getProblem().

template<class LinearSolver>
NewtonSolver* Rodin::Solver::NewtonSolver<LinearSolver>::copy() const override noexcept

Creates a polymorphic copy of this object.

Returns Pointer to a new instance that is a copy of this object. The caller is responsible for memory management.

template<class LinearSolver>
void Rodin::Solver::NewtonSolver<LinearSolver>::solve(SolutionType& x) override

Solve a nonlinear system starting from the initial guess stored in x.

Parameters
in/out On entry: initial guess. On exit: final Newton iterate.