characteristic(2rheolef)
β¨ NAME β¨
characteristic β the Lagrange-Galerkin method, bestie π (this is the rheolef-7.2 era, just so u know)
πΈ DESCRIPTION πΈ
Okay so the class characteristic is literally the whole Lagrange-Galerkin method, implemented and ready for u π«Ά It's the glow-up of the method of characteristic β taking it from the finite difference world and dropping it into the finite element context, no cap.
Heads up tho: the Lagrange-Galerkin method is for diffusion-convection problems when the convection term is not dominant. If ur problem is more serious than that, pls pls pls go look at the discontinuous Galerkin method in the Rheolef library instead π
π EXAMPLE π
Okay so imagine the bilinear form lh defined by
/
|
lh(x) = | uh(x+dh(x)) v(x) dx
|
/ Omega
where dh is a deformation vector field. The characteristic is defined by X(x)=x+dh(x) for any x in Omega, and that previous integral writes equivalently as:
/
|
lh(x) = | uh(X(x)) v(x) dx
|
/ Omega
So for instance, in Lagrange-Galerkin methods, the deformation field is dh(x)=-dt*uh(x) where uh is the advection field and dt is a time step β±οΈ The following code implements the computation of lh:
field dh = ...;
field uh = ...;
characteristic X (dh);
test v (Xh);
field lh = integrate (compose(uh, X)*v, qopt);
The Gauss-Lobatto quadrature formula is the recommended one for computing integrals that involve the characteristic X of the Lagrange-Galerkin method π Its order should equal the polynomial order of Xh (order 1: trapeze, order 2: simpson, etc). And recall β this choice of quadrature formula guaranties inconditionnal stability at any polynomial order, which is iconic fr fr π₯ If u wanna use alternative quadrature formulae or order, u can, by passing the additional integrate_option(3) argument to the integrate(3) function. slay.
π IMPLEMENTATION π
This documentation has been generated from file main/lib/characteristic.h π¦
The characteristic class is simply an alias to the characteristic_basic class:
typedef characteristic_basic<Float> characteristic;
The characteristic_basic class provides an interface, via the smart_pointer(7) class family, to a data container:
template<class T, class M = rheo_default_memory_model>
class characteristic_basic : public smart_pointer<characteristic_rep<T,M> > {
public:
typedef characteristic_rep<T,M> rep;
typedef smart_pointer<rep> base;
// allocator:
characteristic_basic(const field_basic<T,M>& dh);
// accesors:
const field_basic<T,M>& get_displacement() const;
};
π 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.
k bye bestie, this was rheolef Version 7.2, characteristic(2rheolef) β go be the main character of ur own finite element solver πβ¨
π¦ 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