.TH "characteristic" 2rheolef "Version 7.2" "rheolef" \" -*- nroff -*- .ad l .nh .SH NAME characteristic \- Lagrange-Galerkin method (rheolef-7\&.2) .PP .SH "DESCRIPTION" .PP 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\&. .PP 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\&. .SH "EXAMPLE" .PP Consider the bilinear form \fClh\fP defined by .PP .nf / | lh(x) = | uh(x+dh(x)) v(x) dx | / Omega .fi .PP where \fCdh\fP is a deformation vector field\&. The characteristic is defined by \fCX(x)=x+dh(x)\fP for any x in Omega, and the previous integral writes equivalently: .PP .nf / | lh(x) = | uh(X(x)) v(x) dx | / Omega .fi .PP For instance, in Lagrange-Galerkin methods, the deformation field \fCdh(x)=-dt*uh(x)\fP where \fCuh\fP is the advection field and \fCdt\fP a time step\&. The following code implements the computation of \fClh\fP: .PP .nf field dh = \&.\&.\&.; field uh = \&.\&.\&.; characteristic X (dh); test v (Xh); field lh = integrate (compose(uh, X)*v, qopt); .fi .PP The Gauss-Lobatto quadrature formula is recommended for the computation of integrals involving the characteristic \fCX\fP of the Lagrange-Galerkin method\&. The order equal to the polynomial order of \fCXh\fP (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 \fBintegrate_option(3)\fP argument to the \fBintegrate(3)\fP function\&. .SH "IMPLEMENTATION" .PP This documentation has been generated from file main/lib/characteristic\&.h .PP The \fCcharacteristic\fP class is simply an alias to the \fC\fBcharacteristic_basic\fP\fP class .PP .PP .nf typedef characteristic_basic characteristic; .fi .PP .PP \fB\fP .RS 4 .RE .PP The \fC\fBcharacteristic_basic\fP\fP class provides an interface, via the \fBsmart_pointer(7)\fP class family, to a data container: .PP .PP .nf template class characteristic_basic : public smart_pointer > { public: typedef characteristic_rep rep; typedef smart_pointer base; // allocator: characteristic_basic(const field_basic& dh); // accesors: const field_basic& get_displacement() const; .fi .PP .PP .nf }; .fi .PP .SH AUTHOR Pierre Saramito .SH COPYRIGHT Copyright (C) 2000-2018 Pierre Saramito GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.