Function IterativeSolver::BiCGSTAB(AMatrix *, puma::Matrix<double> *, puma::Matrix<double> *, double, int, bool, int)
Defined in File iterativesolvers.h
Function Documentation
-
bool IterativeSolver::BiCGSTAB(AMatrix *A, puma::Matrix<double> *x, puma::Matrix<double> *b, double tol, int maxIt, bool print, int numThreads)
solves a linear system of equations using the biconjugate gradient stabilized method.
- Parameters
A – a pointer to an AMatrix representing the linear system being solved.
x – a pointer to a puma matrix which stores the solution. The matrix should contain an initial guess for the solution when passed in.
b – a pointer to a puma matrix which stores the right-hand side of the system of equations.
tol – a double specifying the convergence criterion.
maxIt – an integer specifying the maximum number of iterations the solver may execute before exiting.
print – a boolean which specifies whether the the number of iterations and residual are printed after each iteration of the solver.
- Returns
a boolean indicating whether or not convergence was achieved.