.\" .de Id .. .de Sp .if n .sp .if t .sp 0.4 .. .TH solver_abtb 2rheolef "rheolef-7.0" "rheolef-7.0" "rheolef-7.0" .\" label: /*Class:solver_abtb .SH NAME \fBsolver_abtb\fP -- direct or iterative solver interface for mixed linear systems .\" skip: @cindex mixed linear problem .\" skip: @cindex conjugate gradien algorithm .\" skip: @cindex finite element method .\" skip: @cindex stabilized mixed finite element method .\" skip: @cindex Stokes problem .\" skip: @cindex incompresible elasticity .SH SYNOPSIS .\" begin_example .Sp .nf solver_abtb stokes (a,b,mp); solver_abtb elasticity (a,b,c,mp); .Sp .fi .\" end_example .SH DESCRIPTION The \fBsolver_abtb\fP class provides direct or iterative algorithms for some mixed problem: .\" begin_example .Sp .nf [ A B^T ] [ u ] [ Mf ] [ ] [ ] = [ ] [ B -C ] [ p ] [ Mg ] .Sp .fi .\" end_example where A is symmetric positive definite and C is symmetric positive. By default, iterative algorithms are considered for tridimensional problems and direct methods otherwise. An optional argument can change this behavior. Such mixed linear problems appears for instance with the discretization of Stokes problems. The C matrix can be zero and then the corresponding argument can be omitted when invoking the constructor. Non-zero C matrix appears for of Stokes problems with stabilized P1-P1 element, or for nearly incompressible elasticity problems. .SH DIRECT ALGORITHM When the kernel of \fBB^T\fP is not reduced to zero, then the pressure p is defined up to a constant and the system is singular. In the case of iterative methods, this is not a problem. But when using direct method, the system is then completed to impose a constraint on the pressure term and the whole matrix is factored one time for all. .SH ITERATIVE ALGORITHM The preconditionned conjugate gradient algorithm is used, where the \fBmp\fP matrix is used as preconditionner. See see mixed_solver(4). The linear sub-systems related to the \fBA\fP matrix are also solved by an iterative algorithm. Use a second optional argument to change this default behavior: a factorization and a direct solver can be considered for these sub-systems. .SH EXAMPLES See the user's manual for practical examples for the nearly incompressible elasticity, the Stokes and the Navier-Stokes problems. .\" skip start:AUTHOR: .\" skip start:DATE: .\" skip start:METHODS: .\" END .SH IMPLEMENTATION .\" begin_example .Sp .nf template class solver_abtb_basic { public: // typedefs: typedef typename csr::size_type size_type; // allocators: solver_abtb_basic (); solver_abtb_basic (const csr& a, const csr& b, const csr& mp, const solver_option& opt = solver_option(), const solver_option& sub_opt = solver_option()); solver_abtb_basic (const csr& a, const csr& b, const csr& c, const csr& mp, const solver_option& opt = solver_option(), const solver_option& sub_opt = solver_option()); // accessors: void solve (const vec& f, const vec& g, vec& u, vec& p) const; const solver_option& option() const { return _opt; } protected: // internal void init(); // data: mutable solver_option _opt; mutable solver_option _sub_opt; csr _a; csr _b; csr _c; csr _mp; solver_basic _sA; solver_basic _sa; solver_basic _smp; bool _need_constraint; }; typedef solver_abtb_basic solver_abtb; .Sp .fi .\" end_example .\" LENGTH = 1 .SH SEE ALSO mixed_solver(4) .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.