Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

solver_abtb(2rheolef) [debian man page]

solver_abtb(2rheolef)						    rheolef-6.1 					     solver_abtb(2rheolef)

NAME
solver_abtb -- direct or iterative solver iterface for mixed linear systems SYNOPSIS
solver_abtb stokes (a,b,mp); solver_abtb elasticity (a,b,c,mp); DESCRIPTION
The solver_abtb class provides direct or iterative algorithms for some mixed problem: [ A B^T ] [ u ] [ Mf ] [ ] [ ] = [ ] [ B -C ] [ p ] [ Mg ] where A is symmetric positive definite and C is symmetric positive. By default, iterative algorithms are considered for tridimensional problems and direct methods otherwise. 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. DIRECT ALGORITHM
When the kernel of B^T 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 pres- sure term and the whole matrix is factored one time for all. ITERATIVE ALGORITHM
The preconditionned conjugate gradient algorithm is used, where the mp matrix is used as preconditionner. See see mixed_solver(4). EXAMPLES
See the user's manual for practical examples for the nearly incompressible elasticity, the Stokes and the Navier-Stokes problems. IMPLEMENTATION
template <class T, class M = rheo_default_memory_model> class solver_abtb_basic { public: // typedefs: typedef typename csr<T,M>::size_type size_type; // allocators: solver_abtb_basic (); solver_abtb_basic (const csr<T,M>& a, const csr<T,M>& b, const csr<T,M>& mp, const solver_option_type& opt = solver_option_type()); solver_abtb_basic (const csr<T,M>& a, const csr<T,M>& b, const csr<T,M>& c, const csr<T,M>& mp, const solver_option_type& opt = solver_option_type()); // accessors: void solve (const vec<T,M>& f, const vec<T,M>& g, vec<T,M>& u, vec<T,M>& p) const; protected: // internal void init(); // data: mutable solver_option_type _opt; csr<T,M> _a; csr<T,M> _b; csr<T,M> _c; csr<T,M> _mp; solver_basic<T,M> _sA; solver_basic<T,M> _sa; solver_basic<T,M> _smp; bool _need_constraint; }; typedef solver_abtb_basic<Float,rheo_default_memory_model> solver_abtb; SEE ALSO
mixed_solver(4) rheolef-6.1 rheolef-6.1 solver_abtb(2rheolef)

Check Out this Related Man Page

solver(2rheolef)						    rheolef-6.1 						  solver(2rheolef)

NAME
solver - direct or interative solver interface DESCRIPTION
The class implements a matrix factorization: LU factorization for an unsymmetric matrix and Choleski fatorisation for a symmetric one. Let a be a square invertible matrix in csr format (see csr(2)). csr<Float> a; We get the factorization by: solver<Float> sa (a); Each call to the direct solver for a*x = b writes either: vec<Float> x = sa.solve(b); When the matrix is modified in a computation loop but conserves its sparsity pattern, an efficient re-factorization writes: sa.update_values (new_a); x = sa.solve(b); This approach skip the long step of the symbolic factization step. ITERATIVE SOLVER
The factorization can also be incomplete, i.e. a pseudo-inverse, suitable for preconditionning iterative methods. In that case, the sa.solve(b) call runs a conjugate gradient when the matrix is symmetric, or a generalized minimum residual algorithm when the matrix is unsymmetric. AUTOMATIC CHOICE AND CUSTOMIZATION
The symmetry of the matrix is tested via the a.is_symmetric() property (see csr(2)) while the choice between direct or iterative solver is switched from the a.pattern_dimension() value. When the pattern is 3D, an iterative method is faster and less memory consuming. Otherwhise, for 1D or 2D problems, the direct method is prefered. These default choices can be supersetted by using explicit options: solver_option_type opt; opt.iterative = true; solver<Float> sa (a, opt); See the solver.h header for the complete list of available options. IMPLEMENTATION NOTE
The implementation bases on the pastix library. IMPLEMENTATION
template <class T, class M = rheo_default_memory_model> class solver_basic : public smart_pointer<solver_rep<T,M> > { public: // typedefs: typedef solver_rep<T,M> rep; typedef smart_pointer<rep> base; // allocator: solver_basic (); explicit solver_basic (const csr<T,M>& a, const solver_option_type& opt = solver_option_type()); void update_values (const csr<T,M>& a); // accessors: vec<T,M> trans_solve (const vec<T,M>& b) const; vec<T,M> solve (const vec<T,M>& b) const; }; // factorizations: template <class T, class M> solver_basic<T,M> ldlt(const csr<T,M>& a, const solver_option_type& opt = solver_option_type()); template <class T, class M> solver_basic<T,M> lu (const csr<T,M>& a, const solver_option_type& opt = solver_option_type()); template <class T, class M> solver_basic<T,M> ic0 (const csr<T,M>& a, const solver_option_type& opt = solver_option_type()); template <class T, class M> solver_basic<T,M> ilu0(const csr<T,M>& a, const solver_option_type& opt = solver_option_type()); typedef solver_basic<Float> solver; SEE ALSO
csr(2), csr(2) rheolef-6.1 rheolef-6.1 solver(2rheolef)
Man Page