damped_newton(3rheolef)
π 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 π
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
- debian trixie: librheolef-dev 7.2-4 Β· GPL-3.0-or-later
- ubuntu noble: librheolef-dev 7.2-3build5 Β· GPL-3.0-or-later
- ubuntu questing: librheolef-dev 7.2-4build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms