.TH "problem" 2rheolef "Version 7.2" "rheolef" \" -*- nroff -*- .ad l .nh .SH NAME problem \- linear solver (rheolef-7\&.2) .SH "DESCRIPTION" .PP The \fCproblem\fP class solves a given linear system for PDEs in variational formulation\&. .SH "DESCRIPTION" .PP The degrees of freedom are splitting between \fIunknown\fP degrees of freedom and \fIblocked\fP one\&. See also \fBform(2)\fP and \fBspace(2)\fP\&. Let \fCa\fP be a bilinear \fBform(2)\fP and \fClh\fP be the right-hand-side, as in the previous example\&. The linear system expands as: .PP .nf [ a\&.uu a\&.ub ] [ uh\&.u ] [ lh\&.u ] [ ] [ ] = [ ] [ a\&.bu a\&.bb ] [ uh\&.b ] [ lh\&.b ] .fi .PP The \fCuh\&.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 = lh\&.u - a\&.ub*uh\&.b .fi .PP This writes: .PP .nf problem p (a); p\&.solve (lh, uh); .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\&. When using an iterative resolution, the details about its convergence, e\&.g\&. the number of iterations and the final residue, can be obtain via the \fCp\&.option()\fP member function, see \fBsolver_option(4)\fP\&. Finally, the previous linear system is solved via the \fBsolver(4)\fP class: the \fCproblem\fP class is simply a convenient wrapper around the \fBsolver(4)\fP one\&. .SH "EXAMPLE" .PP See \fBdirichlet\&.cc\fP .SH "CUSTOMIZATION" .PP The \fBsolver(4)\fP could be customized via the constructor optional \fBsolver_option(4)\fP argument: .PP .nf problem p (a, sopt); .fi .PP When using a direct \fBsolver(4)\fP, the determinant of the linear system matrix is also available as \fCp\&.det()\fP\&. When using an iterative \fBsolver(4)\fP, the preconditionner could be customized: .PP .nf p\&.set_preconditionner (m); .fi .PP .SH "TODO" .PP The \fCsolve\fP method could return a boolean when success\&. .SH "IMPLEMENTATION" .PP This documentation has been generated from file main/lib/problem\&.h .PP The \fCproblem\fP class is simply an alias to the \fC\fBproblem_basic\fP\fP class .PP .PP .nf typedef problem_basic problem; .fi .PP .PP \fB\fP .RS 4 .RE .PP The \fC\fBproblem_basic\fP\fP class provides a generic interface: .PP .PP .nf template class problem_basic { public: // typedefs: typedef typename solver_basic::size_type size_type; typedef typename solver_basic::determinant_type determinant_type; // allocators: problem_basic (); problem_basic (const form_basic& a, const solver_option& sopt = solver_option()); void update_value (const form_basic& a); void set_preconditioner (const solver_basic&); // accessor: void solve (const field_basic& lh, field_basic& uh) const; void trans_solve (const field_basic& lh, field_basic& uh) const; determinant_type det() const; const solver_option& option() const; bool initialized() const; .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.