|
Rheolef
7.2
an efficient C++ finite element environment
|
linear solver
The problem_mixed class solves a given linear mixed system for PDEs in variational formulation.
Mixed problem appear in many applications such as the Stokes or the nearly incompressible elasticity. Let Xh and Qh be two finite element space. Let a: Xh*Xh --> IR, b: Xh*Qh --> IR and c: Xh*Qh --> IR be three bilinear form. The system writes:
[ A B^T ] [ uh ] [ lh ]
[ ] [ ] = [ ]
[ B -C ] [ ph ] [ kh ]
where A, B and C are the three operators associated to a, b and c, respectively, and lh in Xh and kh in Qh are the two given right-hand-sides. The c bilinear form is called the stabilization, and could be zero.
The degrees of freedom are split between unknown degrees of freedom and blocked one. See also form and space. The linear system expands as:
[ a.uu a.ub b.uu^T b.bu^T ] [ uh.u ] [ lh.u ]
[ ] [ ] = [ ]
[ a.bu a.bb b.ub^T b.bb^T ] [ uh.b ] [ lh.b ]
[ ] [ ] = [ ]
[ b.uu b.ub -c.uu -c.ub ] [ ph.u ] [ kh.u ]
[ ] [ ] = [ ]
[ b.bu a.bb -c.bu -c.bb ] [ ph.b ] [ kh.b ]
Both the uh.b and ph.b are blocked degrees of freedom: their values are prescribed and the corresponding values are move to the right-hand-side of the system that reduces to:
a.uu*uh.u + b.uu^T*ph.u = lh.u - a.ub*uh.b - b.bu^T*ph.b
b.uu*uh.u - c.uu*ph.u = kh.u - b.ub*uh.b + c.ub*ph.b
This writes:
problem_mixed p (a, b, c);
p.solve (lh, kh, uh, ph);
When c is zero, the last c argument could be omitted, as:
problem_mixed p (a, b);
Observe that, during the p.solve call, uh is both an input variable, for the uh.b contribution to the right-hand-side, and an output variable, with uh.u. This is also true for ph when ph.b is non-empty. The previous linear system is solved via the solver_abtb class: the problem_mixed class is simply a convenient wrapper around the solver_abtb one.
See stokes_cavity.cc
The solver_abtb could be customized via the constructor optional solver_option argument:
problem p (a, b, sopt);
or
problem p (a, b, c, sopt);
This solver_abtb is used to switch between a direct and an iterative method for solving the mixed system.
A metric in the Qh space could also be provided:
p.set_metric (mp);
By default, when nothing has been specified, this metric is the L2 scalar product for the Qh space.
When using a direct solver method, this metric is used to add a constraint when the multiplier is known up to a constant. For instance, when the pressure is known up to a constant, a constraint for a zero average pressure is automatically added to the linear system.
When using an iterative solver method, this metric is used as a Schur complement preconditionner, see solver_abtb for details. The solver associated to this Schur preconditionner could be customized by specifying the solver associated to the problem related to the mp operator:
p.set_preconditionner (pmp);
Note this preconditionner subproblem could be solved either by a direct or an iterative method, while the whole mixed problem solver is iterative.
When using an iterative solver_abtb, the inner problem related to the a operator could also be customized by specifying its solver :
p.set_inner_problem (pa);
Note this inner subproblem could be solved either by a direct or an iterative method, while the whole mixed problem solver is iterative.
This documentation has been generated from file main/lib/problem_mixed.h
The problem_mixed class is simply an alias to the problem_mixed_basic class
The problem_mixed_basic class provides a generic interface: