bempp_cl.api.linalg.iterative_solvers ===================================== .. py:module:: bempp_cl.api.linalg.iterative_solvers .. autoapi-nested-parse:: Iterative solver interfaces. Classes ------- .. autoapisummary:: bempp_cl.api.linalg.iterative_solvers.IterationCounter Functions --------- .. autoapisummary:: bempp_cl.api.linalg.iterative_solvers.gmres bempp_cl.api.linalg.iterative_solvers.cg bempp_cl.api.linalg.iterative_solvers._gmres_single_op_imp bempp_cl.api.linalg.iterative_solvers._gmres_block_op_imp Module Contents --------------- .. py:class:: IterationCounter(store_residuals, iteration_is_cg=False, operator=None, rhs=None) Bases: :py:obj:`object` Iteration Counter class. .. py:attribute:: _count :value: 0 .. py:attribute:: _store_residuals .. py:attribute:: _residuals :value: [] .. py:attribute:: _iteration_is_cg :value: False .. py:attribute:: _operator :value: None .. py:attribute:: _rhs :value: None .. py:method:: __call__(x) Call. .. py:property:: count Return the number of iterations. .. py:property:: residuals Return the vector of residuals. .. 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.