.. Documentation for the header file dolfin/la/GenericLinearSolver.h .. _programmers_reference_cpp_la_genericlinearsolver: GenericLinearSolver.h ===================== .. note:: The documentation on this page was automatically extracted from the DOLFIN C++ code and may need to be edited or expanded. .. cpp:class:: GenericLinearSolver *Parent class(es)* * :cpp:class:`Variable` This class provides a general solver for linear systems Ax = b. .. cpp:function:: void set_operator(std::shared_ptr A) = 0 Set operator (matrix) .. cpp:function:: void set_operators(std::shared_ptr A, std::shared_ptr P) Set operator (matrix) and preconditioner matrix .. cpp:function:: std::size_t solve(const GenericLinearOperator& A, GenericVector& x, const GenericVector& b) Solve linear system Ax = b .. cpp:function:: std::size_t solve(GenericVector& x, const GenericVector& b) = 0 Solve linear system Ax = b .. cpp:function:: std::string parameter_type() const Return parameter type: "krylov_solver" or "lu_solver" .. cpp:function:: void update_parameters(const Parameters& parameters) Update solver parameters (useful for LinearSolver wrapper) .. cpp:function:: static const GenericMatrix& require_matrix(const GenericLinearOperator& A) Down-cast GenericLinearOperator to GenericMatrix when an actual matrix is required, not only a linear operator. This is the const reference version of the down-cast. .. cpp:function:: static std::shared_ptr require_matrix(std::shared_ptr A) Down-cast GenericLinearOperator to GenericMatrix when an actual matrix is required, not only a linear operator. This is the const reference version of the down-cast.