|
Rheolef
7.1
an efficient C++ finite element environment
|
problem linear solver
The problem class solves a given linear system for PDEs in variational formulation.
The degrees of freedom are splitting between unknown degrees of freedom and blocked one. See also form and space. Let a be a bilinear form and lh be the right-hand-side, as in the previous example. The linear system expands as:
[ a.uu a.ub ] [ uh.u ] [ lh.u ]
[ ] [ ] = [ ]
[ a.bu a.bb ] [ uh.b ] [ lh.b ]
The uh.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 = lh.u - a.ub*uh.b
This writes:
problem p (a);
p.solve (lh, uh);
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. 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 p.option() member function, see solver_option. Finally, the previous linear system is solved via the solver class: the problem class is simply a convenient wrapper around the solver one.
See dirichlet.cc
The solver could be customized via the constructor optional solver_option argument:
problem p (a, sopt);
When using a direct solver, the determinant of the linear system matrix is also available as p.det(). When using an iterative solver, the preconditionner could be customized:
p.set_preconditionner (m);
The solve method could return a boolean when success.
This documentation has been generated from file main/lib/problem.h
The problem class is simply an alias to the problem_basic class
The problem_basic class provides a generic interface: