bicgstab_custom.m File Reference

Functions

function bicgstab_custom (in A, in b, in tol, in max_it, in Minv, in ignoredArg, in x)
 Customized BiCGStab algorithm to allow for live monitoring of convergence progress. More...
 

Function Documentation

◆ bicgstab_custom()

function bicgstab_custom ( in  A,
in  b,
in  tol,
in  max_it,
in  Minv,
in  ignoredArg,
in  x 
)

Customized BiCGStab algorithm to allow for live monitoring of convergence progress.

This function is a modified version of the algorithm provided with the package "Templates for the Solution of Linear Systems" from matlab file exchange

Parameters
A(function handle): The linear operator to be solved
b(float array): Right hand side of linear system
tol(float): Convergence tolerance - algorithm stops when relative error is smaller than tol
max_it(int): Maximal number of iterations
Minv(function handle): Preconditioner operator, should be similar to the inverse of A
0(-): Empty input parameter to make format consistent with Matlab's built-in bicgstab
x(float array): Initial guess for solution vector
Return values
x(float array): approximate solution of linear system
error(float): residual relative error
iter(int): number of iterations
flag(int): indicates success of algorithm: 0 = solution found to tolerance 1 = no convergence given max_it -1 = breakdown: rho = 0 -2 = breakdown: omega = 0
convHist(float array): relative error as a function of iteration half-steps