template<class LinearSolver>
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:: |
The tangent linear system is assembled from the associated Variational::
and the state is updated with:
with given by the initial guess.
Convergence is checked using the residual norm with absolute and relative tolerances:
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:: |
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 | |
|---|---|
| x in/out | On entry: initial guess. On exit: final Newton iterate. |