continuation(3rheolef)
β¨ continuation β the nonlinear solver that follows the vibe of your solution π
okay bestie, so this is continuation, from rheolef-7.2, a manual page in section 3. Sit down, hydrate, and let me tell you about the glow-up solver that chases a whole branch of solutions as your parameter moves. π¦
πΈ SYNOPSIS πΈ
template<class Problem>
void continuation (
Problem& F,
typename Problem::value_type& uh,
odiststream* p_out,
odiststream* p_err,
const continuation_option& opts = continuation_option())
π DESCRIPTION π
This function is literally a generic damped Newton method, but make it β¨continuationβ¨. It solves this problem right here:
F(lambda,u) = 0
where lambda is a parameter, and u is the solution that goes with it β u depends on lambda, they're attached, it's giving soulmates fr fr. The whole idea is to follow a branch of solutions we call u(lambda) as the parameter lambda varies. So you don't just get one solution, you get the whole journey. π«Ά
A simple call to the algorithm looks like this:
my_problem P;
field uh (Vh,0);
continuation (P, uh, &dout, &derr);
And if you wanna be extra, the optional argument continuation_option(3) lets you control some features of the algorithm. no cap. π
The continuation algorithm is based on the damped_newton(3) method. But here's the tea: on top of everything damped_newton(3) needs from you, the continuation one asks for a few more members. Requirements are:
class my_problem {
public:
typedef float_type;
typedef value_type;
string parameter_name() const;
float_type parameter() const;
void set_parameter (float_type lambda);
value_type residue (const value_type& uh) const;
void update_derivative (const value_type& uh) const;
csr<float_type> derivative (const value_type& uh) const;
value_type derivative_solve (const value_type& mrh) const;
value_type derivative_trans_mult (const value_type& mrh) const;
value_type derivative_versus_parameter (const field& uh) const;
bool stop (const value_type& xh) const;
idiststream& get (idiststream& is, value_type& uh);
odiststream& put (odiststream& os, const value_type& uh) const;
float_type space_norm (const value_type& uh) const;
float_type dual_space_norm (const value_type& mrh) const;
float_type space_dot (const value_type& xh, const value_type& yh) const;
float_type dual_space_dot (const value_type& mrh, const value_type& msh) const;
value_type massify (const value_type& uh) const;
value_type unmassify (const value_type& mrh) const;
};
like, yes, that's a lot of methods, but you asked for the branch-following lifestyle so this is the price of admission bestie π
π₯ EXAMPLE π₯
Peep the combustion_continuation.cc example, and the usersguide if you want even more. both iconic, both worth your time. β
π§ ADAPTIVE MESH π§
There are two versions of this algorithm, and you don't get to pick, the code does:
- one with an imbedded mesh adaptation loop π
- one without this feature π
The algorithm is automatically selected when there's an adapt() method sitting in your problem definition. so basically if you wrote adapt(), you get the mesh-adapting one. periodt.
π IMPLEMENTATION π
This documentation has been generated from file main/lib/continuation.h β go look if you want the source, iykyk.
π AUTHOR π
Pierre Saramito <Pierre.Saramito@imag.fr> β the main character who wrote all this π«‘
π 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. read it again, bestie, NO WARRANTY π
rheolef Β· Version 7.2 Β· this was continuation(3rheolef) β mwah, go solve something pretty π
β¨
π¦ 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