Rheolef  7.1
an efficient C++ finite element environment
characteristic

Lagrange-Galerkin method

Description

The class characteristic implements the Lagrange-Galerkin method. It is the extension of the method of characteristic from the finite difference to the finite element context.

Note that the Lagrange-Galerkin method applies to diffusion-convection problems when the convection term is not dominant. For more serious problems, please refer to the discontinuous Galerkin method in the Rheolef library.

Example

Consider 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 the previous integral writes equivalently:

        /
        |
lh(x) = | uh(X(x)) v(x) dx
        |
        / Omega

For instance, in Lagrange-Galerkin methods, the deformation field dh(x)=-dt*uh(x) where uh is the advection field and dt 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 recommended for the computation of integrals involving the characteristic X of the Lagrange-Galerkin method. The order equal to the polynomial order of Xh (order 1: trapeze, order 2: simpson, etc). Recall that this choice of quadrature formula guaranties inconditionnal stability at any polynomial order. Alternative quadrature formulae or order can be used by using the additional integrate_option argument to the integrate function.

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 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;
};
rheolef::characteristic
characteristic_basic< Float > characteristic
Definition: characteristic.h:218
rheolef::characteristic_basic::rep
characteristic_rep< T, M > rep
Definition: characteristic.h:196
rheolef::characteristic_basic::get_displacement
const field_basic< T, M > & get_displacement() const
Definition: characteristic.h:230
rheolef::characteristic_basic::characteristic_basic
characteristic_basic(const field_basic< T, M > &dh)
Definition: characteristic.h:223
rheolef::characteristic_basic::base
smart_pointer< rep > base
Definition: characteristic.h:197