newton(3rheolef)

newton3rheolef

Nonlinear solver (rheolef-7.2)

Usage

template <class Problem, class Field>
int newton (const Problem& P, Field& uh, Float& tol, size_t& max_iter, odiststream *p_derr = 0)

Overview

This function implements a generic Newton method for the resolution of the following problem:

    F(u) = 0

A simple call to the algorithm writes:

    my_problem P;
    field uh (Xh);
    newton (P, uh, tol, max_iter);

The my_problem class should contain some methods for the evaluation of F, i.e. the residue of the problem, and its derivative. The minimal requirements are:

    class my_problem {
    public:
      typedef value_type;
      value_type residue           (const value_type& uh)  const;
      void update_derivative       (const value_type& uh)  const;
      value_type  derivative_solve (const value_type& mrh) const;
      Float dual_space_norm        (const value_type& mrh) const;
    };

The value_type could be a field(2). The Newton method could also be applied when value_type is a simple Float scalar. Conversely, it supports multi-field extensions.

The update_derivative and derivative_solver members are called at each step of the Newton algorithm.

The dual_space_norm member function returns a scalar from the weighted residual field term mrh returned by the residue function: this scalar is used as the stopping criterion of the algorithm.

Examples

See the p_laplacian_newton.cc example and the usersguide for more.

Implementation

This documentation has been generated from file main/lib/newton.h

Releases

3 releases since Debian 11 (Bullseye); the text changed 2 times.

  1. 11
  2. 12
  3. 13

Author

Pierre Saramito <[email protected]>

From librheolef-dev 7.2-4 in Debian 13 (Trixie). Parsed by carta from the page's man source.