|
Rheolef
7.2
an efficient C++ finite element environment
|
finite element bilinear form
The form class groups four sparse matrix, associated to a bilinear form defined on two finite element spaces:
a: Uh*Vh ----> IR
(uh,vh) +---> a(uh,vh)
The A operator associated to the bilinear form is defined by:
A: Uh ----> Vh
uh +---> A*uh
where uh is a field, and vh=A*uh in Vh is such that a(uh,vh)=dual(A*uh,vh) for all vh in Vh and where dual(.,.) denotes the duality product between Vh and its dual. Since Vh is a finite dimensional space, its dual is identified to Vh itself and the duality product is the euclidean product in IR^dim(Vh). Also, the linear operator can be represented by a matrix.
In practice, bilinear forms are created by using the integrate function.
Forms, as matrix, support standard algebra. Adding or subtracting two forms writes a+b and a-b, respectively, while multiplying by a scalar lambda writes lambda*a and multiplying two forms writes a*b. Also, multiplying a form by a field uh writes a*uh. The form inversion is not as direct as e.g. as inv(a), since forms are very large matrix in practice: form inversion can be obtained via the solver class. A notable exception is the case of block-diagonal forms at the element level: in that case, a direct inversion is possible during the assembly process, see integrate_option.
The degrees of freedom (see space) are splited between unknowns and blocked, i.e. uh=[uh.u,uh.b] for any field uh in Uh. Conversely, vh=[vh.u,vh.b] for any field vh in Vh. Then, the form-field vh=a*uh operation is formally equivalent to the following matrix-vector block operations:
[ vh.u ] [ a.uu a.ub ] [ uh.u ]
[ ] = [ ] [ ]
[ vh.b ] [ a.bu a.bb ] [ uh.n ]
or, after expansion:
vh.u = a.uu*uh.u + a.ub*vh.b
vh.b = a.bu*uh.b + a.bb*vh.b
i.e. the A matrix also admits a 2x2 block structure. Then, the form class is represented by four sparse matrix and the csr compressed format is used. Note that the previous formal relations for vh=a*uh writes equivalently within the Rheolef library as:
vh.set_u() = a.uu()*uh.u() + a.ub()*uh.b();
vh.set_b() = a.bu()*uh.u() + a.bb()*uh.b();
This documentation has been generated from file main/lib/form.h
The form class is simply an alias to the form_basic class
The form_basic class provides an interface to four sparse matrix: