interpolate(3rheolef)
β¨ interpolate β bestie edition β¨
okay so you found the interpolate page in the rheolef manual, section 3rheolef, and honestly? you're about to have a great time. sit down, hydrate, let's go π
πΈ NAME πΈ
interpolate β function or expression interpolation, as in, the whole vibe of taking a function and making it live on your finite element space. (this is rheolef-7.2, for the record π)
π DESCRIPTION π
so the interpolation function is literally just the classic Lagrange interpolation of a function or a class-function, landing on a finite element space(2). that's it. that's the whole thing. she does one job and she ate π₯
π SYNOPSIS π
template <class Expression>
field interpolate (const space& Xh, const Expression& expr);
Example β the way this computes the Lagrange interpolation pi_h_u of the function u(x):
Float u(const point& x) { return exp(x[0]*x[1]); }
...
geo omega('square');
space Xh (omega, 'P1');
field pi_h_u = interpolate (Xh, u);
like, look at her go. iconic. no notes π
π¦ EXPRESSIONS π¦
plot twist bestie: you can also interpolate an expression that's a whole combination of functions, class-functions and fields. not just one lil function, a whole situation:
field vh = interpolate (Xh, sqrt(uh) + 2*max(0.,uh));
math but make it fashion β¨
π§ REINTERPOLATION π§
you can also reinterpolate a field onto another mesh, or onto another finite element space. same energy, new home:
geo omega2 ('square2');
space X2h (omega2, 'P1');
field uh2 = interpolate (X2h, pi_h_u);
and fr fr, this kind of reinterpolation is very frequent in mesh adaptive loops β it's basically the main character of every adaptive workflow π«
π οΈ IMPLEMENTATION π οΈ
this documentation has been generated from the file main/lib/interpolate.h π
the implementation of expressions bases on the expression template and SFINAE C++ idioms. (iykyk β that's some real C++ sorcery right there πͺ)
π AUTHOR π
Pierre Saramito <Pierre.Saramito@imag.fr> π
π 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.
okay important disclaimer bestie: this is free software, you can change it and redistribute it, but there is NO WARRANTY, to the extent permitted by law. so no blaming anyone if it goes sideways, got it? π«Ά
and that's the whole page!! π this was rheolef, Version 7.2, and the page is interpolate(3rheolef) β thanks for reading my little manual era, mwah ππΈπ¦
π¦ 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