[istlsolvers] Improve parameter handling and allow setting a matrix operator for reuse
* The solver accepts now either a parameter group or a Dune::ParameterTree. In the case of the latter, the parameter tree is forwarded without modificaiton to the dune-istl solvers. * Introduce a new function to set the maximum number of itertions * Introduce two new interfaces "setMatrix(A)" and "solve(x, b)". The first one constructs a solver based on the matrix A. If the new solve interface without matrix is called, this pre-constructed solver is used in the solver. solve(A, x, b) still exists and construct a solver based on A and ignores any stored solver. This allows to contruct a solver and then reuse it for many right hand sides. This can be practical, for example, in parallel for linear problems where constructing the solver involves the modificaiton of the matrix and communication and is therefore an expensive step. * Return solver result that is convertible to bool but contains Dune::InverseOperatorResults * Simplify parallel code branches * Make solver copyable by using shared_ptr for parallel helper
parent
02e599a7
No related branches found
No related tags found
This diff is collapsed.
Please register or sign in to comment