integrate(3rheolef)
π integrate β expression integration (rheolef-7.2) π
okay bestie, pull up a chair, because this one is actually iconic. this is integrate(3rheolef) β yes, the manual page, and yes, we're doing this together π«Ά
β¨ NAME β¨
integrate β expression integration, brought to you by rheolef-7.2 π
πΈ SYNOPSIS πΈ
template <typename Expression>
Value integrate (geo domain, Expression, integrate_option iopt);
π DESCRIPTION π
so this function is overloaded, which is giving main character energy because it literally changes what it returns based on the vibes of its arguments. it can hand you back a scalar constant, a field(2), or a bilinear form(2). no cap.
- when the expression involves both trial and test(2) functions β the result is a bilinear form(2) π
- when the expression involves either a trial or a test(2) function β the result is a linear form, represented by the
field(2)class β¨ - when the expression involves neither a trial nor a test(2) function β the result is a scalar constant π
the general call takes three arguments:
- the
geo(2)domain of integration - the expression to integrate
- the
integrate_option(3)
here's the overloaded synopsis, look at her:
Float integrate (geo domain, Expression, integrate_option iopt);
field integrate (geo domain, Expression, integrate_option iopt);
form integrate (geo domain, Expression, integrate_option iopt);
π¦ OMITTED ARGUMENTS π¦
some arguments can just⦠not show up, lowkey, when the expression involves a test(2) function:
- when the domain of integration is omitted, then it is taken as those of the test(2) function π
the reduced synopsis is:
field integrate (Expression, integrate_option iopt);
form integrate (Expression, integrate_option iopt);
- when the
integrate_option(3)is omitted, then a Gauss quadrature formula is considered such that it integrates exactly2*k+1polynomials wherekis the polynomial degree of the test(2) function. when a trial function is also involved, then this degree isk1+k2+1wherek1andk2are the polynomial degree of the test(2) and trial functions. π (math girlies stay winning)
the reduced synopsis is:
field integrate (geo domain, Expression);
form integrate (geo domain, Expression);
both arguments could be omitted and the synopsis becomes:
field integrate (Expression);
form integrate (Expression);
π§ INTEGRATION OVER A SUBDOMAIN π§
let omega be a finite element mesh of a geometric domain, as described by the geo(2) class. a subdomain is defined by indexation, e.g. omega['left'], and when a test(2) function is involved, the omega could be omitted, and only the string 'left' has to be present, e.g.
test v (Xh);
field lh = integrate ('left', 2*v);
is equivalent to
field lh = integrate (omega['left'], 2*v);
literally the same thing, just shorter. obsessed π
β MEASURE OF A DOMAIN β
finally, when only the domain argument is provided, the integrate function returns its measure:
Float integrate (geo domain);
π₯ EXAMPLES π₯
the computation of the measure of a domain:
Float meas_omega = integrate (omega);
Float meas_left = integrate (omega['left']);
the integral of a function:
Float f (const point& x) { return exp(x[0]+x[1]); }
...
integrate_option iopt;
iopt.set_order (3);
Float int_f = integrate (omega, f, iopt);
the function can be replaced by any expression combining functions, class-functions and field(2). πΈ
the right-hand-side involved by the variational formulation:
space Xh (omega, 'P1');
test v (Xh);
field lh = integrate (f*v);
for a bilinear form:
trial u (Xh);
form m = integrate (u*v);
form a = integrate (dot(grad(u),grad(v)));
the expression can also combine functions, class-functions and field(2). periodt π
π IMPLEMENTATION π
this documentation has been generated from file main/lib/integrate.h β¨
π 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 so that last bit is real β there's literally NO WARRANTY, to the extent permitted by law. not a vibe check, a legal fact π«Ά
and that's the whole page, bestie!! this was rheolef, Version 7.2, integrate(3rheolef) β mwah, go integrate something iconic πβ¨π
π¦ 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