bempp.api.linalg.iterative_solvers

Iterative solver interfaces.

Module Contents

Classes

IterationCounter

Iteration Counter class.

Functions

gmres(A, b[, tol, restart, maxiter, use_strong_form, ...])

Perform GMRES solve via interface to scipy.

cg(A, b[, tol, maxiter, use_strong_form, ...])

Perform CG solve via interface to scipy.

_gmres_single_op_imp(A, b[, tol, restart, maxiter, ...])

Run implementation of GMRES for single operators.

_gmres_block_op_imp(A, b[, tol, restart, maxiter, ...])

Run implementation of GMRES for blocked operators.

class bempp.api.linalg.iterative_solvers.IterationCounter(store_residuals, iteration_is_cg=False, operator=None, rhs=None)

Bases: object

Iteration Counter class.

property count

Return the number of iterations.

property residuals

Return the vector of residuals.

__call__(x)

Call.

bempp.api.linalg.iterative_solvers.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.

bempp.api.linalg.iterative_solvers.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.

bempp.api.linalg.iterative_solvers._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.

bempp.api.linalg.iterative_solvers._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.