:py:mod:`bempp.api.linalg.iterative_solvers` ============================================ .. py:module:: bempp.api.linalg.iterative_solvers .. autoapi-nested-parse:: Iterative solver interfaces. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: bempp.api.linalg.iterative_solvers.IterationCounter Functions ~~~~~~~~~ .. autoapisummary:: bempp.api.linalg.iterative_solvers.gmres bempp.api.linalg.iterative_solvers.cg bempp.api.linalg.iterative_solvers._gmres_single_op_imp bempp.api.linalg.iterative_solvers._gmres_block_op_imp .. py:class:: IterationCounter(store_residuals, iteration_is_cg=False, operator=None, rhs=None) Bases: :py:obj:`object` Iteration Counter class. .. py:property:: count Return the number of iterations. .. py:property:: residuals Return the vector of residuals. .. py:method:: __call__(x) Call. .. py:function:: gmres(A, b, tol=1e-05, restart=None, maxiter=None, use_strong_form=False, return_residuals=False, return_iteration_count=False) Perform GMRES solve via interface to scipy. This function behaves like the scipy.sparse.linalg.gmres function. But instead of a linear operator and a vector b it takes a boundary operator and a grid function or a blocked operator and a list of grid functions. The result is returned as a grid function or as a list of grid functions in the correct spaces. .. py:function:: cg(A, b, tol=1e-05, maxiter=None, use_strong_form=False, return_residuals=False, return_iteration_count=False) Perform CG solve via interface to scipy. This function behaves like the scipy.sparse.linalg.cg function. But instead of a linear operator and a vector b it takes a boundary operator and a grid function. The result is returned as a grid function in the correct space. .. py:function:: _gmres_single_op_imp(A, b, tol=1e-05, restart=None, maxiter=None, use_strong_form=False, return_residuals=False, return_iteration_count=False) Run implementation of GMRES for single operators. .. py:function:: _gmres_block_op_imp(A, b, tol=1e-05, restart=None, maxiter=None, use_strong_form=False, return_residuals=False, return_iteration_count=False) Run implementation of GMRES for blocked operators.