.TH "problem_mixed" 2rheolef "Sat Mar 13 2021" "Version 7.1" "rheolef" \" -*- nroff -*- .ad l .nh .SH NAME problem_mixed \- linear solver (rheolef-7\&.1) .SH "DESCRIPTION" .PP The \fCproblem_mixed\fP class solves a given linear mixed system for PDEs in variational formulation\&. .PP Mixed problem appear in many applications such as the Stokes or the nearly incompressible elasticity\&. Let \fCXh\fP and \fCQh\fP be two finite element \fBspace(2)\fP\&. Let \fCa: Xh*Xh --> IR\fP, \fCb: Xh*Qh --> IR\fP and \fCc: Xh*Qh --> IR\fP be three bilinear \fBform(2)\fP\&. The system writes: .PP .nf [ A B^T ] [ uh ] [ lh ] [ ] [ ] = [ ] [ B -C ] [ ph ] [ kh ] .fi .PP where \fCA\fP, \fCB\fP and \fCC\fP are the three operators associated to \fCa\fP, \fCb\fP and \fCc\fP, respectively, and \fClh in Xh\fP and \fCkh in Qh\fP are the two given right-hand-sides\&. The \fCc\fP bilinear form is called the stabilization, and could be zero\&. .PP The degrees of freedom are split between \fIunknown\fP degrees of freedom and \fIblocked\fP one\&. See also \fBform(2)\fP and \fBspace(2)\fP\&. The linear system expands as: .PP .nf [ 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 ] .fi .PP Both the \fCuh\&.b\fP and \fCph\&.b\fP 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: .PP .nf 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 .fi .PP This writes: .PP .nf problem_mixed p (a, b, c); p.solve (lh, kh, uh, ph); .fi .PP When \fCc\fP is zero, the last \fCc\fP argument could be omitted, as: .PP .nf problem_mixed p (a, b); .fi .PP Observe that, during the \fCp\&.solve\fP call, \fCuh\fP is both an input variable, for the \fCuh\&.b\fP contribution to the right-hand-side, and an output variable, with \fCuh\&.u\fP\&. This is also true for \fCph\fP when \fCph\&.b\fP is non-empty\&. The previous linear system is solved via the \fBsolver_abtb(4)\fP class: the \fCproblem_mixed\fP class is simply a convenient wrapper around the \fBsolver_abtb(4)\fP one\&. .SH "EXAMPLE" .PP See \fBstokes_cavity\&.cc\fP .SH "OPTIONS" .PP The \fBsolver_abtb(4)\fP could be customized via the constructor optional \fBsolver_option(4)\fP argument: .PP .nf problem p (a, b, sopt); .fi .PP or .PP .nf problem p (a, b, c, sopt); .fi .PP This \fBsolver_abtb(4)\fP is used to switch between a direct and an iterative method for solving the mixed system\&. .SH "METRIC" .PP A \fImetric\fP in the \fCQh\fP space could also be provided: .PP .nf p.set_metric (mp); .fi .PP By default, when nothing has been specified, this metric is the L2 scalar product for the \fCQh\fP space\&. .PP When using a direct \fBsolver(4)\fP 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\&. .PP When using an iterative \fBsolver(4)\fP method, this metric is used as a Schur complement preconditionner, see \fBsolver_abtb(4)\fP for details\&. The \fBsolver(4)\fP associated to this Schur preconditionner could be customized by specifying the \fBsolver(4)\fP associated to the \fBproblem(2)\fP related to the \fCmp\fP operator: .PP .nf p.set_preconditionner (pmp); .fi .PP Note this preconditionner subproblem could be solved either by a direct or an iterative method, while the whole mixed problem solver is iterative\&. .SH "INNER SOLVER" .PP When using an iterative \fBsolver_abtb(4)\fP, the inner \fBproblem(2)\fP related to the \fCa\fP operator could also be customized by specifying its \fBsolver(4)\fP : .PP .nf p.set_inner_problem (pa); .fi .PP Note this inner subproblem could be solved either by a direct or an iterative method, while the whole mixed problem solver is iterative\&. .SH "IMPLEMENTATION" .PP This documentation has been generated from file main/lib/problem_mixed\&.h .PP The \fCproblem_mixed\fP class is simply an alias to the \fC\fBproblem_mixed_basic\fP\fP class .PP .PP .nf typedef problem_mixed_basic problem_mixed; .fi .PP \fB\fP .RS 4 .RE .PP The \fC\fBproblem_mixed_basic\fP\fP class provides a generic interface: .PP .PP .nf template class problem_mixed_basic { public: // typedefs: typedef typename solver_basic::size_type size_type; typedef typename solver_basic::determinant_type determinant_type; // allocators: problem_mixed_basic(); problem_mixed_basic( const form_basic& a, const form_basic& b, const solver_option& sopt = solver_option()); problem_mixed_basic( const form_basic& a, const form_basic& b, const form_basic& c, const solver_option& sopt = solver_option()); // accessor: void solve (const field_basic& lh, const field_basic& kh, field_basic& uh, field_basic& ph) const; bool initialized() const; const solver_option& option() const; // modifiers: void set_metric (const form& mp); void set_preconditionner (const problem& pmp); void set_inner_problem (const problem& pa); .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.