damped_newton(3rheolef)

πŸ“¦
version 7.2 Β· 4 versions
, in debian trixie, ubuntu noble, ubuntu questing

πŸ’… damped_newton β€” the nonlinear solver glow-up

okay bestie, welcome to damped_newton(3rheolef), part of the rheolef-7.2 era πŸŽ€ this is the nonlinear solver that just gets you.


✨ NAME ✨

damped_newton β€” nonlinear solver (rheolef-7.2) πŸ¦‹


🌸 SYNOPSIS 🌸

template <class Problem, class Field, class Real, class Size>
int damped_newton (const Problem& F, Field& u, Real& tol, Size& max_iter, odiststream* p_derr=0)

πŸ‘‘ DESCRIPTION πŸ‘‘

so this function is giving generic damped Newton method, and what it does is solve this little problem right here:

F(u) = 0

now real talk: the damped Newton method is more robust than the basic Newton one β€” like, it converges from any initial value. no cap. that's just built different. πŸ”₯

a simple call to the algorithm looks like this:

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

okay but here's the tea β˜• β€” on top of all the members you already need for the newton(3) method, the damped variant asks for two extra members:

class my_problem {
public:
  ...
  value_type derivative_trans_mult (const value_type& mrh) const;
  Float space_norm (const value_type& uh) const;
};

so what are these two doing?

  • derivative_trans_mult β€” this one is used for computing the damping coefficient πŸ’…
  • space_norm β€” this usually represents an L2 norm, and formally it's like:
                    /
space_norm(uh) = sqrt |       |uh(x)|^2 dx
                    / Omega

she's giving math, she's giving norm energy, she ate πŸ“


🧚 EXAMPLE 🧚

go look at the p_laplacian_damped_newton.cc example and the usersguide for more. iykyk ✨


πŸ’€ IMPLEMENTATION πŸ’€

this documentation has been generated from file main/lib/damped_newton.h β€” that's where she lives, that's her home 🏠


🫢 AUTHOR 🫢

Pierre Saramito <Pierre.Saramito@imag.fr> β€” the icon, the legend, the moment πŸ‘‘


Copyright (C) 2000-2018 Pierre Saramito <Pierre.Saramito@imag.fr> GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.

This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. ⚠️ (yes that's the all-caps serious part, respect it bestie)


rheolef, Version 7.2 β€” that's the source and version energy, and the date vibe is straight from the damped_newton(3rheolef) footer era. mwah πŸ’‹ go solve something nonlinear, you got this πŸ’–

πŸ“¦ where this page comes from