bempp_cl.api.linalg.iterative_solvers¶
Iterative solver interfaces.
Classes¶
Iteration Counter class. |
Functions¶
|
Perform GMRES solve via interface to scipy. |
|
Perform CG solve via interface to scipy. |
|
Run implementation of GMRES for single operators. |
|
Run implementation of GMRES for blocked operators. |
Module Contents¶
- class bempp_cl.api.linalg.iterative_solvers.IterationCounter(store_residuals, iteration_is_cg=False, operator=None, rhs=None)¶
Bases:
objectIteration Counter class.
- _count = 0¶
- _store_residuals¶
- _residuals = []¶
- _iteration_is_cg = False¶
- _operator = None¶
- _rhs = None¶
- __call__(x)¶
Call.
- property count¶
Return the number of iterations.
- property residuals¶
Return the vector of residuals.
- bempp_cl.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_cl.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_cl.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_cl.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.