diff --git a/gmres.h b/gmres.h new file mode 100644 index 0000000..e4dc6e6 --- /dev/null +++ b/gmres.h @@ -0,0 +1,13 @@ +#include "vec.h" +#include "smat.h" +#include "mat.h" +#include "sparsemat.h" +#include "nonclass.h" + +//GMRES solution of a linear system + +//matrix can be any class which has nrows(), ncols(), diagonalof() and NRVec::gemv() available +//does not even have to be explicitly stored + +template +extern void gmres(const Matrix &bigmat, const NRVec &b, NRVec &x, const bool doguess=1, const double eps=1e-7, const int MAXIT=50, int neustart=0, const bool verbose=1, bool square=1,const bool precondition=1);